|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Type
The Type
object describes a type that is represented
by an XML element. This enables a Strategy
to define
not only the type an element represents, but also defines how that
type can be created. This allows objects that do not have default
no argument constructors to be created during deserialization.
Typically the getInstance
method acts as a proxy to
the classes new instance method, which takes no arguments. Simply
delegating to Class.newInstance
will sometimes not
be sufficient, is such cases reflectively acquiring the classes
constructor may be required in order to pass arguments.
Strategy
Method Summary | |
---|---|
java.lang.Object |
getInstance()
This method is used to acquire an instance of the type that is defined by this object. |
java.lang.Object |
getInstance(java.lang.Class convert)
This method is used to acquire an instance of the type that is defined by this object. |
java.lang.Class |
getType()
This is the type of the object instance that will be created by the getInstance method. |
boolean |
isReference()
This is used to determine if the type is a reference type. |
Method Detail |
---|
boolean isReference()
java.lang.Object getInstance() throws java.lang.Exception
java.lang.Exception
java.lang.Object getInstance(java.lang.Class convert) throws java.lang.Exception
convert
- a suggestion to convert the internal value
java.lang.Exception
java.lang.Class getType()
getInstance
method. This allows the
deserialization process to perform checks against the field.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |