public interface EditorContext
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Commits all changes made to classes, methods, and fields.
|
void |
commit(ClassInfo info)
Commits the changes made to a class.
|
void |
commit(FieldInfo info)
Commits the changes made to a field.
|
void |
commit(MethodInfo info)
Commits the changes made to a method.
|
ClassEditor |
editClass(ClassInfo info)
Returns a ClassEditor used to edit a class described by a
given ClassInfo.
|
ClassEditor |
editClass(java.lang.String className)
Returns a ClassEditor used to edit a class of a given name.
|
ClassEditor |
editClass(Type classType)
Returns a ClassEditor used to edit a class described by a
given Type.
|
FieldEditor |
editField(FieldInfo info)
Returns a FieldEditor for editing a FieldInfo.
|
FieldEditor |
editField(MemberRef field)
Returns a FieldEditor for editing a field.
|
MethodEditor |
editMethod(MemberRef method)
Returns a MethodEditor for editing a method.
|
MethodEditor |
editMethod(MethodInfo info)
Returns a MethodEditor for editing a method.
|
ClassHierarchy |
getHierarchy()
Returns the ClassHierarchy of all classes and interfaces known
to BLOAT.
|
ClassInfo |
loadClass(java.lang.String className)
Loads a class into BLOAT
|
ClassEditor |
newClass(int modifiers,
java.lang.String className,
Type superType,
Type[] interfaces)
Returns a
ClassEditor for editing a new class with the
given name. |
ClassInfo |
newClassInfo(int modifiers,
int classIndex,
int superClassIndex,
int[] interfaceIndexes,
java.util.List constants)
Creates a new
ClassInfo |
void |
release(ClassInfo info)
Signals that we are done editing a class.
|
void |
release(FieldInfo info)
Signals that we are done editing a field.
|
void |
release(MethodInfo info)
Signals that we are done editing a method.
|
ClassInfo loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionClassInfo newClassInfo(int modifiers, int classIndex, int superClassIndex, int[] interfaceIndexes, java.util.List constants)
ClassInfomodifiers - The modifiers describing the newly-created classclassIndex - The index of the name of the newly-created class in its
constant poolsuperClassIndex - The index of the name of the newly-created class's superclass
in its constant poolinterfaceIndexes - The indexes of the names of the interfaces that the
newly-created class implementsconstants - The constant pool for the newly created class (a list of
Constants).ClassHierarchy getHierarchy()
ClassEditor newClass(int modifiers, java.lang.String className, Type superType, Type[] interfaces)
ClassEditor for editing a new class with the
given name. It will override any class with the given name that is
already being edited.ClassEditor editClass(java.lang.String className) throws java.lang.ClassNotFoundException, ClassFormatException
java.lang.ClassNotFoundExceptionClassFormatExceptionClassEditor editClass(Type classType) throws java.lang.ClassNotFoundException, ClassFormatException
java.lang.ClassNotFoundExceptionClassFormatExceptionClassEditor editClass(ClassInfo info)
FieldEditor editField(FieldInfo info)
FieldEditor editField(MemberRef field) throws java.lang.NoSuchFieldException
java.lang.NoSuchFieldExceptionMethodEditor editMethod(MethodInfo info)
MethodEditor editMethod(MemberRef method) throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodExceptionvoid release(MethodInfo info)
void release(FieldInfo info)
void release(ClassInfo info)
void commit(ClassInfo info)
void commit(MethodInfo info)
void commit(FieldInfo info)
void commit()