Public Member Functions | Protected Member Functions

org.exolab.castor.builder.FieldInfo Class Reference

Inheritance diagram for org.exolab.castor.builder.FieldInfo:
org.exolab.castor.builder.XMLInfo org.exolab.castor.builder.CollectionInfo org.exolab.castor.builder.IdentityInfo org.exolab.castor.builder.CollectionInfoJ2 org.exolab.castor.builder.CollectionInfoODMG30

List of all members.

Public Member Functions

 FieldInfo (XSType type, String name)
void createJavaField (JClass jClass)
void createAccessMethods (JClass jClass)
void createGetterComment (JDocComment jDocComment)
void createSetterComment (JDocComment jDocComment)
String getDefaultValue ()
String getFixedValue ()
String getDeleteMethodName ()
String getHasMethodName ()
String getReadMethodName ()
String getValidator ()
String getWriteMethodName ()
String getXMLFieldHandler ()
void generateInitializerCode (JSourceCode jsc)
String getComment ()
String getName ()
boolean isBound ()
boolean isContainer ()
boolean isNillable ()
boolean isTransient ()
void setComment (String comment)
ClassInfo getDeclaringClassInfo ()
void setBound (boolean bound)
void setContainer (boolean isContainer)
void setDeclaringClassInfo (ClassInfo declaringClassInfo)
void setDefaultValue (String defaultValue)
void setFinal (boolean isFinal)
void setFixedValue (String fixedValue)
void setNillable (boolean nillable)
void setStatic (boolean isStatic)
void setTransient (boolean isTransient)
void setValidator (String validator)
void setXMLFieldHandler (String handler)

Protected Member Functions

String methodSuffix ()

Detailed Description

A class for representing field members of a Class. FieldInfo objects hold all the information required about a member in order to be able to produce marshal/unmarshal and validation code.

Author:
Keith Visco
Version:
Revision:
1.8
Date:
2004/09/17 06:31:26

Constructor & Destructor Documentation

org.exolab.castor.builder.FieldInfo.FieldInfo ( XSType  type,
String  name 
)

Creates a new FieldInfo with the given XML Schema type and the given member name

Parameters:
XSType the XML Schema type of this member
name the name of the member

References org.exolab.castor.builder.XMLInfo.setSchemaType().

Referenced by org.exolab.castor.builder.CollectionInfo.CollectionInfo().


Member Function Documentation

void org.exolab.castor.builder.FieldInfo.createGetterComment ( JDocComment  jDocComment  ) 

Creates the Javadoc comments for the getter method associated with this FieldInfo.

Parameters:
jDocComment the JDocComment to add the Javadoc comments to.

References org.exolab.javasource.JDocComment.addDescriptor(), and org.exolab.javasource.JDocComment.setComment().

Referenced by org.exolab.castor.builder.FieldInfo.createAccessMethods().

void org.exolab.castor.builder.FieldInfo.createSetterComment ( JDocComment  jDocComment  ) 
String org.exolab.castor.builder.FieldInfo.getComment (  ) 

Returns the comment associated with this Member

Returns:
the comment associated with this Member, or null if one has not been set.
ClassInfo org.exolab.castor.builder.FieldInfo.getDeclaringClassInfo (  ) 

Returns the ClassInfo to which this Member was declared, for inheritance reasons

String org.exolab.castor.builder.FieldInfo.getDefaultValue (  ) 

Returns the default value for this FieldInfo

Returns:
the default value for this FieldInfo, or null if no default value was set;

Referenced by org.exolab.castor.builder.FieldInfo.generateInitializerCode().

String org.exolab.castor.builder.FieldInfo.getDeleteMethodName (  ) 

Returns the name of the delete method for this FieldInfo.

Returns:
the name of the delete method for this FieldInfo

References org.exolab.castor.builder.FieldInfo.methodSuffix().

String org.exolab.castor.builder.FieldInfo.getFixedValue (  ) 

Returns the fixed production for this FieldInfo, or null if no fixed value has been specified.

Returns:
the fixed value for this FieldInfo
NOTE: Fixed values are NOT the same as default values

Referenced by org.exolab.castor.builder.FieldInfo.generateInitializerCode().

String org.exolab.castor.builder.FieldInfo.getHasMethodName (  ) 

Returns the name of the has method for this FieldInfo

Returns:
the name of the has method for this FieldInfo

References org.exolab.castor.builder.FieldInfo.methodSuffix().

String org.exolab.castor.builder.FieldInfo.getName (  ) 

Returns the name of this FieldInfo

Returns:
the name of this FieldInfo

Referenced by org.exolab.castor.builder.IdentityInfo.createAccessMethods(), org.exolab.castor.builder.FieldInfo.createAccessMethods(), org.exolab.castor.builder.CollectionInfoODMG30.createAddInsertMethod(), org.exolab.castor.builder.CollectionInfoJ2.createAddInsertMethod(), org.exolab.castor.builder.CollectionInfo.createAddInsertMethod(), org.exolab.castor.builder.CollectionInfoODMG30.createAddMethod(), org.exolab.castor.builder.CollectionInfoJ2.createAddMethod(), org.exolab.castor.builder.CollectionInfo.createAddMethod(), org.exolab.castor.builder.CollectionInfo.createBoundPropertyCode(), org.exolab.castor.builder.CollectionInfoJ2.createClearMethod(), org.exolab.castor.builder.CollectionInfoODMG30.createEnumerateMethod(), org.exolab.castor.builder.CollectionInfoJ2.createEnumerateMethod(), org.exolab.castor.builder.CollectionInfo.createEnumerateMethod(), org.exolab.castor.builder.CollectionInfoODMG30.createGetByIndexMethod(), org.exolab.castor.builder.CollectionInfoJ2.createGetByIndexMethod(), org.exolab.castor.builder.CollectionInfo.createGetByIndexMethod(), org.exolab.castor.builder.CollectionInfoJ2.createGetCollectionReferenceMethod(), org.exolab.castor.builder.CollectionInfo.createGetCollectionReferenceMethod(), org.exolab.castor.builder.CollectionInfo.createGetCountMethod(), org.exolab.castor.builder.CollectionInfoODMG30.createGetMethod(), org.exolab.castor.builder.CollectionInfoJ2.createGetMethod(), org.exolab.castor.builder.CollectionInfo.createGetMethod(), org.exolab.castor.builder.CollectionInfoODMG30.createRemoveAllMethod(), org.exolab.castor.builder.CollectionInfoJ2.createRemoveAllMethod(), org.exolab.castor.builder.CollectionInfo.createRemoveAllMethod(), org.exolab.castor.builder.CollectionInfoODMG30.createRemoveByIndexMethod(), org.exolab.castor.builder.CollectionInfoJ2.createRemoveByIndexMethod(), org.exolab.castor.builder.CollectionInfo.createRemoveByIndexMethod(), org.exolab.castor.builder.CollectionInfoJ2.createRemoveByObjectMethod(), org.exolab.castor.builder.CollectionInfo.createRemoveByObjectMethod(), org.exolab.castor.builder.CollectionInfoJ2.createRemoveMethod(), org.exolab.castor.builder.CollectionInfoODMG30.createSetArrayMethod(), org.exolab.castor.builder.CollectionInfoJ2.createSetArrayMethod(), org.exolab.castor.builder.CollectionInfo.createSetArrayMethod(), org.exolab.castor.builder.CollectionInfoODMG30.createSetByIndexMethod(), org.exolab.castor.builder.CollectionInfoJ2.createSetByIndexMethod(), org.exolab.castor.builder.CollectionInfo.createSetByIndexMethod(), org.exolab.castor.builder.CollectionInfoJ2.createSetCollectionMethod(), org.exolab.castor.builder.CollectionInfo.createSetCollectionMethod(), org.exolab.castor.builder.CollectionInfoJ2.createSetCollectionReferenceMethod(), org.exolab.castor.builder.CollectionInfo.createSetCollectionReferenceMethod(), org.exolab.castor.builder.CollectionInfoODMG30.generateInitializerCode(), org.exolab.castor.builder.CollectionInfoJ2.generateInitializerCode(), org.exolab.castor.builder.CollectionInfo.generateInitializerCode(), and org.exolab.castor.builder.CollectionInfo.getReadMethod().

String org.exolab.castor.builder.FieldInfo.getReadMethodName (  ) 

Returns the name of the read method for this FieldInfo

Returns:
the name of the read method for this FieldInfo

Reimplemented in org.exolab.castor.builder.CollectionInfo.

References org.exolab.castor.builder.FieldInfo.methodSuffix().

String org.exolab.castor.builder.FieldInfo.getValidator (  ) 

Returns the fully qualified name of the Validator to use.

Returns:
the fully qualified name of the Validator to use.
String org.exolab.castor.builder.FieldInfo.getWriteMethodName (  ) 

Returns the name of the write method for this FieldInfo

Returns:
the name of the write method for this FieldInfo

Reimplemented in org.exolab.castor.builder.CollectionInfo.

References org.exolab.castor.builder.XMLInfo.isMultivalued(), and org.exolab.castor.builder.FieldInfo.methodSuffix().

String org.exolab.castor.builder.FieldInfo.getXMLFieldHandler (  ) 

Returns the fully qualified name of the XMLFieldHandler to use.

Returns:
the fully qualified name of the XMLFieldHandler to use.
boolean org.exolab.castor.builder.FieldInfo.isBound (  ) 

Returns true if this FieldInfo represents a bound property

Returns:
true if this FieldInfo represents a bound property

Referenced by org.exolab.castor.builder.CollectionInfoODMG30.createAddInsertMethod(), org.exolab.castor.builder.CollectionInfoJ2.createAddInsertMethod(), org.exolab.castor.builder.CollectionInfo.createAddInsertMethod(), org.exolab.castor.builder.CollectionInfoJ2.createAddMethod(), org.exolab.castor.builder.CollectionInfo.createAddMethod(), org.exolab.castor.builder.CollectionInfoJ2.createClearMethod(), org.exolab.castor.builder.CollectionInfoJ2.createRemoveAllMethod(), org.exolab.castor.builder.CollectionInfo.createRemoveAllMethod(), org.exolab.castor.builder.CollectionInfoJ2.createRemoveByIndexMethod(), org.exolab.castor.builder.CollectionInfo.createRemoveByIndexMethod(), org.exolab.castor.builder.CollectionInfoJ2.createRemoveByObjectMethod(), org.exolab.castor.builder.CollectionInfo.createRemoveByObjectMethod(), org.exolab.castor.builder.CollectionInfoJ2.createRemoveMethod(), org.exolab.castor.builder.CollectionInfoODMG30.createSetArrayMethod(), org.exolab.castor.builder.CollectionInfoJ2.createSetArrayMethod(), org.exolab.castor.builder.CollectionInfo.createSetArrayMethod(), org.exolab.castor.builder.CollectionInfoJ2.createSetByIndexMethod(), org.exolab.castor.builder.CollectionInfo.createSetByIndexMethod(), org.exolab.castor.builder.CollectionInfoJ2.createSetCollectionMethod(), org.exolab.castor.builder.CollectionInfo.createSetCollectionMethod(), org.exolab.castor.builder.CollectionInfoJ2.createSetCollectionReferenceMethod(), and org.exolab.castor.builder.CollectionInfo.createSetCollectionReferenceMethod().

boolean org.exolab.castor.builder.FieldInfo.isContainer (  ) 

Returns true if this FieldInfo describes a container class. A container class is a class which should not be marshalled as XML, but whose members should be.

Returns:
true if this ClassInfo describes a container class.
boolean org.exolab.castor.builder.FieldInfo.isNillable (  ) 

Returns true if this field represents a nillable field. A nillable field is a field that can have null content (see XML Schema 1.0 definition of nillable).

Returns:
true if nillable, otherwise false.
See also:
setNillable(boolean)
boolean org.exolab.castor.builder.FieldInfo.isTransient (  ) 

Returns true if this FieldInfo is a transient member. Transient members are members which should be ignored by the Marshalling framework

Returns:
true if this FieldInfo is transient

Referenced by org.exolab.castor.builder.DescriptorSourceFactory.createSource().

void org.exolab.castor.builder.FieldInfo.setBound ( boolean  bound  ) 

Sets whether or not this FieldInfo represents a bound property

Parameters:
bound the flag when true indicates that this FieldInfo represents a bound property

Referenced by org.exolab.castor.builder.FieldInfoFactory.createCollection(), org.exolab.castor.builder.FieldInfoFactory.createFieldInfo(), and org.exolab.castor.builder.FieldInfoFactory.createIdentity().

void org.exolab.castor.builder.FieldInfo.setComment ( String  comment  ) 

Sets the comment for this Member

Parameters:
comment the comment or description for this Member

Referenced by org.exolab.castor.builder.MemberFactory.createFieldInfo(), and org.exolab.castor.builder.MemberFactory.createFieldInfoForContent().

void org.exolab.castor.builder.FieldInfo.setContainer ( boolean  isContainer  ) 

Sets whether or not this FieldInfo describes a container field. A container field is a field which should not be marshalled directly as XML, but whose members should be. By default this is false.

Parameters:
isContainer the boolean value when true indicates this class should be a container class.

Referenced by org.exolab.castor.builder.MemberFactory.createFieldInfo(), and org.exolab.castor.builder.SourceFactory.createSourceCode().

void org.exolab.castor.builder.FieldInfo.setDeclaringClassInfo ( ClassInfo  declaringClassInfo  ) 
void org.exolab.castor.builder.FieldInfo.setDefaultValue ( String  defaultValue  ) 

Sets the default value for this FieldInfo

Parameters:
defaultValue the default value

Referenced by org.exolab.castor.builder.MemberFactory.createFieldInfo(), and org.exolab.castor.builder.MemberFactory.createFieldInfoForContent().

void org.exolab.castor.builder.FieldInfo.setFinal ( boolean  isFinal  ) 

Sets the "final" status of this FieldInfo. Final members are also transient.

Parameters:
isFinal the boolean indicating the final status, if true this FieldInfo will be treated as final.
void org.exolab.castor.builder.FieldInfo.setFixedValue ( String  fixedValue  ) 

Sets the fixed value in which instances of this field type must lexically match

Parameters:
fixedValue the fixed production for this FieldInfo
NOTE: This is not the same as default value!

Referenced by org.exolab.castor.builder.MemberFactory.createFieldInfo().

void org.exolab.castor.builder.FieldInfo.setNillable ( boolean  nillable  ) 

Sets whether or not this field can be nillable.

Parameters:
nillable a boolean that when true means the field may be nil.
See also:
isNillable()

Referenced by org.exolab.castor.builder.MemberFactory.createFieldInfo().

void org.exolab.castor.builder.FieldInfo.setStatic ( boolean  isStatic  ) 

Sets the "static" status of this FieldInfo. Static members are also transient.

Parameters:
isStatic the boolean indicating the static status, if true this FieldInfo will be treated as static
void org.exolab.castor.builder.FieldInfo.setTransient ( boolean  isTransient  ) 

Sets the transient status of this FieldInfo.

Parameters:
isTransient the boolean indicating the transient status, if true this FieldInfo will be treated as transient
void org.exolab.castor.builder.FieldInfo.setValidator ( String  validator  ) 

Sets the name of the Validator to use.

Parameters:
validator the fully qualified name of the validator to use.

Referenced by org.exolab.castor.builder.MemberFactory.createFieldInfo().

void org.exolab.castor.builder.FieldInfo.setXMLFieldHandler ( String  handler  ) 

Sets the name of the XMLfieldHandler to use.

Parameters:
handler the fully qualified name of the handler to use.

Referenced by org.exolab.castor.builder.MemberFactory.createFieldInfo().


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