public class PersistentBloatContext extends BloatContext
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map |
classEditors |
protected java.util.Map |
classInfos |
static boolean |
DB_COMMIT |
protected java.util.Map |
fieldEditors |
protected java.util.Map |
fieldInfos |
protected ClassHierarchy |
hierarchy |
protected java.util.Map |
methodEditors |
protected java.util.Map |
methodInfos |
callGraph, DEBUG, ignoreClasses, ignoreFields, ignoreMethods, ignorePackages, ignoreSystem, inlineStats, loader, roots| Modifier | Constructor and Description |
|---|---|
|
PersistentBloatContext(ClassInfoLoader loader)
Constructor.
|
protected |
PersistentBloatContext(ClassInfoLoader loader,
boolean closure)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addClasses(java.util.Collection classes)
Adds a bunch of (names of) classes to the hierarchy.
|
protected static void |
comm(java.lang.String s) |
void |
commit()
Commits all changes made to classes, methods, and fields.
|
void |
commit(ClassInfo info)
Classes that are ignored are not committed.
|
void |
commit(FieldInfo info)
Commits the changes made to a field.
|
void |
commit(MethodInfo info)
Commits the changes made to a method.
|
void |
commitDirty()
Commits all classes, methods, and fields, that have been modified.
|
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(ClassEditor ce) |
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.
|
addIgnoreClass, addIgnoreField, addIgnoreMethod, addIgnorePackage, db, getCallGraph, getInlineStats, ignoreClass, ignoreField, ignoreMethod, isSystem, main, setIgnoreSystem, setRootMethodsprotected final ClassHierarchy hierarchy
protected java.util.Map classInfos
protected java.util.Map methodInfos
protected java.util.Map fieldInfos
protected java.util.Map classEditors
protected java.util.Map methodEditors
protected java.util.Map fieldEditors
public static boolean DB_COMMIT
public PersistentBloatContext(ClassInfoLoader loader)
protected PersistentBloatContext(ClassInfoLoader loader, boolean closure)
loader - Used to load classesclosure - Do we look for the maximum number of classes?protected static void comm(java.lang.String s)
protected void addClasses(java.util.Collection classes)
public ClassInfo loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
EditorContextjava.lang.ClassNotFoundExceptionpublic ClassInfo newClassInfo(int modifiers, int classIndex, int superClassIndex, int[] interfaceIndexes, java.util.List constants)
EditorContextClassInfomodifiers - 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).public ClassHierarchy getHierarchy()
EditorContextpublic ClassEditor newClass(int modifiers, java.lang.String className, Type superType, Type[] interfaces)
EditorContextClassEditor for editing a new class with the
given name. It will override any class with the given name that is
already being edited.public ClassEditor editClass(java.lang.String className) throws java.lang.ClassNotFoundException, ClassFormatException
EditorContextjava.lang.ClassNotFoundExceptionClassFormatExceptionpublic ClassEditor editClass(Type classType) throws java.lang.ClassNotFoundException, ClassFormatException
EditorContextjava.lang.ClassNotFoundExceptionClassFormatExceptionpublic ClassEditor editClass(ClassInfo info)
EditorContextpublic MethodEditor editMethod(MemberRef method) throws java.lang.NoSuchMethodException
EditorContextjava.lang.NoSuchMethodExceptionpublic MethodEditor editMethod(MethodInfo info)
EditorContextpublic FieldEditor editField(MemberRef field) throws java.lang.NoSuchFieldException
EditorContextjava.lang.NoSuchFieldExceptionpublic FieldEditor editField(FieldInfo info)
EditorContextpublic void release(ClassInfo info)
EditorContextpublic void release(ClassEditor ce)
public void release(MethodInfo info)
EditorContextpublic void release(FieldInfo info)
EditorContextpublic void commit(ClassInfo info)
BloatContext.ignoreClass(Type)public void commit(MethodInfo info)
EditorContextpublic void commit(FieldInfo info)
EditorContextpublic void commit()
EditorContextpublic void commitDirty()
BloatContextcommitDirty in class BloatContext