Class ClassType
java.lang.Object
org.exolab.castor.builder.binding.xml.ClassType
- All Implemented Interfaces:
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddImplements(int index, String vImplements) voidaddImplements(String vImplements) voidvoidvoidvoidMethod enumerateImplements.booleanReturns the value of field 'abstract'.booleangetBound()Returns the value of field 'bound'.booleanReturns the value of field 'equals'.Returns the value of field 'extends'.booleangetFinal()Returns the value of field 'final'.String[]Method getImplements.Returns the contents of the collection in an Array.getImplements(int index) Method getImplements.intMethod getImplementsCount.getName()Returns the value of field 'name'.Returns the value of field 'package'.booleanMethod hasAbstract.booleanhasBound()Method hasBound.booleanMethod hasEquals.booleanhasFinal()Method hasFinal.booleanReturns the value of field 'abstract'.booleanisBound()Returns the value of field 'bound'.booleanisEquals()Returns the value of field 'equals'.booleanisFinal()Returns the value of field 'final'.booleanisValid()Method isValid.Method iterateImplements.voidvoidmarshal(ContentHandler handler) voidbooleanremoveImplements(String vImplements) Method removeImplements.removeImplementsAt(int index) Method removeImplementsAt.voidsetAbstract(boolean _abstract) Sets the value of field 'abstract'.voidsetBound(boolean bound) Sets the value of field 'bound'.voidsetEquals(boolean equals) Sets the value of field 'equals'.voidsetExtends(String _extends) Sets the value of field 'extends'.voidsetFinal(boolean _final) Sets the value of field 'final'.voidsetImplements(int index, String vImplements) voidsetImplements(String[] vImplementsArray) voidSets the value of field 'name'.voidsetPackage(String _package) Sets the value of field 'package'.static ClassTypeunmarshalClassType(Reader reader) Method unmarshalClassType.voidvalidate()
-
Constructor Details
-
ClassType
public ClassType()
-
-
Method Details
-
addImplements
- Parameters:
vImplements-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addImplements
- Parameters:
index-vImplements-- Throws:
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
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
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
Method getImplements.- Parameters:
index-- Returns:
- the value of the java.lang.String at the given index
- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
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
Returns the value of field 'name'.- Returns:
- the value of field 'Name'.
-
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
Method iterateImplements.- Returns:
- an Iterator over all possible elements in this collection
-
marshal
- 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(ContentHandler handler) throws IOException, MarshalException, ValidationException - Parameters:
handler-- Throws:
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
Method removeImplements.- Parameters:
vImplements-- Returns:
- true if the object was removed from the collection.
-
removeImplementsAt
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
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
- Parameters:
index-vImplements-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setImplements
- Parameters:
vImplementsArray-
-
setName
Sets the value of field 'name'.- Parameters:
name- the value of field 'name'.
-
setPackage
Sets the value of field 'package'.- Parameters:
_package-package- the value of field 'package'.
-
unmarshalClassType
public static ClassType unmarshalClassType(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
- Throws:
ValidationException- if this object is an invalid instance according to the schema
-