public abstract class BloatContext extends java.lang.Object implements InlineContext
| Modifier and Type | Field and Description |
|---|---|
protected CallGraph |
callGraph |
static boolean |
DEBUG |
protected java.util.Set |
ignoreClasses |
protected java.util.Set |
ignoreFields |
protected java.util.Set |
ignoreMethods |
protected java.util.Set |
ignorePackages |
protected boolean |
ignoreSystem |
protected InlineStats |
inlineStats |
protected ClassInfoLoader |
loader |
protected java.util.Set |
roots |
| Constructor and Description |
|---|
BloatContext(ClassInfoLoader loader)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addIgnoreClass(Type type)
Notes that a class should be ignored by inlining.
|
void |
addIgnoreField(MemberRef field)
Notes that a field should be ignored by inlining.
|
void |
addIgnoreMethod(MemberRef method)
Notes that a method should be ignored by inlining.
|
void |
addIgnorePackage(java.lang.String name)
Notes that all classes, methods, and fields in a package should be
"ignored" by inlining.
|
abstract void |
commitDirty()
Commits all classes, methods, and fields, that have been modified.
|
protected static void |
db(java.lang.String s) |
CallGraph |
getCallGraph()
Returns the call graph for the program.
|
InlineStats |
getInlineStats()
Returns an InlineStats object for getting statistics about
inlining.
|
boolean |
ignoreClass(Type type)
Returns true if a class should be ignored by inlining.
|
boolean |
ignoreField(MemberRef field)
Returns true if a field should be ignored by inlining.
|
boolean |
ignoreMethod(MemberRef method)
Returns true if a method should be ignored by inlining.
|
static boolean |
isSystem(Type type)
Returns true if the give type is a system class (that is, has
the same class loader as java.lang.String).
|
static void |
main(java.lang.String[] args)
Test the ignore stuff.
|
void |
setIgnoreSystem(boolean ignore)
Sets whether or not we ignore all system classes.
|
void |
setRootMethods(java.util.Set roots)
Sets the root methods for this InlineContext.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcommit, commit, commit, commit, editClass, editClass, editClass, editField, editField, editMethod, editMethod, getHierarchy, loadClass, newClass, newClassInfo, release, release, releasepublic static boolean DEBUG
protected InlineStats inlineStats
protected java.util.Set ignorePackages
protected java.util.Set ignoreClasses
protected java.util.Set ignoreMethods
protected java.util.Set ignoreFields
protected boolean ignoreSystem
protected CallGraph callGraph
protected java.util.Set roots
protected ClassInfoLoader loader
public BloatContext(ClassInfoLoader loader)
protected static void db(java.lang.String s)
public static boolean isSystem(Type type)
public void setRootMethods(java.util.Set roots)
InlineContextsetRootMethods in interface InlineContextroots - The root methods (MemberRefs) of the programpublic CallGraph getCallGraph()
InlineContextgetCallGraph in interface InlineContextpublic InlineStats getInlineStats()
InlineContextgetInlineStats in interface InlineContextpublic void addIgnorePackage(java.lang.String name)
InlineContextaddIgnorePackage in interface InlineContextpublic void addIgnoreClass(Type type)
InlineContextaddIgnoreClass in interface InlineContextpublic void addIgnoreMethod(MemberRef method)
InlineContextaddIgnoreMethod in interface InlineContextpublic void addIgnoreField(MemberRef field)
InlineContextaddIgnoreField in interface InlineContextpublic void setIgnoreSystem(boolean ignore)
InlineContextsetIgnoreSystem in interface InlineContextpublic boolean ignoreClass(Type type)
InlineContextignoreClass in interface InlineContextpublic boolean ignoreMethod(MemberRef method)
InlineContextignoreMethod in interface InlineContextpublic boolean ignoreField(MemberRef field)
InlineContextignoreField in interface InlineContextpublic abstract void commitDirty()
public static void main(java.lang.String[] args)