antsnest.antinfo
Class DefaultTypeDefinition

java.lang.Object
  extended by antsnest.antinfo.DefinitionBasics
      extended by antsnest.antinfo.DefaultTypeDefinition
All Implemented Interfaces:
Definition, TypeDefinition, Comparable

public class DefaultTypeDefinition
extends DefinitionBasics
implements TypeDefinition

Implementation of TypeDefinition

Author:
Chris Clohosy
See Also:
DefinitionBasics, TypeDefinition

Field Summary
 
Fields inherited from class antsnest.antinfo.DefinitionBasics
attributes, classname, deprecated, name, nestedElements
 
Constructor Summary
DefaultTypeDefinition(boolean reference, String name, DefaultAntInfo antInfo)
          Constructs a new type definition
 
Method Summary
 AttributeDefinition[] getAttributes()
          Gets all the attributes belonging to this type
 TypeDefinition[] getNestedElements()
          Gets all the nested elements this type accepts
 boolean isReference()
          Whether this type is a reference to a more defined version
 
Methods inherited from class antsnest.antinfo.DefinitionBasics
addAttribute, addNestedElement, compareTo, equals, getAttribute, getClassname, getName, getNestedElement, isDeprecated, setClassname, setDeprecated, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface antsnest.antinfo.Definition
getAttribute, getClassname, getName, getNestedElement, isDeprecated
 

Constructor Detail

DefaultTypeDefinition

public DefaultTypeDefinition(boolean reference,
                             String name,
                             DefaultAntInfo antInfo)
Constructs a new type definition

Parameters:
reference - whether this is a reference
name - the name of this type
antInfo - the information object to use
Method Detail

isReference

public boolean isReference()
Whether this type is a reference to a more defined version

Specified by:
isReference in interface TypeDefinition
Returns:
a boolean, whether this type is a reference

getAttributes

public AttributeDefinition[] getAttributes()
Gets all the attributes belonging to this type

Specified by:
getAttributes in interface Definition
Overrides:
getAttributes in class DefinitionBasics
Returns:
an AttributeDefinition[], the attributes

getNestedElements

public TypeDefinition[] getNestedElements()
Gets all the nested elements this type accepts

Specified by:
getNestedElements in interface Definition
Overrides:
getNestedElements in class DefinitionBasics
Returns:
a TypeDefinition[], the elements