|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.mapping.loader.TypeInfo
public class TypeInfo
Type information passed on creation of a FieldHandlerImpl
.
Constructor Summary | |
---|---|
TypeInfo(java.lang.Class fieldType)
Construct new type information for a field. |
|
TypeInfo(java.lang.Class fieldType,
TypeConvertor convertorTo,
TypeConvertor convertorFrom,
boolean required,
java.lang.Object defaultValue,
CollectionHandler colHandler)
Construct new type information for the field. |
|
TypeInfo(java.lang.Class fieldType,
TypeConvertor convertorTo,
TypeConvertor convertorFrom,
java.lang.String convertorParam,
boolean required,
java.lang.Object defaultValue,
CollectionHandler colHandler)
Construct new type information for the field. |
|
TypeInfo(java.lang.Class fieldType,
TypeConvertor convertorTo,
TypeConvertor convertorFrom,
java.lang.String convertorParam,
boolean required,
java.lang.Object defaultValue,
CollectionHandler colHandler,
boolean checkForCollection)
Construct new type information for the field. |
Method Summary | |
---|---|
CollectionHandler |
getCollectionHandler()
Return the collection handler of this field. |
TypeConvertor |
getConvertorFrom()
Returns the convertor from the field type to an external type. |
java.lang.String |
getConvertorParam()
Returns the convertor parameter. |
TypeConvertor |
getConvertorTo()
Returns the convertor to the field type from an external type. |
java.lang.Object |
getDefaultValue()
Returns the default value for the field. |
java.lang.Class |
getFieldType()
Returns the field type. |
boolean |
isImmutable()
Returns true if field type is immutable. |
boolean |
isRequired()
Returns true if field type is required. |
void |
setCollectionHandler(CollectionHandler handler)
Sets the CollectionHandler to use for the field described by this TypeInfo. |
(package private) void |
setImmutable(boolean immutable)
Sets whether or not the type is immutable |
void |
setRequired(boolean required)
Sets a flag indictating if the field is required. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeInfo(java.lang.Class fieldType)
fieldType
- The field typepublic TypeInfo(java.lang.Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, boolean required, java.lang.Object defaultValue, CollectionHandler colHandler)
fieldType
- The field typeconvertorTo
- Convertor to the field type from external
type, or null if no conversion is requiredconvertorFrom
- Convertor from the field type to external
type, or null if no conversion is requiredrequired
- True if the field is requireddefaultValue
- The default value of the field, null to
use the known Java defaultscolHandler
- The collection handler for this field, or null if
field is singularpublic TypeInfo(java.lang.Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, java.lang.String convertorParam, boolean required, java.lang.Object defaultValue, CollectionHandler colHandler)
fieldType
- The field typeconvertorTo
- Convertor to the field type from external
type, or null if no conversion is requiredconvertorFrom
- Convertor from the field type to external
type, or null if no conversion is requiredconvertorParam
- Optional parameter for the convertor,
or null if either no conversion is required or no parameter is specifiedrequired
- True if the field is requireddefaultValue
- The default value of the field, null to
use the known Java defaultscolHandler
- The collection handler for this field, or null if
field is singularpublic TypeInfo(java.lang.Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, java.lang.String convertorParam, boolean required, java.lang.Object defaultValue, CollectionHandler colHandler, boolean checkForCollection)
fieldType
- The field typeconvertorTo
- Convertor to the field type from external
type, or null if no conversion is requiredconvertorFrom
- Convertor from the field type to external
type, or null if no conversion is requiredconvertorParam
- Optional parameter for the convertor,
or null if either no conversion is required or no parameter is specifiedrequired
- True if the field is requireddefaultValue
- The default value of the field, null to
use the known Java defaultscolHandler
- The collection handler for this field, or null if
field is singularMethod Detail |
---|
public java.lang.Class getFieldType()
public TypeConvertor getConvertorTo()
public TypeConvertor getConvertorFrom()
public java.lang.String getConvertorParam()
public boolean isImmutable()
public boolean isRequired()
public java.lang.Object getDefaultValue()
public CollectionHandler getCollectionHandler()
public void setRequired(boolean required)
required
- the value of the flag. Should be true if the
field is required, false otherwise.public void setCollectionHandler(CollectionHandler handler)
handler
- the CollectionHandler, or null if no
CollectionHandler should be used.void setImmutable(boolean immutable)
immutable
- a boolean that when true indicates the type
is immutable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |