Class ClassType

java.lang.Object
org.exolab.castor.builder.binding.xml.ClassType
All Implemented Interfaces:
Serializable

public class ClassType extends Object implements 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 Details

    • ClassType

      public ClassType()
  • Method Details

    • addImplements

      public void addImplements(String vImplements) throws IndexOutOfBoundsException
      Parameters:
      vImplements -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addImplements

      public void addImplements(int index, String vImplements) throws IndexOutOfBoundsException
      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

      public 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 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 String getImplements(int index) throws IndexOutOfBoundsException
      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

      public 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 String getName()
      Returns the value of field 'name'.
      Returns:
      the value of field 'Name'.
    • getPackage

      public 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 Iterator iterateImplements()
      Method iterateImplements.
      Returns:
      an Iterator over all possible elements in this collection
    • marshal

      public void marshal(Writer out) throws MarshalException, ValidationException
      Parameters:
      out -
      Throws:
      MarshalException - if object is null or if any SAXException is thrown during marshaling
      ValidationException - 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 marshaling
      ValidationException - if this object is an invalid instance according to the schema
      MarshalException - if object is null or if any SAXException is thrown during marshaling
    • removeAllImplements

      public void removeAllImplements()
    • removeImplements

      public boolean removeImplements(String vImplements)
      Method removeImplements.
      Parameters:
      vImplements -
      Returns:
      true if the object was removed from the collection.
    • removeImplementsAt

      public 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(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, String vImplements) throws IndexOutOfBoundsException
      Parameters:
      index -
      vImplements -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • setImplements

      public void setImplements(String[] vImplementsArray)
      Parameters:
      vImplementsArray -
    • setName

      public void setName(String name)
      Sets the value of field 'name'.
      Parameters:
      name - the value of field 'name'.
    • setPackage

      public void setPackage(String _package)
      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 marshaling
      ValidationException - 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