| java.lang.Object EDU.purdue.cs.bloat.editor.FieldEditor
Constructor Summary | |
public | FieldEditor(ClassEditor editor, int modifiers, Type type, String name) | public | FieldEditor(ClassEditor editor, int modifiers, Class type, String name, Object constantValue) | public | FieldEditor(ClassEditor editor, int modifiers, Class type, String name) | public | FieldEditor(ClassEditor editor, int modifiers, Type type, String name, Object constantValue) Creates a new FieldEditor for editing a field in a given
class with the given modifiers, type, name, and constant value. | public | FieldEditor(ClassEditor editor, FieldInfo fieldInfo) Constructor. |
FieldEditor | public FieldEditor(ClassEditor editor, int modifiers, Type type, String name)(Code) | | Creates a new FieldEditor for editing a field in a given
class with the given modifiers, type and name
throws: IllegalArgumentException - If a field with the desired name already exists in the class |
FieldEditor | public FieldEditor(ClassEditor editor, int modifiers, Type type, String name, Object constantValue)(Code) | | Creates a new FieldEditor for editing a field in a given
class with the given modifiers, type, name, and constant value.
Parameters: modifiers - Fields that have a constant value must be static and final throws: IllegalArgumentException - If a field with the desired name already exists in the classor if constantValue is non-null and neither aString , Integer ,Long , Float , norDouble . |
commit | public void commit()(Code) | | Commit changes to the field back to the ClassEditor. Note that the field
is committed regardless of whether or not it is dirty.
|
declaringClass | public ClassEditor declaringClass()(Code) | | Returns the ClassEditor used to edit the class in which this
field resides.
|
delete | public void delete()(Code) | | Marks this field for deletion. Once a field has been marked for deletion
all attempts to change it will throw an
IllegalStateException .
|
fieldInfo | public FieldInfo fieldInfo()(Code) | | Returns the raw FieldInfo of the field being edited.
|
fullName | public String fullName()(Code) | | Returns a String that contains the declaring class name and the name of
the field
|
isDirty | public boolean isDirty()(Code) | | Returns true if this field has been modified.
|
isFinal | public boolean isFinal()(Code) | | |
isPackage | public boolean isPackage()(Code) | | Returns true, if the field has package level visibility.
|
isPrivate | public boolean isPrivate()(Code) | | |
isProtected | public boolean isProtected()(Code) | | |
isPublic | public boolean isPublic()(Code) | | |
isStatic | public boolean isStatic()(Code) | | |
isTransient | public boolean isTransient()(Code) | | |
isVolatile | public boolean isVolatile()(Code) | | |
memberRef | public MemberRef memberRef()(Code) | | Returns a MemberRef for the field
|
name | public String name()(Code) | | Returns the name of the field.
|
nameAndType | public NameAndType nameAndType()(Code) | | Returns a NameAndType of the field.
|
print | public void print(PrintStream out)(Code) | | Print the field.
Parameters: out - Stream to which to print. |
setDirty | public void setDirty(boolean isDirty)(Code) | | Sets the dirty flag of this method. The dirty flag is true if
the method has been modified.
throws: IllegalStateException - This field has been marked for deletion |
type | public Type type()(Code) | | Returns the type of the field.
|
|
|