|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.directwebremoting.convert.BaseV20Converter
org.directwebremoting.convert.BasicObjectConverter
org.directwebremoting.convert.ObjectConverter
public class ObjectConverter
Convert a Javascript associative array into a JavaBean
Field Summary |
---|
Fields inherited from class org.directwebremoting.convert.BasicObjectConverter |
---|
converterManager, exclusions, inclusions, instanceType, javascript |
Constructor Summary | |
---|---|
ObjectConverter()
|
Method Summary | |
---|---|
protected TypeHintContext |
createTypeHintContext(InboundContext inctx,
Property property)
BasicObjectConverter.convertInbound(Class, InboundVariable, InboundContext) needs to
create a TypeHintContext for the Property it is
converting so that the type guessing system can do its work. |
java.util.Map |
getPropertyMapFromClass(java.lang.Class type,
boolean readRequired,
boolean writeRequired)
Get a map of property names to implementations of Property . |
java.util.Map |
getPropertyMapFromObject(java.lang.Object example,
boolean readRequired,
boolean writeRequired)
Get a map of property names to implementations of Property . |
void |
setForce(java.lang.String force)
Do we force accessibility for private fields |
Methods inherited from class org.directwebremoting.convert.BasicObjectConverter |
---|
convertInbound, convertOutbound, extractInboundTokens, getConverterManager, getInstanceType, getJavascript, isAllowedByIncludeExcludeRules, setConverterManager, setExclude, setImplementation, setInclude, setInstanceType, setJavascript |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.directwebremoting.extend.Converter |
---|
convertInbound, convertOutbound, setConverterManager |
Constructor Detail |
---|
public ObjectConverter()
Method Detail |
---|
public void setForce(java.lang.String force)
force
- "true|false" to set the force accessibility flagpublic java.util.Map getPropertyMapFromObject(java.lang.Object example, boolean readRequired, boolean writeRequired) throws MarshallException
NamedConverter
Property
.
HibernateBeanConverter (and maybe others) may want to provide alternate versions of bean.getClass(), and we may wish to fake or hide properties in some cases.
This implementation is preferred above the alternate:
NamedConverter.getPropertyMapFromClass(Class, boolean, boolean)
because it
potentially retains important extra type information.
getPropertyMapFromObject
in interface NamedConverter
example
- The object to find bean info fromreadRequired
- The properties returned must be readablewriteRequired
- The properties returned must be writeable
MarshallException
- If the introspection failsNamedConverter.getPropertyMapFromClass(Class, boolean, boolean)
public java.util.Map getPropertyMapFromClass(java.lang.Class type, boolean readRequired, boolean writeRequired)
NamedConverter
Property
.
HibernateBeanConverter (and maybe others) may want to provide alternate versions of bean.getClass(), and we may wish to fake or hide properties in some cases.
If you have a real object to investigate then it is probably better
to call NamedConverter.getPropertyMapFromObject(Object, boolean, boolean)
because that version can take into accound extra runtime type info.
getPropertyMapFromClass
in interface NamedConverter
type
- The class to find bean info fromreadRequired
- The properties returned must be readablewriteRequired
- The properties returned must be writeable
NamedConverter.getPropertyMapFromObject(Object, boolean, boolean)
protected TypeHintContext createTypeHintContext(InboundContext inctx, Property property)
BasicObjectConverter
BasicObjectConverter.convertInbound(Class, InboundVariable, InboundContext)
needs to
create a TypeHintContext
for the Property
it is
converting so that the type guessing system can do its work.
The method of generating a TypeHintContext
is different for
the BeanConverter
and the ObjectConverter
.
createTypeHintContext
in class BasicObjectConverter
inctx
- The parent contextproperty
- The property being converted
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |