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.
METHOD_PREFIX_ADD
public static final String METHOD_PREFIX_ADD
Method prefixes for "Add" methods.
METHOD_PREFIX_DELETE
public static final String METHOD_PREFIX_DELETE
Method prefixes for "Delete" methods.
METHOD_PREFIX_GET
public static final String METHOD_PREFIX_GET
Method prefixes for "Get" methods.
METHOD_PREFIX_HAS
public static final String METHOD_PREFIX_HAS
Method prefixes for "Has" methods.
METHOD_PREFIX_IS
public static final String METHOD_PREFIX_IS
Method prefixes for "Is" methods.
METHOD_PREFIX_SET
public static final String METHOD_PREFIX_SET
Method prefixes for "Set" methods.
READ_METHOD
public static final int READ_METHOD
The Read / Getter method flag.
READ_WRITE_METHODS
public static final int READ_WRITE_METHODS
The Read and Write methods flags.
WRITE_METHOD
public static final int WRITE_METHOD
The Write / Setter method flag.
getComment
public final String getComment()
Returns the comment associated with this Member.
- the comment associated with this Member, or null.
if one has not been set.
getDeclaringClassInfo
public final ClassInfo getDeclaringClassInfo()
Returns the ClassInfo to which this Member was declared, for inheritance reasons.
- the ClassInfo to which this Member was declared.
getDefaultValue
public final String getDefaultValue()
getDeleteMethodName
public final String getDeleteMethodName()
Returns the name of the delete method for this FieldInfo.
- the name of the delete method for this FieldInfo.
getFieldInfoReference
public FieldInfo getFieldInfoReference()
getFixedValue
public final String getFixedValue()
Returns the fixed production for this FieldInfo, or null if no fixed
value has been specified.
NOTE: Fixed values are NOT the same as default values
- the fixed value for this FieldInfo
getHasMethodName
public final String getHasMethodName()
Returns the name of the has method for this FieldInfo.
- the name of the has method for this FieldInfo.
getMemberAndAccessorFactory
public FieldMemberAndAccessorFactory getMemberAndAccessorFactory()
Returns the FieldMemberAndAccessorFactory instance to use to create
a JField out of this FieldInfo.
- the suitable FieldMemberAndAccessorFactory
getMethodSuffix
public String getMethodSuffix()
Returns the method suffix for creating method names.
- the method suffix used when creating method names.
getMethods
public final int getMethods()
Returns the methods flag that indicates which.
methods will be created.
getName
public final String getName()
Returns the name of this FieldInfo.
- the name of this FieldInfo.
getReadMethodName
public final String getReadMethodName()
Returns the name of the read method for this FieldInfo.
- the name of the read method for this FieldInfo.
getSubstitutionGroupMembers
public List getSubstitutionGroupMembers()
Returns the possible substitution groups for this class.
- the possible substitution groups for this class.
getValidator
public final String getValidator()
Returns the fully qualified name of the Validator to use.
- the fully qualified name of the Validator to use.
getVisibility
public Object getVisibility()
getWriteMethodName
public final String getWriteMethodName()
Returns the name of the write method for this FieldInfo.
- the name of the write method for this FieldInfo.
getXMLFieldHandler
public final String getXMLFieldHandler()
Returns the fully qualified name of the XMLFieldHandler to use.
- the fully qualified name of the XMLFieldHandler to use.
isBound
public final boolean isBound()
Returns true if this FieldInfo represents a bound property.
- true if this FieldInfo represents a bound property.
isContainer
public final boolean 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.
- true if this ClassInfo describes a container class.
isFinal
public boolean isFinal()
isHasAndDeleteMethods
public final boolean isHasAndDeleteMethods()
Returns true if the "has" and "delete" methods are needed for the field
associated with this FieldInfo.
- true if the has and delete methods are needed.
isNillable
public final boolean 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).
- true if nillable, otherwise false.
isStatic
public boolean isStatic()
isTransient
public final boolean isTransient()
Returns true if this FieldInfo is a transient member. Transient members
are members which should be ignored by the Marshalling framework.
- true if this FieldInfo is transient.
setBound
public final void setBound(boolean bound)
Sets whether or not this FieldInfo represents a bound property.
bound
- the flag when true indicates that this FieldInfo represents a
bound property.
setComment
public final void setComment(String comment)
Sets the comment for this Member.
comment
- the comment or description for this Member
setContainer
public final void 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.
isContainer
- the boolean value when true indicates this class should be a
container class.
setDeclaringClassInfo
public final void setDeclaringClassInfo(ClassInfo declaringClassInfo)
setDefaultValue
public final void setDefaultValue(String defaultValue)
Sets the default value for this FieldInfo.
defaultValue
- the default value
setFieldInfoReference
public final void setFieldInfoReference(FieldInfo fieldInfo)
Sets the name of the field within the same class that is a reference to
this field.
setFinal
public final void setFinal(boolean isFinal)
Sets the "final" status of this FieldInfo. Final members are also
transient.
isFinal
- the boolean indicating the final status, if true this
FieldInfo will be treated as final.
setFixedValue
public final void setFixedValue(String fixedValue)
Sets the fixed value in which instances of this field type must lexically
match. NOTE: This is not the same as default value!
fixedValue
- the fixed production for this FieldInfo
setMethods
public final void setMethods(int methods)
Sets which methods to create: READ_METHOD, WRITE_METHOD,
READ_WRITE_METHODS.
methods
- a flag describing which methods to create.
setNillable
public final void setNillable(boolean nillable)
Sets whether or not this field can be nillable.
nillable
- a boolean that when true means the field may be nil.
setStatic
public final void setStatic(boolean isStatic)
Sets the "static" status of this FieldInfo. Static members are also
transient.
isStatic
- the boolean indicating the static status, if true this
FieldInfo will be treated as static
setSubstitutionGroupMembers
public void setSubstitutionGroupMembers(List substitutionGroupMembers)
Sets the possible substitution groups for this class.
substitutionGroupMembers
- Possible substitution groups for this class.
setTransient
public final void setTransient(boolean isTransient)
Sets the transient status of this FieldInfo.
isTransient
- the boolean indicating the transient status, if true this
FieldInfo will be treated as transient
setValidator
public final void setValidator(String validator)
Sets the name of the Validator to use.
validator
- the fully qualified name of the validator to use.
setVisibility
public final void setVisibility(String visibility)
Sets the visibility of this FieldInfo.
visibility
- the visibility of this FieldInfo.
setXMLFieldHandler
public final void setXMLFieldHandler(String handler)
Sets the name of the XMLfieldHandler to use.
handler
- the fully qualified name of the handler to use.