Public Member Functions | Package Functions

org.exolab.castor.mapping.loader.TypeInfo Class Reference

List of all members.

Public Member Functions

 TypeInfo (Class fieldType)
 TypeInfo (Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, boolean required, Object defaultValue, CollectionHandler colHandler)
 TypeInfo (Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, String convertorParam, boolean required, Object defaultValue, CollectionHandler colHandler)
 TypeInfo (Class fieldType, TypeConvertor convertorTo, TypeConvertor convertorFrom, String convertorParam, boolean required, Object defaultValue, CollectionHandler colHandler, boolean checkForCollection)
Class getFieldType ()
TypeConvertor getConvertorTo ()
TypeConvertor getConvertorFrom ()
String getConvertorParam ()
boolean isImmutable ()
boolean isRequired ()
Object getDefaultValue ()
CollectionHandler getCollectionHandler ()
void setRequired (boolean required)
void setCollectionHandler (CollectionHandler handler)

Package Functions

void setImmutable (boolean immutable)

Detailed Description

Type information passed on creation of a FieldHandlerImpl.

Author:
Assaf Arkin
Version:
Revision:
1.4
Date:
2005/01/17 21:37:01

Constructor & Destructor Documentation

org.exolab.castor.mapping.loader.TypeInfo.TypeInfo ( Class  fieldType  ) 

Construct new type information for a field. This field requires no type conversion, and has no default value.

Parameters:
fieldType The field type
org.exolab.castor.mapping.loader.TypeInfo.TypeInfo ( Class  fieldType,
TypeConvertor  convertorTo,
TypeConvertor  convertorFrom,
boolean  required,
Object  defaultValue,
CollectionHandler  colHandler 
)

Construct new type information for the field.

Parameters:
fieldType The field type
convertorTo Convertor to the field type from external type, or null if no conversion is required
convertorFrom Convertor from the field type to external type, or null if no conversion is required
required True if the field is required
defaultValue The default value of the field, null to use the known Java defaults
colType The collection type for this field, or null if field is singular
org.exolab.castor.mapping.loader.TypeInfo.TypeInfo ( Class  fieldType,
TypeConvertor  convertorTo,
TypeConvertor  convertorFrom,
String  convertorParam,
boolean  required,
Object  defaultValue,
CollectionHandler  colHandler 
)

Construct new type information for the field.

Parameters:
fieldType The field type
convertorTo Convertor to the field type from external type, or null if no conversion is required
convertorFrom Convertor from the field type to external type, or null if no conversion is required
convertorParam Optional parameter for the convertor, or null if either no conversion is required or no parameter is specified
required True if the field is required
defaultValue The default value of the field, null to use the known Java defaults
colHandler The collection handler for this field, or null if field is singular
org.exolab.castor.mapping.loader.TypeInfo.TypeInfo ( Class  fieldType,
TypeConvertor  convertorTo,
TypeConvertor  convertorFrom,
String  convertorParam,
boolean  required,
Object  defaultValue,
CollectionHandler  colHandler,
boolean  checkForCollection 
)

Construct new type information for the field.

Parameters:
fieldType The field type
convertorTo Convertor to the field type from external type, or null if no conversion is required
convertorFrom Convertor from the field type to external type, or null if no conversion is required
convertorParam Optional parameter for the convertor, or null if either no conversion is required or no parameter is specified
required True if the field is required
defaultValue The default value of the field, null to use the known Java defaults
colHandler The collection handler for this field, or null if field is singular

Member Function Documentation

CollectionHandler org.exolab.castor.mapping.loader.TypeInfo.getCollectionHandler (  ) 

Return the collection handler of this field.

Returns:
The collection handler of this field

Referenced by org.exolab.castor.mapping.loader.MappingLoader.createFieldDesc().

TypeConvertor org.exolab.castor.mapping.loader.TypeInfo.getConvertorFrom (  ) 

Returns the convertor from the field type to an external type.

Returns:
Convertor from field type
String org.exolab.castor.mapping.loader.TypeInfo.getConvertorParam (  ) 

Returns the convertor parameter.

Returns:
Convertor parameter
TypeConvertor org.exolab.castor.mapping.loader.TypeInfo.getConvertorTo (  ) 

Returns the convertor to the field type from an external type.

Returns:
Convertor to field type
Object org.exolab.castor.mapping.loader.TypeInfo.getDefaultValue (  ) 

Returns the default value for the field.

Returns:
The default value
Class org.exolab.castor.mapping.loader.TypeInfo.getFieldType (  ) 

Returns the field type.

Returns:
The field type
boolean org.exolab.castor.mapping.loader.TypeInfo.isImmutable (  ) 

Returns true if field type is immutable.

Returns:
True if type is immutable
boolean org.exolab.castor.mapping.loader.TypeInfo.isRequired (  ) 

Returns true if field type is required.

Returns:
True if field is required
void org.exolab.castor.mapping.loader.TypeInfo.setCollectionHandler ( CollectionHandler  handler  ) 

Sets the CollectionHandler to use for the field described by this TypeInfo.

Parameters:
handler the CollectionHandler, or null if no CollectionHandler should be used.

Referenced by org.exolab.castor.mapping.loader.MappingLoader.createFieldDesc().

void org.exolab.castor.mapping.loader.TypeInfo.setImmutable ( boolean  immutable  )  [package]

Sets whether or not the type is immutable

Parameters:
immutable a boolean that when true indicates the type is immutable
void org.exolab.castor.mapping.loader.TypeInfo.setRequired ( boolean  required  ) 

Sets a flag indictating if the field is required.

Parameters:
required the value of the flag. Should be true if the field is required, false otherwise.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties