step.typedef
Class FieldDef

java.lang.Object
  |
  +--step.typedef.FieldDef
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ArtificialFieldDef, InheritedFieldDef, LocalFieldDef

public abstract class FieldDef
extends Object
implements Cloneable

Abstraction of a STEP field defintion.

Field definitions are a component of type definitions.

See Also:
TypeDef

Nested Class Summary
static class FieldDef.Builder
          Create field definitions with the Builder pattern.
 
Constructor Summary
protected FieldDef()
           
 
Method Summary
static FieldDef.Builder builder()
          Get the builder object for creating field definitions.
abstract  Object clone()
          Get a copy (clone) of this definition.
abstract  TypeDef getAltTypeDef()
          Get an alternate type definition specific to this field.
 List getAttributes()
          Get the field attributes associated with this definition.
abstract  String getDescription()
          Get the description of the field.
abstract  String getName()
          Get the name of the field.
abstract  Type getType()
          Get the type of the field.
 boolean hasAltTypeDef()
          Does this field have an alternate type definition?
static FieldDef merge(FieldDef lowDef, FieldDef highDef)
           
protected abstract  void setAltTypeDef(TypeDef altDef)
          Set a new, alternate, definition for the type of this field.
protected  void setAttributes(List attributes)
          Set the field attributes for this definition.
protected abstract  void setDescription(String description)
          Set the description of the field.
protected abstract  void setName(String name)
          Set the name of the field.
protected abstract  void setType(Type type)
          Set the type of the field.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldDef

protected FieldDef()
Method Detail

getName

public abstract String getName()
Get the name of the field.


setName

protected abstract void setName(String name)
Set the name of the field.


getType

public abstract Type getType()
Get the type of the field.


setType

protected abstract void setType(Type type)
Set the type of the field.


getDescription

public abstract String getDescription()
Get the description of the field.


setDescription

protected abstract void setDescription(String description)
Set the description of the field.


getAttributes

public List getAttributes()
Get the field attributes associated with this definition.


setAttributes

protected void setAttributes(List attributes)
Set the field attributes for this definition.

NOTE: The given list is copied and checked to make sure the elements are in fact Attributes.


getAltTypeDef

public abstract TypeDef getAltTypeDef()
Get an alternate type definition specific to this field. The alternate definition is normally used to indicate that subfields of this field have extended/overridden attributes.


setAltTypeDef

protected abstract void setAltTypeDef(TypeDef altDef)
Set a new, alternate, definition for the type of this field.


hasAltTypeDef

public boolean hasAltTypeDef()
Does this field have an alternate type definition?


clone

public abstract Object clone()
Get a copy (clone) of this definition.

Overrides:
clone in class Object

merge

public static FieldDef merge(FieldDef lowDef,
                             FieldDef highDef)

builder

public static FieldDef.Builder builder()
Get the builder object for creating field definitions.