|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.builder.info.ClassInfo
public final class ClassInfo
This class holds the necessary information so that the source generator can properly create the necessary classes for the object model.
Field Summary |
---|
Fields inherited from interface org.exolab.castor.builder.info.XMLInfo |
---|
CHOICE_NODE_NAME_ERROR_INDICATION |
Constructor Summary | |
---|---|
ClassInfo(JClass jClass)
Creates a new ClassInfo. |
Method Summary | |
---|---|
void |
addFieldInfo(FieldInfo fieldInfo)
Adds the given FieldInfo to this ClassInfo. |
void |
addFieldInfo(FieldInfo[] fields)
Adds the given set of FieldInfos to this ClassInfo. |
void |
addNature(java.lang.String nature)
Adds a specified nature. |
boolean |
allowContent()
|
boolean |
contains(FieldInfo fieldInfo)
Returns true if the given FieldInfo is contained within this ClassInfo. |
FieldInfo |
getAttributeField(java.lang.String nodeName)
Returns a fieldInfo that corresponds to an attribute with the given node name. |
FieldInfo[] |
getAttributeFields()
Returns an array of XML attribute associated fields. |
java.util.Collection<FieldInfo> |
getAttributeFieldsAsCollection()
Returns all attribute FieldInfo s as a collection. |
ClassInfo |
getBaseClass()
Returns the base class of this classInfo if any. |
FieldInfo |
getElementField(java.lang.String nodeName)
Returns a fieldInfo that corresponds to an element with the given node name. |
FieldInfo[] |
getElementFields()
Returns an array of XML element associated fields. |
java.util.Collection<FieldInfo> |
getElementFieldsAsCollection()
Returns all element FieldInfo s as a collection. |
int |
getFieldCount()
Returns the number of FieldInfo definitions for this ClassInfo. |
JClass |
getJClass()
Returns the JClass described by this ClassInfo. |
java.lang.Object |
getProperty(java.lang.String name)
Get a property by its name. |
FieldInfo |
getTextField()
Returns the FieldInfo for the XML text associated field. |
boolean |
hasNature(java.lang.String nature)
Checks if a specified nature has been added. |
boolean |
isAbstract()
Returns true if the JClass represented by this ClassInfo is abstract. |
void |
setAbstract(boolean abstractClass)
Sets the class of this ClassInfo to be abstract of abstractClass is true, false otherwise. |
void |
setBaseClass(ClassInfo base)
Sets the base class of this classInfo. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set a property specified by the name to the passed value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassInfo(JClass jClass)
XMLInfoNature
for legacy compliance.
jClass
- the JClass which this ClassInfo describesMethod Detail |
---|
public void addFieldInfo(FieldInfo fieldInfo)
fieldInfo
- the FieldInfo to addpublic void addFieldInfo(FieldInfo[] fields)
fields
- an Array of FieldInfo objectspublic boolean allowContent()
public boolean contains(FieldInfo fieldInfo)
fieldInfo
- the FieldInfo to check
public FieldInfo[] getAttributeFields()
public FieldInfo getAttributeField(java.lang.String nodeName)
nodeName
- the NodeName of the field to get.
public ClassInfo getBaseClass()
public FieldInfo[] getElementFields()
public FieldInfo getElementField(java.lang.String nodeName)
nodeName
- the NodeName of the field to get.
public int getFieldCount()
public JClass getJClass()
public FieldInfo getTextField()
public boolean isAbstract()
public void setAbstract(boolean abstractClass)
abstractClass
is true, false otherwise.
abstractClass
- true if the class represented by this ClassInfo is
abstractpublic void setBaseClass(ClassInfo base)
base
- the base class of this classInfo.public java.lang.Object getProperty(java.lang.String name)
PropertyHolder
getProperty
in interface PropertyHolder
name
- of the property
getProperty(java.lang.String)
public void setProperty(java.lang.String name, java.lang.Object value)
PropertyHolder
setProperty
in interface PropertyHolder
name
- of the propertyvalue
- of the propertysetProperty(java.lang.String, java.lang.Object)
public void addNature(java.lang.String nature)
NatureExtendable
addNature
in interface NatureExtendable
nature
- ID of the NatureaddNature(java.lang.String)
public boolean hasNature(java.lang.String nature)
NatureExtendable
hasNature
in interface NatureExtendable
nature
- ID of the Nature
hasNature(java.lang.String)
public java.util.Collection<FieldInfo> getAttributeFieldsAsCollection()
FieldInfo
s as a collection.
public java.util.Collection<FieldInfo> getElementFieldsAsCollection()
FieldInfo
s as a collection.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |