step.typedef
Class DerivedRecordDef

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

public class DerivedRecordDef
extends RecordDef

The definition of a derived STEP record type.

See Also:
StepRecord, InheritedFieldDef

Nested Class Summary
 
Nested classes inherited from class step.typedef.RecordDef
RecordDef.Builder
 
Constructor Summary
DerivedRecordDef(String name, Package pkg, Type parent, boolean cleanInherit)
          Create a new derived record type definition.
 
Method Summary
 Object clone()
          Get a copy (clone) of this definition.
 List getAttributes()
          Get all the record attributes associated with this type.
 List getExtraAttributes()
          Get only the record attributes added by this type, not the inherited attributes.
 Type getParent()
          Get the parent type for this definition.
 boolean isCleanInherit()
          Does this type discard attributes inherited from the parent?
 boolean isTypeResolved()
          Is the type information for this definition complete?
protected  void resolveType()
          Complete the type information for this definition.
protected  void setCleanInherit(boolean cleanInherit)
           
protected  void setParent(Type parent)
           
 String toStepDL()
          Get a compact string version of this definition as STEP-DL.
 
Methods inherited from class step.typedef.RecordDef
builder, getDescription, getFactory, getLabel, load, setAttributes, setDescription, setFactory, setLabel
 
Methods inherited from class step.typedef.TypeDef
applyModifiers, dump, getDefault, getDefault, getDefault, getField, getFields, getFullName, getModifiers, getName, getPackage, getType, isDefined, isDefined, isDefined, isResolved, merge, resolve, setAsDefault, setFields, setModifiers
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DerivedRecordDef

public DerivedRecordDef(String name,
                        Package pkg,
                        Type parent,
                        boolean cleanInherit)
Create a new derived record type definition.

Method Detail

getParent

public Type getParent()
Get the parent type for this definition.


setParent

protected void setParent(Type parent)

isCleanInherit

public boolean isCleanInherit()
Does this type discard attributes inherited from the parent?


setCleanInherit

protected void setCleanInherit(boolean cleanInherit)

getAttributes

public List getAttributes()
Get all the record attributes associated with this type.

Overrides:
getAttributes in class RecordDef

getExtraAttributes

public List getExtraAttributes()
Get only the record attributes added by this type, not the inherited attributes.


isTypeResolved

public boolean isTypeResolved()
Is the type information for this definition complete?

Overrides:
isTypeResolved in class TypeDef
See Also:
TypeDef.isResolved()

resolveType

protected void resolveType()
Complete the type information for this definition. The purpose of this method is to incorporate inherited information from the parent type.

Overrides:
resolveType in class TypeDef
Throws:
ResolveException - if
  • a circular inheritance relationship was detected
  • the parent type is undefined
  • the parent type is not a record type
  • a field name conflicts with one inherited from the parent
See Also:
TypeDef.resolve()

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 RecordDef

toStepDL

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

Specified by:
toStepDL in interface StepDef
Overrides:
toStepDL in class RecordDef