org.directwebremoting.extend
Interface NamedConverter

All Superinterfaces:
Converter
All Known Implementing Classes:
BasicObjectConverter, BeanConverter, ExceptionConverter, H2BeanConverter, H3BeanConverter, MinimalistExceptionConverter, ObjectConverter

public interface NamedConverter
extends Converter

Additions to Converter that allow objects to have names that

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Method Summary
 java.lang.Class getInstanceType()
           
 java.lang.String getJavascript()
          Accessor for the javascript class name for the converted objects.
 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 setInstanceType(java.lang.Class instanceType)
           
 void setJavascript(java.lang.String javascript)
          Accessor for the javascript class name for the converted objects.
 
Methods inherited from interface org.directwebremoting.extend.Converter
convertInbound, convertOutbound, setConverterManager
 

Method Detail

getPropertyMapFromObject

java.util.Map getPropertyMapFromObject(java.lang.Object example,
                                       boolean readRequired,
                                       boolean writeRequired)
                                       throws MarshallException
Get a map of property names to implementations of 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: getPropertyMapFromClass(Class, boolean, boolean) because it potentially retains important extra type information.

Parameters:
example - The object to find bean info from
readRequired - The properties returned must be readable
writeRequired - The properties returned must be writeable
Returns:
An array of PropertyDescriptors describing the beans properties
Throws:
MarshallException - If the introspection fails
See Also:
getPropertyMapFromClass(Class, boolean, boolean)

getPropertyMapFromClass

java.util.Map getPropertyMapFromClass(java.lang.Class type,
                                      boolean readRequired,
                                      boolean writeRequired)
                                      throws MarshallException
Get a map of property names to implementations of 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 getPropertyMapFromObject(Object, boolean, boolean) because that version can take into accound extra runtime type info.

Parameters:
type - The class to find bean info from
readRequired - The properties returned must be readable
writeRequired - The properties returned must be writeable
Returns:
An array of PropertyDescriptors describing the beans properties
Throws:
MarshallException - If the introspection fails
See Also:
getPropertyMapFromObject(Object, boolean, boolean)

getInstanceType

java.lang.Class getInstanceType()
Returns:
Returns the instanceType.

setInstanceType

void setInstanceType(java.lang.Class instanceType)
Parameters:
instanceType - The instanceType to set.

getJavascript

java.lang.String getJavascript()
Accessor for the javascript class name for the converted objects.

Returns:
The Javascript name

setJavascript

void setJavascript(java.lang.String javascript)
Accessor for the javascript class name for the converted objects.

Parameters:
javascript - The Javascript name