|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.ashridgetech.jamda.code.ClassGenerator.FieldGenerator
Generates a field variable in the code. May only be obtained from
ClassGenerator.addField(java.lang.String, java.lang.String, int). Further methods
may be called to set the characteristics.
ClassGenerator.addField(java.lang.String, java.lang.String, int)| Constructor Summary | |
protected |
ClassGenerator.FieldGenerator(java.lang.String typeName,
java.lang.String name)
Create a FieldGenerator with the given name and type,
and modifiers of PRIVATE. |
| Method Summary | |
ClassGenerator.FieldGenerator |
addModifiers(int modifiers)
Add modifiers to the existing modifiers. |
ClassGenerator.FieldGenerator |
addTag(java.lang.String tag)
Set an extra tag for the method Javadoc. |
ClassGenerator.FieldGenerator |
description(java.lang.String comment)
Set the field description. |
void |
generate()
Generate this field's documentation, declaration and initialization in its containing ClassGenerator's
ClassWriter. |
ClassGenerator.FieldGenerator |
initValue(java.lang.String expr)
Set the field initial value expression. |
ClassGenerator.FieldGenerator |
setModifiers(int modifiers)
Replace the existing modifiers with modifiers. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected ClassGenerator.FieldGenerator(java.lang.String typeName,
java.lang.String name)
FieldGenerator with the given name and type,
and modifiers of PRIVATE.
name - the field nametypeName - the type name| Method Detail |
public ClassGenerator.FieldGenerator addModifiers(int modifiers)
modifiers to the existing modifiers.
modifiers - the modifiers to OR with the existing ones.
public ClassGenerator.FieldGenerator setModifiers(int modifiers)
modifiers.
If the constructor
set this FieldGenerator to abstract,
the abstract modifier will be added to those set.
modifiers - the new modifiers.
public ClassGenerator.FieldGenerator initValue(java.lang.String expr)
expr - the expression for the initial value of the field
public ClassGenerator.FieldGenerator description(java.lang.String comment)
comment - the description of the field
public ClassGenerator.FieldGenerator addTag(java.lang.String tag)
tag - the full text of the extra tag, such as
"@see Widget#grumble"
public void generate()
ClassGenerator's
ClassWriter.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||