|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--step.typedef.FieldDef.Builder
Create field definitions with the Builder pattern.
| Method Summary | |
FieldDef.Builder |
addAttribute(Attribute attribute)
Add an attribute to the definition. |
FieldDef.Builder |
addAttributes(List attributes)
|
void |
clear()
Reset the build context. |
TypeDef |
getAltTypeDef()
|
List |
getAttributes()
Get the list of attributes for the definition. |
String |
getDescription()
Get the description for the definition. |
FieldDef |
makeFieldDef()
Obtain the completed field definition. |
FieldDef.Builder |
newFieldDef(String name,
String typeName)
Start building a new field definition with the given name and type name. |
FieldDef.Builder |
newFieldDef(String name,
Type type)
Start building a new field definition with the given name and type. |
FieldDef.Builder |
setAltTypeDef(TypeDef altDef)
Set an alternate type definition for the field. |
FieldDef.Builder |
setDescription(String description)
Set the description for the definition. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public FieldDef.Builder newFieldDef(String name,
String typeName)
newFieldDef(String,Type)
public FieldDef.Builder newFieldDef(String name,
Type type)
The default record description is the empty string ("").
name - the brief name of the new field.type - the type of the field.
IllegalStateException - if already building a definition.
IllegalArgumentException - name or type
are null.public FieldDef.Builder setDescription(String description)
IllegalStateException - if not building a definition.
IllegalArgumentException - description is null.public String getDescription()
null if no description is currently defined.public FieldDef.Builder addAttribute(Attribute attribute)
IllegalStateException - if not building a definition.
IllegalArgumentException - attribute is null.public FieldDef.Builder addAttributes(List attributes)
public List getAttributes()
public FieldDef.Builder setAltTypeDef(TypeDef altDef)
IllegalStateException - if not building a definition.
IllegalArgumentException - altDef is for a
different type than the current one.public TypeDef getAltTypeDef()
public FieldDef makeFieldDef()
IllegalStateException - if not building a definition.public void clear()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||