NatureExtendable
, PropertyHolder
, XMLInfo
CollectionInfo
, IdentityInfo
public class FieldInfo extends java.lang.Object implements XMLInfo, PropertyHolder
Modifier and Type | Field | Description |
---|---|---|
protected static java.lang.String |
METHOD_PREFIX_ADD |
Method prefixes for "Add" methods.
|
protected static java.lang.String |
METHOD_PREFIX_DELETE |
Method prefixes for "Delete" methods.
|
protected static java.lang.String |
METHOD_PREFIX_GET |
Method prefixes for "Get" methods.
|
protected static java.lang.String |
METHOD_PREFIX_HAS |
Method prefixes for "Has" methods.
|
protected static java.lang.String |
METHOD_PREFIX_IS |
Method prefixes for "Is" methods.
|
protected static java.lang.String |
METHOD_PREFIX_SET |
Method prefixes for "Set" methods.
|
static int |
READ_METHOD |
The Read / Getter method flag.
|
static int |
READ_WRITE_METHODS |
The Read and Write methods flags.
|
static int |
WRITE_METHOD |
The Write / Setter method flag.
|
CHOICE_NODE_NAME_ERROR_INDICATION
Constructor | Description |
---|---|
FieldInfo(XSType type,
java.lang.String name,
FieldMemberAndAccessorFactory memberAndAccessorFactory) |
Creates a new FieldInfo with the given XML Schema type and the given
member name.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addNature(java.lang.String nature) |
Adds a specified nature.
|
java.lang.String |
getComment() |
Returns the comment associated with this Member.
|
ClassInfo |
getDeclaringClassInfo() |
Returns the ClassInfo to which this Member was declared, for inheritance reasons.
|
java.lang.String |
getDefaultValue() |
Returns the default value for this FieldInfo.
|
java.lang.String |
getDeleteMethodName() |
Returns the name of the delete method for this FieldInfo.
|
FieldInfo |
getFieldInfoReference() |
Returns the reference to the
FieldInfo instance within the same class. |
java.lang.String |
getFixedValue() |
Returns the fixed production for this FieldInfo, or null if no fixed
value has been specified.
|
java.lang.String |
getHasMethodName() |
Returns the name of the has method for this FieldInfo.
|
java.lang.String |
getIsMethodName() |
Get the 'is' method for this FieldInfo.
|
FieldMemberAndAccessorFactory |
getMemberAndAccessorFactory() |
Returns the FieldMemberAndAccessorFactory instance to use to create
a JField out of this FieldInfo.
|
int |
getMethods() |
Returns the methods flag that indicates which.
|
java.lang.String |
getMethodSuffix() |
Returns the method suffix for creating method names.
|
java.lang.String |
getName() |
Returns the name of this FieldInfo.
|
java.lang.Object |
getProperty(java.lang.String name) |
Get a property by its name.
|
java.lang.String |
getReadMethodName() |
Returns the name of the read method for this FieldInfo.
|
java.util.List<java.lang.String> |
getSubstitutionGroupMembers() |
Returns the possible substitution groups for this class.
|
java.lang.String |
getValidator() |
Returns the fully qualified name of the Validator to use.
|
java.lang.Object |
getVisibility() |
Returns this field's 'visibility'.
|
java.lang.String |
getWriteMethodName() |
Returns the name of the write method for this FieldInfo.
|
java.lang.String |
getXMLFieldHandler() |
Returns the fully qualified name of the XMLFieldHandler to use.
|
boolean |
hasNature(java.lang.String nature) |
Checks if a specified nature has been added.
|
boolean |
isBound() |
Returns true if this FieldInfo represents a bound property.
|
boolean |
isContainer() |
Returns true if this FieldInfo describes a container class.
|
boolean |
isFinal() |
Indicates whether this field is final.
|
boolean |
isNillable() |
Returns true if this field represents a nillable field.
|
boolean |
isStatic() |
Indicates whether this field is static.
|
boolean |
isTransient() |
Returns true if this FieldInfo is a transient member.
|
boolean |
requiresHasAndDeleteMethods() |
Returns true if the "has" and "delete" methods are needed for the field
associated with this FieldInfo.
|
void |
setBound(boolean bound) |
Sets whether or not this FieldInfo represents a bound property.
|
void |
setComment(java.lang.String comment) |
Sets the comment for this Member.
|
void |
setContainer(boolean isContainer) |
Sets whether or not this FieldInfo describes a container field.
|
void |
setDeclaringClassInfo(ClassInfo declaringClassInfo) |
Sets the
ClassInfo of the class that declares this field. |
void |
setDefaultValue(java.lang.String defaultValue) |
Sets the default value for this FieldInfo.
|
void |
setFieldInfoReference(FieldInfo fieldInfo) |
Sets the name of the field within the same class that is a reference to
this field.
|
void |
setFinal(boolean isFinal) |
Sets the "final" status of this FieldInfo.
|
void |
setFixedValue(java.lang.String fixedValue) |
Sets the fixed value in which instances of this field type must lexically
match.
|
void |
setMethods(int methods) |
Sets which methods to create: READ_METHOD, WRITE_METHOD,
READ_WRITE_METHODS.
|
void |
setNillable(boolean nillable) |
Sets whether or not this field can be nillable.
|
void |
setProperty(java.lang.String name,
java.lang.Object value) |
Set a property specified by the name to the passed value.
|
void |
setStatic(boolean isStatic) |
Sets the "static" status of this FieldInfo.
|
void |
setSubstitutionGroupMembers(java.util.List<java.lang.String> substitutionGroupMembers) |
Sets the possible substitution groups for this class.
|
void |
setTransient(boolean isTransient) |
Sets the transient status of this FieldInfo.
|
void |
setValidator(java.lang.String validator) |
Sets the name of the Validator to use.
|
void |
setVisibility(java.lang.String visibility) |
Sets the visibility of this FieldInfo.
|
void |
setXMLFieldHandler(java.lang.String handler) |
Sets the name of the XMLfieldHandler to use.
|
public static final int READ_METHOD
public static final int WRITE_METHOD
public static final int READ_WRITE_METHODS
protected static final java.lang.String METHOD_PREFIX_ADD
protected static final java.lang.String METHOD_PREFIX_DELETE
protected static final java.lang.String METHOD_PREFIX_GET
protected static final java.lang.String METHOD_PREFIX_HAS
protected static final java.lang.String METHOD_PREFIX_SET
protected static final java.lang.String METHOD_PREFIX_IS
public FieldInfo(XSType type, java.lang.String name, FieldMemberAndAccessorFactory memberAndAccessorFactory)
XMLInfoNature
for legacy compliance.type
- the XML Schema type of this membername
- the name of the membermemberAndAccessorFactory
- the FieldMemberAndAccessorFactory to be usedpublic FieldMemberAndAccessorFactory getMemberAndAccessorFactory()
public final java.lang.String getDefaultValue()
public final java.lang.String getFixedValue()
NOTE: Fixed values are NOT the same as default values
public final java.lang.String getDeleteMethodName()
public final java.lang.String getHasMethodName()
public final java.lang.String getReadMethodName()
public final java.lang.String getValidator()
public final java.lang.String getWriteMethodName()
public final java.lang.String getIsMethodName()
public final java.lang.String getXMLFieldHandler()
public final java.lang.String getComment()
public final int getMethods()
public final java.lang.String getName()
public final boolean isBound()
public final boolean isContainer()
public final boolean requiresHasAndDeleteMethods()
public final boolean isNillable()
setNillable(boolean)
public final boolean isTransient()
public final void setComment(java.lang.String comment)
comment
- the comment or description for this Memberpublic final ClassInfo getDeclaringClassInfo()
public final void setBound(boolean bound)
bound
- the flag when true indicates that this FieldInfo represents a
bound property.public final void setContainer(boolean isContainer)
isContainer
- the boolean value when true indicates this class should be a
container class.public final void setDeclaringClassInfo(ClassInfo declaringClassInfo)
ClassInfo
of the class that declares this field.declaringClassInfo
- The ClassInfo
of the declaring class.public final void setDefaultValue(java.lang.String defaultValue)
defaultValue
- the default valuepublic final void setFinal(boolean isFinal)
isFinal
- the boolean indicating the final status, if true this
FieldInfo will be treated as final.public final void setFixedValue(java.lang.String fixedValue)
fixedValue
- the fixed production for this FieldInfopublic final void setMethods(int methods)
methods
- a flag describing which methods to create.public final void setNillable(boolean nillable)
nillable
- a boolean that when true means the field may be nil.isNillable()
public final void setFieldInfoReference(FieldInfo fieldInfo)
fieldInfo
- FieldInfo
for the referencing field (within the same class).public final void setStatic(boolean isStatic)
isStatic
- the boolean indicating the static status, if true this
FieldInfo will be treated as staticpublic final void setTransient(boolean isTransient)
isTransient
- the boolean indicating the transient status, if true this
FieldInfo will be treated as transientpublic final void setValidator(java.lang.String validator)
validator
- the fully qualified name of the validator to use.public final void setXMLFieldHandler(java.lang.String handler)
handler
- the fully qualified name of the handler to use.public java.lang.String getMethodSuffix()
public final void setVisibility(java.lang.String visibility)
visibility
- the visibility of this FieldInfo.public void setSubstitutionGroupMembers(java.util.List<java.lang.String> substitutionGroupMembers)
substitutionGroupMembers
- Possible substitution groups for this class.public java.util.List<java.lang.String> getSubstitutionGroupMembers()
public boolean isStatic()
public boolean isFinal()
public java.lang.Object getVisibility()
public FieldInfo getFieldInfoReference()
FieldInfo
instance within the same class.FieldInfo
instancepublic final java.lang.Object getProperty(java.lang.String name)
PropertyHolder
getProperty
in interface PropertyHolder
name
- of the propertypublic final void setProperty(java.lang.String name, java.lang.Object value)
PropertyHolder
setProperty
in interface PropertyHolder
name
- of the propertyvalue
- of the propertypublic final void addNature(java.lang.String nature)
NatureExtendable
addNature
in interface NatureExtendable
nature
- ID of the Naturepublic final boolean hasNature(java.lang.String nature)
NatureExtendable
hasNature
in interface NatureExtendable
nature
- ID of the NatureIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com