step.typedef
Class RecordDef

java.lang.Object
  |
  +--step.typedef.TypeDef
        |
        +--step.typedef.RecordDef
All Implemented Interfaces:
Cloneable, StepDef
Direct Known Subclasses:
DerivedRecordDef

public class RecordDef
extends TypeDef
implements StepDef

The definition of a STEP record type.

See Also:
StepRecord

Nested Class Summary
static class RecordDef.Builder
          Create record definitions with the Builder pattern.
 
Constructor Summary
RecordDef(String name, Package pkg)
           
 
Method Summary
static RecordDef.Builder builder()
          Get the builder object for creating new record definitions.
 Object clone()
          Get a copy (clone) of this definition.
 List getAttributes()
          Get the record attributes for this definition.
 String getDescription()
          Get the description for this record definition.
 RecordFactory getFactory()
          Get the factory for this record definition.
 String getLabel()
          Get the label for this record definition.
static RecordDef load(Type recordType)
          Attempt to load the definition for the given record name.
protected  void setAttributes(List attributes)
           
protected  void setDescription(String description)
          Set the description for this record definition.
protected  void setFactory(RecordFactory factory)
           
protected  void setLabel(String label)
          Set the label for this record definition.
 String toStepDL()
          Get a compact string version of this definition as STEP-DL.
 
Methods inherited from class step.typedef.TypeDef
applyModifiers, dump, getDefault, getDefault, getDefault, getField, getFields, getFullName, getModifiers, getName, getPackage, getType, isDefined, isDefined, isDefined, isResolved, isTypeResolved, merge, resolve, resolveType, setAsDefault, setFields, setModifiers
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordDef

public RecordDef(String name,
                 Package pkg)
Method Detail

getLabel

public String getLabel()
Get the label for this record definition.


setLabel

protected void setLabel(String label)
Set the label for this record definition.


getDescription

public String getDescription()
Get the description for this record definition.


setDescription

protected void setDescription(String description)
Set the description for this record definition.


getAttributes

public List getAttributes()
Get the record attributes for this definition.


setAttributes

protected void setAttributes(List attributes)

getFactory

public RecordFactory getFactory()
Get the factory for this record definition.

Returns:
the factory, or null if no factory is defined.

setFactory

protected void setFactory(RecordFactory factory)

clone

public Object clone()
Description copied from class: TypeDef
Get a copy (clone) of this definition. The clone is a deep copy of the field definitions and modifiers.

Overrides:
clone in class TypeDef

toStepDL

public String toStepDL()
Get a compact string version of this definition as STEP-DL. The definition includes package definitions, thus it is a complete STEP definition for the type.

Specified by:
toStepDL in interface StepDef

load

public static RecordDef load(Type recordType)
Attempt to load the definition for the given record name.

NOTE: It is assumed that the record type provides its definition in a DEFINITION static field.

Throws:
RecordDefNotFoundException - if the named type could not be loaded.

builder

public static RecordDef.Builder builder()
Get the builder object for creating new record definitions.