|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--soot.tagkit.AbstractHost | +--soot.SootClass
Soot representation of a Java class. They are usually created by a Scene, but can also be constructed manually through the given constructors.
Constructor Summary | |
SootClass(java.lang.String name)
Constructs an empty SootClass with the given name and no modifiers. |
|
SootClass(java.lang.String name,
int modifiers)
Constructs an empty SootClass with the given name and modifiers. |
Method Summary | |
void |
addField(SootField f)
Adds the given field to this class. |
void |
addInterface(SootClass interfaceClass)
Add the given class to the list of interfaces which are directly implemented by this class. |
void |
addMethod(SootMethod m)
Adds the given method to this class. |
boolean |
declaresField(java.lang.String subsignature)
Does this class declare a field with the given subsignature? |
boolean |
declaresField(java.lang.String name,
Type type)
Does this class declare a field with the given name and type. |
boolean |
declaresFieldByName(java.lang.String name)
Does this class declare a field with the given name? |
boolean |
declaresMethod(java.lang.String subsignature)
Does this class declare a method with the given subsignature? |
boolean |
declaresMethod(java.lang.String name,
java.util.List parameterTypes)
Does this class declare a method with the given name and parameter types? |
boolean |
declaresMethod(java.lang.String name,
java.util.List parameterTypes,
Type returnType)
Does this class declare a method with the given name, parameter types, and return type? |
boolean |
declaresMethodByName(java.lang.String name)
Does this class declare a method with the given name? |
SootField |
getField(java.lang.String subsignature)
|
SootField |
getField(java.lang.String name,
Type type)
Returns the field of this class with the given name and type. |
SootField |
getFieldByName(java.lang.String name)
Returns the field of this class with the given name. |
int |
getFieldCount()
Returns the number of fields in this class. |
Chain |
getFields()
Returns a backed Chain of fields. |
int |
getInterfaceCount()
Returns the number of interfaces being directly implemented by this class. |
Chain |
getInterfaces()
Returns a backed Chain of the interfaces that are directly implemented by this class. |
SootMethod |
getMethod(java.lang.String subsignature)
|
SootMethod |
getMethod(java.lang.String name,
java.util.List parameterTypes)
Attempts to retrieve the method with the given name and parameters. |
SootMethod |
getMethod(java.lang.String name,
java.util.List parameterTypes,
Type returnType)
Attempts to retrieve the method with the given name, parameters and return type. |
SootMethod |
getMethodByName(java.lang.String name)
Attempts to retrieve the method with the given name. |
int |
getMethodCount()
Returns the number of methods in this class. |
Chain |
getMethods()
Returns a backed Chain of methods. |
int |
getModifiers()
Returns the modifiers of this class. |
java.lang.String |
getName()
Returns the name of this class. |
java.lang.String |
getPackageName()
Returns the package name of this class. |
SootClass |
getSuperclass()
Returns the superclass of this class. |
RefType |
getType()
Returns the RefType corresponding to this class. |
boolean |
hasSuperclass()
Does this class have a superclass? False implies that this is the java.lang.Object class. |
boolean |
implementsInterface(java.lang.String name)
Does this class directly implement the given interface? (see getInterfaceCount()) |
boolean |
isApplicationClass()
Convenience method returning true if this class is an application class. |
boolean |
isContextClass()
Convenience method returning true if this class is a context class. |
boolean |
isInScene()
Returns true if this class is being managed by a Scene. |
boolean |
isInterface()
Convenience method; returns true if this class is an interface. |
boolean |
isLibraryClass()
Convenience method returning true if this class is a library class. |
boolean |
isPhantom()
Convenience method returning true if this class is phantom. |
boolean |
isPhantomClass()
Convenience method returning true if this class is a phantom class. |
boolean |
isPublic()
Convenience method; returns true if this class is public. |
void |
printJimpleStyleTo(java.io.PrintWriter out,
int printBodyOptions)
|
void |
printTo(java.io.PrintWriter out)
Prints this SootClass to the given PrintWriter, including active bodies of methods. |
void |
printTo(java.io.PrintWriter out,
int printBodyOptions)
|
void |
removeField(SootField f)
Removes the given field from this class. |
void |
removeInterface(SootClass interfaceClass)
Removes the given class from the list of interfaces which are direclty implemented by this class. |
void |
removeMethod(SootMethod m)
Removes the given method from this class. |
void |
renameFieldsAndMethods(boolean privateOnly)
|
void |
setApplicationClass()
Makes this class an application class. |
void |
setContextClass()
Makes this class a context class. |
void |
setInScene(boolean isInScene)
Tells this class if it is being managed by a Scene. |
void |
setLibraryClass()
Makes this class a library class. |
void |
setModifiers(int modifiers)
Sets the modifiers for this class. |
void |
setName(java.lang.String name)
Sets the name of this class. |
void |
setPhantom(boolean value)
Marks this class as phantom, without notifying the Scene. |
void |
setPhantomClass()
Makes this class a phantom class. |
void |
setSuperclass(SootClass c)
Sets the superclass of this class. |
java.lang.String |
toString()
Returns the name of this class. |
void |
write()
Writes the class out to a file. |
void |
write(java.lang.String outputDir)
Writes the class out to a file. |
Methods inherited from class soot.tagkit.AbstractHost |
addTag, getTag, getTags, hasTag, removeTag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SootClass(java.lang.String name, int modifiers)
public SootClass(java.lang.String name)
Method Detail |
public boolean isInScene()
public void setInScene(boolean isInScene)
public int getFieldCount()
public Chain getFields()
public void addField(SootField f)
public void removeField(SootField f)
public SootField getField(java.lang.String name, Type type)
public SootField getFieldByName(java.lang.String name)
public SootField getField(java.lang.String subsignature)
public boolean declaresField(java.lang.String subsignature)
public SootMethod getMethod(java.lang.String subsignature)
public boolean declaresMethod(java.lang.String subsignature)
public boolean declaresFieldByName(java.lang.String name)
public boolean declaresField(java.lang.String name, Type type)
public int getMethodCount()
public Chain getMethods()
public SootMethod getMethod(java.lang.String name, java.util.List parameterTypes, Type returnType)
public SootMethod getMethod(java.lang.String name, java.util.List parameterTypes)
public SootMethod getMethodByName(java.lang.String name)
public boolean declaresMethod(java.lang.String name, java.util.List parameterTypes)
public boolean declaresMethod(java.lang.String name, java.util.List parameterTypes, Type returnType)
public boolean declaresMethodByName(java.lang.String name)
public void addMethod(SootMethod m)
public void removeMethod(SootMethod m)
public int getModifiers()
public void setModifiers(int modifiers)
public int getInterfaceCount()
public Chain getInterfaces()
public boolean implementsInterface(java.lang.String name)
public void addInterface(SootClass interfaceClass)
public void removeInterface(SootClass interfaceClass)
public boolean hasSuperclass()
public SootClass getSuperclass()
public void setSuperclass(SootClass c)
public java.lang.String getName()
public java.lang.String getPackageName()
public void setName(java.lang.String name)
public boolean isInterface()
public boolean isPublic()
public void printTo(java.io.PrintWriter out)
public void printJimpleStyleTo(java.io.PrintWriter out, int printBodyOptions)
public void printTo(java.io.PrintWriter out, int printBodyOptions)
public void write()
public void write(java.lang.String outputDir)
public RefType getType()
public java.lang.String toString()
toString
in class java.lang.Object
public void renameFieldsAndMethods(boolean privateOnly)
public boolean isApplicationClass()
Scene.getApplicationClasses()
public void setApplicationClass()
public boolean isLibraryClass()
Scene.getLibraryClasses()
public void setLibraryClass()
public boolean isContextClass()
Scene.getContextClasses()
public void setContextClass()
public boolean isPhantomClass()
Scene.getPhantomClasses()
public void setPhantomClass()
public boolean isPhantom()
public void setPhantom(boolean value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |