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 TypeMethodDescriptionvoid
addImplements
(int index, String vImplements) void
addImplements
(String vImplements) void
void
void
void
Method enumerateImplements.boolean
Returns the value of field 'abstract'.boolean
getBound()
Returns the value of field 'bound'.boolean
Returns the value of field 'equals'.Returns the value of field 'extends'.boolean
getFinal()
Returns the value of field 'final'.String[]
Method getImplements.Returns the contents of the collection in an Array.getImplements
(int index) Method getImplements.int
Method getImplementsCount.getName()
Returns the value of field 'name'.Returns the value of field 'package'.boolean
Method hasAbstract.boolean
hasBound()
Method hasBound.boolean
Method hasEquals.boolean
hasFinal()
Method hasFinal.boolean
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.Method iterateImplements.void
void
marshal
(ContentHandler handler) void
boolean
removeImplements
(String vImplements) Method removeImplements.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
(String _extends) Sets the value of field 'extends'.void
setFinal
(boolean _final) Sets the value of field 'final'.void
setImplements
(int index, String vImplements) void
setImplements
(String[] vImplementsArray) void
Sets the value of field 'name'.void
setPackage
(String _package) Sets the value of field 'package'.static ClassType
unmarshalClassType
(Reader reader) Method unmarshalClassType.void
validate()
-
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
-