|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.mapping.loader.FieldDescriptorImpl
public class FieldDescriptorImpl
| Constructor Summary | |
|---|---|
protected |
FieldDescriptorImpl()
Creates a default instance of a field descriptor. |
|
FieldDescriptorImpl(String fieldName,
TypeInfo typeInfo,
FieldHandler handler,
boolean isTransitive)
Constructs a new field descriptor. |
| Method Summary | |
|---|---|
void |
addNature(String nature)
|
ClassDescriptor |
getClassDescriptor()
Returns the class descriptor related to the field type. |
ClassDescriptor |
getContainingClassDescriptor()
Get the class descriptor which contains this field. |
String |
getFieldName()
Returns the name of the field. |
Class |
getFieldType()
Returns the Java type of the field. |
FieldHandler |
getHandler()
Returns the handler of the field. |
Object |
getProperty(String name)
|
boolean |
hasNature(String nature)
|
boolean |
isIdentity()
Is the described field is part of the identity of the class it belongs to? |
boolean |
isImmutable()
Returns true if the field type is immutable. |
boolean |
isMultivalued()
Returns true if the field is multivalued (a collection). |
boolean |
isRequired()
Returns true if the field type is required. |
boolean |
isTransient()
Returns true if the field is transient. |
void |
setClassDescriptor(ClassDescriptor classDescriptor)
Set the ClassDescriptor for the described field. |
void |
setContainingClassDescriptor(ClassDescriptor parent)
Set the class descriptor which contains this field. |
void |
setFieldName(String fieldName)
Set the name of the field. |
void |
setFieldType(Class fieldType)
Set the type of the field. |
void |
setHandler(FieldHandler handler)
Set the FieldHandler for the field being described by this FieldDescriptor. |
void |
setIdentity(boolean identity)
Set wether the described field is part of the identity of the class it belongs to. |
void |
setImmutable(boolean immutable)
Set the immutable flag which indicates that changes to this Field result in a new Object to be created, such as java.lang.String. |
void |
setMultivalued(boolean multivalued)
Set wheter the object described by this descriptor is multivalued or not. |
void |
setProperty(String name,
Object value)
|
void |
setRequired(boolean required)
Set whether or not the described field is required. |
void |
setTransient(boolean isTransient)
Sets whether or not the describled field is 'transient'. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected FieldDescriptorImpl()
public FieldDescriptorImpl(String fieldName,
TypeInfo typeInfo,
FieldHandler handler,
boolean isTransitive)
fieldName - The field nametypeInfo - The field type informationhandler - The field handler (may be null)isTransitive - True if the field is transient| Method Detail |
|---|
public final void setContainingClassDescriptor(ClassDescriptor parent)
FieldDescriptor
setContainingClassDescriptor in interface FieldDescriptorparent - The class descriptor which contains this field.{@inheritDoc}public final ClassDescriptor getContainingClassDescriptor()
FieldDescriptor
getContainingClassDescriptor in interface FieldDescriptor{@inheritDoc}public final void setFieldName(String fieldName)
fieldName - Field name.public final String getFieldName()
FieldDescriptor
getFieldName in interface FieldDescriptor{@inheritDoc}public final void setFieldType(Class fieldType)
fieldType - Field type.public final Class getFieldType()
FieldDescriptor
getFieldType in interface FieldDescriptor{@inheritDoc}public final void setClassDescriptor(ClassDescriptor classDescriptor)
classDescriptor - The ClassDescriptor for the described field.public final ClassDescriptor getClassDescriptor()
FieldDescriptor
getClassDescriptor in interface FieldDescriptor{@inheritDoc}public final void setHandler(FieldHandler handler)
handler - The FieldHandler for the field being described.public final FieldHandler getHandler()
FieldDescriptor
getHandler in interface FieldDescriptor{@inheritDoc}public final void setTransient(boolean isTransient)
isTransient - The flag indicating if the described field is 'transient'.public final boolean isTransient()
FieldDescriptor
isTransient in interface FieldDescriptor{@inheritDoc}public final void setImmutable(boolean immutable)
immutable - Flag which if true indicates that the field is immutable.public final boolean isImmutable()
FieldDescriptor
isImmutable in interface FieldDescriptor{@inheritDoc}public final void setRequired(boolean required)
required - The flag indicating whether or not the described field is required.public final boolean isRequired()
FieldDescriptor
isRequired in interface FieldDescriptor{@inheritDoc}public final void setMultivalued(boolean multivalued)
multivalued - True if the object described by this descriptor is multivalued.public final boolean isMultivalued()
FieldDescriptor
isMultivalued in interface FieldDescriptor{@inheritDoc}public final void setIdentity(boolean identity)
identity - true if field is part of the classes identity.public final boolean isIdentity()
true if field is part of the classes identity.public Object getProperty(String name)
getProperty in interface PropertyHoldername - of the property
getProperty(java.lang.String)
public void setProperty(String name,
Object value)
setProperty in interface PropertyHoldername - of the propertyvalue - of the propertysetProperty(java.lang.String, java.lang.Object)public void addNature(String nature)
addNature in interface NatureExtendablenature - ID of the NatureaddNature(java.lang.String)public boolean hasNature(String nature)
hasNature in interface NatureExtendablenature - ID of the Nature
hasNature(java.lang.String)public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||