Class ClassType
- java.lang.Object
-
- org.exolab.castor.builder.binding.xml.ClassType
-
- All Implemented Interfaces:
java.io.Serializable
public class ClassType extends java.lang.Object implements java.io.Serializable
This type gathers the needed information to generate a Java Class from a binding file. Options such as generating the equals method, using wrapper classes for primitives or using bound properties can be defined via that element. When defined locally the options override the values defined in the castor.properties file.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addImplements(int index, java.lang.String vImplements)
void
addImplements(java.lang.String vImplements)
void
deleteAbstract()
void
deleteBound()
void
deleteEquals()
void
deleteFinal()
java.util.Enumeration
enumerateImplements()
Method enumerateImplements.boolean
getAbstract()
Returns the value of field 'abstract'.boolean
getBound()
Returns the value of field 'bound'.boolean
getEquals()
Returns the value of field 'equals'.java.lang.String
getExtends()
Returns the value of field 'extends'.boolean
getFinal()
Returns the value of field 'final'.java.lang.String[]
getImplements()
Method getImplements.Returns the contents of the collection in an Array.java.lang.String
getImplements(int index)
Method getImplements.int
getImplementsCount()
Method getImplementsCount.java.lang.String
getName()
Returns the value of field 'name'.java.lang.String
getPackage()
Returns the value of field 'package'.boolean
hasAbstract()
Method hasAbstract.boolean
hasBound()
Method hasBound.boolean
hasEquals()
Method hasEquals.boolean
hasFinal()
Method hasFinal.boolean
isAbstract()
Returns the value of field 'abstract'.boolean
isBound()
Returns the value of field 'bound'.boolean
isEquals()
Returns the value of field 'equals'.boolean
isFinal()
Returns the value of field 'final'.boolean
isValid()
Method isValid.java.util.Iterator
iterateImplements()
Method iterateImplements.void
marshal(java.io.Writer out)
void
marshal(org.xml.sax.ContentHandler handler)
void
removeAllImplements()
boolean
removeImplements(java.lang.String vImplements)
Method removeImplements.java.lang.String
removeImplementsAt(int index)
Method removeImplementsAt.void
setAbstract(boolean _abstract)
Sets the value of field 'abstract'.void
setBound(boolean bound)
Sets the value of field 'bound'.void
setEquals(boolean equals)
Sets the value of field 'equals'.void
setExtends(java.lang.String _extends)
Sets the value of field 'extends'.void
setFinal(boolean _final)
Sets the value of field 'final'.void
setImplements(int index, java.lang.String vImplements)
void
setImplements(java.lang.String[] vImplementsArray)
void
setName(java.lang.String name)
Sets the value of field 'name'.void
setPackage(java.lang.String _package)
Sets the value of field 'package'.static ClassType
unmarshalClassType(java.io.Reader reader)
Method unmarshalClassType.void
validate()
-
-
-
Method Detail
-
addImplements
public void addImplements(java.lang.String vImplements) throws java.lang.IndexOutOfBoundsException
- Parameters:
vImplements
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addImplements
public void addImplements(int index, java.lang.String vImplements) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vImplements
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
deleteAbstract
public void deleteAbstract()
-
deleteBound
public void deleteBound()
-
deleteEquals
public void deleteEquals()
-
deleteFinal
public void deleteFinal()
-
enumerateImplements
public java.util.Enumeration enumerateImplements()
Method enumerateImplements.- Returns:
- an Enumeration over all possible elements of this collection
-
getAbstract
public boolean getAbstract()
Returns the value of field 'abstract'.- Returns:
- the value of field 'Abstract'.
-
getBound
public boolean getBound()
Returns the value of field 'bound'.- Returns:
- the value of field 'Bound'.
-
getEquals
public boolean getEquals()
Returns the value of field 'equals'.- Returns:
- the value of field 'Equals'.
-
getExtends
public java.lang.String getExtends()
Returns the value of field 'extends'.- Returns:
- the value of field 'Extends'.
-
getFinal
public boolean getFinal()
Returns the value of field 'final'.- Returns:
- the value of field 'Final'.
-
getImplements
public java.lang.String getImplements(int index) throws java.lang.IndexOutOfBoundsException
Method getImplements.- Parameters:
index
-- Returns:
- the value of the java.lang.String at the given index
- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getImplements
public java.lang.String[] getImplements()
Method getImplements.Returns the contents of the collection in an Array.Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
- Returns:
- this collection as an Array
-
getImplementsCount
public int getImplementsCount()
Method getImplementsCount.- Returns:
- the size of this collection
-
getName
public java.lang.String getName()
Returns the value of field 'name'.- Returns:
- the value of field 'Name'.
-
getPackage
public java.lang.String getPackage()
Returns the value of field 'package'.- Returns:
- the value of field 'Package'.
-
hasAbstract
public boolean hasAbstract()
Method hasAbstract.- Returns:
- true if at least one Abstract has been added
-
hasBound
public boolean hasBound()
Method hasBound.- Returns:
- true if at least one Bound has been added
-
hasEquals
public boolean hasEquals()
Method hasEquals.- Returns:
- true if at least one Equals has been added
-
hasFinal
public boolean hasFinal()
Method hasFinal.- Returns:
- true if at least one Final has been added
-
isAbstract
public boolean isAbstract()
Returns the value of field 'abstract'.- Returns:
- the value of field 'Abstract'.
-
isBound
public boolean isBound()
Returns the value of field 'bound'.- Returns:
- the value of field 'Bound'.
-
isEquals
public boolean isEquals()
Returns the value of field 'equals'.- Returns:
- the value of field 'Equals'.
-
isFinal
public boolean isFinal()
Returns the value of field 'final'.- Returns:
- the value of field 'Final'.
-
isValid
public boolean isValid()
Method isValid.- Returns:
- true if this object is valid according to the schema
-
iterateImplements
public java.util.Iterator iterateImplements()
Method iterateImplements.- Returns:
- an Iterator over all possible elements in this collection
-
marshal
public void marshal(java.io.Writer out) throws MarshalException, ValidationException
- Parameters:
out
-- Throws:
MarshalException
- if object is null or if any SAXException is thrown during marshalingValidationException
- if this object is an invalid instance according to the schema
-
marshal
public void marshal(org.xml.sax.ContentHandler handler) throws java.io.IOException, MarshalException, ValidationException
- Parameters:
handler
-- Throws:
java.io.IOException
- if an IOException occurs during marshalingValidationException
- if this object is an invalid instance according to the schemaMarshalException
- if object is null or if any SAXException is thrown during marshaling
-
removeAllImplements
public void removeAllImplements()
-
removeImplements
public boolean removeImplements(java.lang.String vImplements)
Method removeImplements.- Parameters:
vImplements
-- Returns:
- true if the object was removed from the collection.
-
removeImplementsAt
public java.lang.String removeImplementsAt(int index)
Method removeImplementsAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setAbstract
public void setAbstract(boolean _abstract)
Sets the value of field 'abstract'.- Parameters:
_abstract
-abstract
- the value of field 'abstract'.
-
setBound
public void setBound(boolean bound)
Sets the value of field 'bound'.- Parameters:
bound
- the value of field 'bound'.
-
setEquals
public void setEquals(boolean equals)
Sets the value of field 'equals'.- Parameters:
equals
- the value of field 'equals'.
-
setExtends
public void setExtends(java.lang.String _extends)
Sets the value of field 'extends'.- Parameters:
_extends
-extends
- the value of field 'extends'.
-
setFinal
public void setFinal(boolean _final)
Sets the value of field 'final'.- Parameters:
_final
-final
- the value of field 'final'.
-
setImplements
public void setImplements(int index, java.lang.String vImplements) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vImplements
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setImplements
public void setImplements(java.lang.String[] vImplementsArray)
- Parameters:
vImplementsArray
-
-
setName
public void setName(java.lang.String name)
Sets the value of field 'name'.- Parameters:
name
- the value of field 'name'.
-
setPackage
public void setPackage(java.lang.String _package)
Sets the value of field 'package'.- Parameters:
_package
-package
- the value of field 'package'.
-
unmarshalClassType
public static ClassType unmarshalClassType(java.io.Reader reader) throws MarshalException, ValidationException
Method unmarshalClassType.- Parameters:
reader
-- Returns:
- the unmarshaled org.exolab.castor.builder.binding.xml.ClassType
- Throws:
MarshalException
- if object is null or if any SAXException is thrown during marshalingValidationException
- if this object is an invalid instance according to the schema
-
validate
public void validate() throws ValidationException
- Throws:
ValidationException
- if this object is an invalid instance according to the schema
-
-