|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soot.tagkit.AbstractHost soot.SootClass
public class SootClass
Soot representation of a Java class. They are usually created by a Scene, but can also be constructed manually through the given constructors.
Field Summary | |
---|---|
static int |
BODIES
|
static int |
DANGLING
|
protected Chain<SootField> |
fields
|
protected String |
fixedPackageName
|
protected String |
fixedShortName
|
static int |
HIERARCHY
|
protected Chain<SootClass> |
interfaces
|
static String |
INVOKEDYNAMIC_DUMMY_CLASS_NAME
|
protected boolean |
isInScene
|
protected boolean |
isPhantom
|
protected List<SootMethod> |
methodList
|
protected int |
modifiers
|
protected String |
name
|
protected SootClass |
outerClass
|
protected String |
packageName
|
protected String |
shortName
|
static int |
SIGNATURES
|
protected SmallNumberedMap |
subSigToMethods
|
protected SootClass |
superClass
|
Constructor Summary | |
---|---|
SootClass(String name)
Constructs an empty SootClass with the given name and no modifiers. |
|
SootClass(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. |
void |
checkLevel(int level)
|
boolean |
containsBafBody()
Returns true if some method in this class has an active Baf body. |
boolean |
declaresField(String subsignature)
Does this class declare a field with the given subsignature? |
boolean |
declaresField(String name,
Type type)
Does this class declare a field with the given name and type. |
boolean |
declaresFieldByName(String name)
Does this class declare a field with the given name? |
boolean |
declaresMethod(NumberedString subsignature)
Does this class declare a method with the given subsignature? |
boolean |
declaresMethod(String subsignature)
Does this class declare a method with the given subsignature? |
boolean |
declaresMethod(String name,
List parameterTypes)
Does this class declare a method with the given name and parameter types? |
boolean |
declaresMethod(String name,
List parameterTypes,
Type returnType)
Does this class declare a method with the given name, parameter types, and return type? |
boolean |
declaresMethodByName(String name)
Does this class declare a method with the given name? |
SootField |
getField(String subsignature)
|
SootField |
getField(String name,
Type type)
Returns the field of this class with the given name and type. |
SootField |
getFieldByName(String name)
Returns the field of this class with the given name. |
int |
getFieldCount()
Returns the number of fields in this class. |
Chain<SootField> |
getFields()
Returns a backed Chain of fields. |
int |
getInterfaceCount()
Returns the number of interfaces being directly implemented by this class. |
Chain<SootClass> |
getInterfaces()
Returns a backed Chain of the interfaces that are directly implemented by this class. |
String |
getJavaPackageName()
|
String |
getJavaStyleName()
|
SootMethod |
getMethod(NumberedString subsignature)
|
SootMethod |
getMethod(String subsignature)
|
SootMethod |
getMethod(String name,
List parameterTypes)
Attempts to retrieve the method with the given name and parameters. |
SootMethod |
getMethod(String name,
List parameterTypes,
Type returnType)
|
SootMethod |
getMethodByName(String name)
Attempts to retrieve the method with the given name. |
int |
getMethodCount()
Returns the number of methods in this class. |
List<SootMethod> |
getMethods()
|
int |
getModifiers()
Returns the modifiers of this class. |
String |
getName()
Returns the name of this class. |
int |
getNumber()
|
SootClass |
getOuterClass()
|
String |
getPackageName()
Returns the package name of this class. |
String |
getShortJavaStyleName()
|
String |
getShortName()
|
SootClass |
getSuperclass()
WARNING: interfaces are subclasses of the java.lang.Object class! Returns the superclass of this class. |
RefType |
getType()
Returns the RefType corresponding to this class. |
boolean |
hasOuterClass()
|
boolean |
hasRefType()
|
boolean |
hasSuperclass()
WARNING: interfaces are subclasses of the java.lang.Object class! Does this class have a superclass? False implies that this is the java.lang.Object class. |
boolean |
implementsInterface(String name)
Does this class directly implement the given interface? (see getInterfaceCount()) |
boolean |
isAbstract()
Convenience method returning true if this class is abstract. |
boolean |
isApplicationClass()
Convenience method returning true if this class is an application class. |
boolean |
isConcrete()
Returns true if this class is not an interface and not abstract. |
boolean |
isInScene()
|
boolean |
isInterface()
Convenience method; returns true if this class is an interface. |
boolean |
isJavaLibraryClass()
Sometimes we need to know which class is a JDK class. |
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 |
isPrivate()
Convenience method returning true if this class is private. |
boolean |
isProtected()
Convenience method returning true if this class is protected. |
boolean |
isPublic()
Convenience method; returns true if this class is public. |
Iterator<SootMethod> |
methodIterator()
Returns an iterator over the methods in this class. |
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)
|
int |
resolvingLevel()
|
void |
setApplicationClass()
Makes this class an application 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(String name)
Sets the name of this class. |
void |
setNumber(int number)
|
void |
setOuterClass(SootClass c)
|
void |
setPhantom(boolean value)
Marks this class as phantom, without notifying the Scene. |
void |
setPhantomClass()
Makes this class a phantom class. |
void |
setRefType(RefType refType)
|
void |
setResolvingLevel(int newLevel)
|
void |
setSuperclass(SootClass c)
Sets the superclass of this class. |
String |
toString()
Returns the name of this class. |
Methods inherited from class soot.tagkit.AbstractHost |
---|
addAllTagsOf, addTag, getTag, getTags, hasTag, removeAllTags, removeTag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String name
protected String shortName
protected String fixedShortName
protected String packageName
protected String fixedPackageName
protected int modifiers
protected Chain<SootField> fields
protected SmallNumberedMap subSigToMethods
protected List<SootMethod> methodList
protected Chain<SootClass> interfaces
protected boolean isInScene
protected SootClass superClass
protected SootClass outerClass
protected boolean isPhantom
public static final String INVOKEDYNAMIC_DUMMY_CLASS_NAME
public static final int DANGLING
public static final int HIERARCHY
public static final int SIGNATURES
public static final int BODIES
Constructor Detail |
---|
public SootClass(String name, int modifiers)
public SootClass(String name)
Method Detail |
---|
public void checkLevel(int level)
public int resolvingLevel()
public void setResolvingLevel(int newLevel)
public boolean isInScene()
public void setInScene(boolean isInScene)
public int getFieldCount()
public Chain<SootField> getFields()
public void addField(SootField f)
public void removeField(SootField f)
public SootField getField(String name, Type type)
public SootField getFieldByName(String name)
public SootField getField(String subsignature)
public boolean declaresField(String subsignature)
public SootMethod getMethod(NumberedString subsignature)
public boolean declaresMethod(NumberedString subsignature)
public SootMethod getMethod(String subsignature)
public boolean declaresMethod(String subsignature)
public boolean declaresFieldByName(String name)
public boolean declaresField(String name, Type type)
public int getMethodCount()
public Iterator<SootMethod> methodIterator()
public List<SootMethod> getMethods()
public SootMethod getMethod(String name, List parameterTypes, Type returnType)
public SootMethod getMethod(String name, List parameterTypes)
public SootMethod getMethodByName(String name)
public boolean declaresMethod(String name, List parameterTypes)
public boolean declaresMethod(String name, List parameterTypes, Type returnType)
public boolean declaresMethodByName(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<SootClass> getInterfaces()
public boolean implementsInterface(String name)
public void addInterface(SootClass interfaceClass)
public void removeInterface(SootClass interfaceClass)
public boolean hasSuperclass()
public SootClass getSuperclass()
public void setSuperclass(SootClass c)
public boolean hasOuterClass()
public SootClass getOuterClass()
public void setOuterClass(SootClass c)
public String getName()
public String getJavaStyleName()
public String getShortJavaStyleName()
public String getShortName()
public String getPackageName()
public String getJavaPackageName()
public void setName(String name)
public boolean isInterface()
public boolean isConcrete()
public boolean isPublic()
public boolean containsBafBody()
public void setRefType(RefType refType)
public boolean hasRefType()
public RefType getType()
public String toString()
toString
in class Object
public void renameFieldsAndMethods(boolean privateOnly)
public boolean isApplicationClass()
Scene.getApplicationClasses()
public void setApplicationClass()
public boolean isLibraryClass()
Scene.getLibraryClasses()
public void setLibraryClass()
public boolean isJavaLibraryClass()
public boolean isPhantomClass()
Scene.getPhantomClasses()
public void setPhantomClass()
public boolean isPhantom()
public void setPhantom(boolean value)
public boolean isPrivate()
public boolean isProtected()
public boolean isAbstract()
public final int getNumber()
getNumber
in interface Numberable
public final void setNumber(int number)
setNumber
in interface Numberable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |