Public Methods | |
SootClass (String name) | |
SootClass (String name, int modifiers) | |
void | addField (SootField f) throws AlreadyDeclaredException |
void | addInterface (SootClass interfaceClass) throws DuplicateNameException |
void | addMethod (SootMethod m) throws AlreadyDeclaredException |
boolean | declaresField (String name) |
boolean | declaresField (String name, Type type) |
boolean | declaresMethod (String name) |
boolean | declaresMethod (String name, List parameterTypes) |
boolean | declaresMethod (String name, List parameterTypes, Type returnType) |
SootField | getField (String name) throws ca.mcgill.sable.soot.NoSuchFieldException, ca.mcgill.sable.soot.AmbiguousFieldException |
SootField | getField (String name, Type type) throws ca.mcgill.sable.soot.NoSuchFieldException |
int | getFieldCount () |
List | getFields () |
int | getInterfaceCount () |
List | getInterfaces () |
SootClassManager | getManager () throws NotManagedException |
SootMethod | getMethod (String name) throws ca.mcgill.sable.soot.NoSuchMethodException, ca.mcgill.sable.soot.AmbiguousMethodException |
SootMethod | getMethod (String name, List parameterTypes) throws ca.mcgill.sable.soot.NoSuchMethodException, ca.mcgill.sable.soot.AmbiguousMethodException |
SootMethod | getMethod (String name, List parameterTypes, Type returnType) throws ca.mcgill.sable.soot.NoSuchMethodException |
int | getMethodCount () |
List | getMethods () |
int | getModifiers () |
String | getName () |
SootClass | getSuperClass () throws NoSuperClassException |
boolean | hasSuperClass () |
boolean | implementsInterface (String name) |
boolean | isManaged () |
boolean | isResolved () |
void | printTo (BodyExpr bodyExpr, PrintWriter out) |
void | printTo (BodyExpr bodyExpr, PrintWriter out, int printBodyOptions) |
void | removeField (SootField f) throws IncorrectDeclarerException |
void | removeInterface (SootClass interfaceClass) throws NoSuchInterfaceException |
void | removeMethod (SootMethod m) throws IncorrectDeclarerException |
void | resolve () |
void | resolveIfNecessary () |
void | setModifiers (int modifiers) |
void | setName (String name) throws DuplicateNameException |
void | setResolved (boolean flag) |
void | setSuperClass (SootClass c) |
String | toString () |
void | write (BodyExpr bodyExpr) |
Private Attributes | |
String | name |
int | modifiers |
List | fields = new ArrayList() |
List | methods = new ArrayList() |
List | interfaces = new ArrayList() |
SootClassManager | manager |
boolean | isManaged |
SootClass | superClass |
boolean | isResolved |
Definition at line 107 of file SootClass.java.
|
Constructs an empty SootClass with the given name and no modifiers. Definition at line 125 of file SootClass.java. |
|
Constructs an empty SootClass with the given name and modifiers. Definition at line 135 of file SootClass.java. |
|
Adds the given field to this class. Definition at line 153 of file SootClass.java. |
|
Add the given class to the list of interfaces which are directly implemented by this class. Definition at line 174 of file SootClass.java. |
|
Adds the given method to this class. Definition at line 193 of file SootClass.java. |
|
Does this class declare a field with the given name and type. Definition at line 233 of file SootClass.java. |
|
Does this class declare a field with the given name? Definition at line 213 of file SootClass.java. |
|
Does this class declare a method with the given name, parameter types, and return type? Definition at line 297 of file SootClass.java. |
|
Does this class declare a method with the given name and parameter types? Definition at line 275 of file SootClass.java. |
|
Does this class declare a method with the given name? Definition at line 254 of file SootClass.java. Referenced by BOFA::analyze(), Slicer::basicInformation(), Slicer::collectReachableMethods(), Builder::declareClassGlobals(), MethodVariantManager::findDeclaringMethod(), Util::getDeclaringClass(), Slicer::getInvokedMdsFrom(), Slicer::getStartingMethods(), ClassTokenSimple::initClass(), PostProcessOnAnnotation::removeFieldInClinit(), and PostProcess::removeFieldInClinit().
|
|
Returns the field of this class with the given name and type. Definition at line 354 of file SootClass.java. |
|
Returns the field of this class with the given name. May throw an AmbiguousFieldException if there are more than one. Definition at line 322 of file SootClass.java. |
|
Returns the number of fields in this class. Definition at line 374 of file SootClass.java. |
|
Returns a backed list of fields. Definition at line 382 of file SootClass.java. Referenced by TypeExtractor::addFields(), CodeBrowserPane::buildClassNode(), Builder::declareClassGlobals(), declaresField(), getField(), Slicer::haveStaticFields(), ClassTokenSimple::initClass(), PostProcessOnAnnotation::removeIrrelevantFields(), and PostProcess::removeIrrelevantFields().
|
|
Returns the number of interfaces being directly implemented by this class. Note that direct implementation corresponds to an "implements" keyword in the Java class file and that this class may still be implementing additional interfaces in the usual sense by being a subclass of a class which directly implements some interfaces. Definition at line 395 of file SootClass.java. |
|
Returns a backed list of the interfaces that are direclty implemented by this class. (see getInterfaceCount()) Definition at line 403 of file SootClass.java. Referenced by Slicer::buildInterfaceAndSuperClassMap(), TypeExtractor::createRefType(), TypeExtractor::getInterfaceClasses(), DynamicMap::getInterfaces(), implementsInterface(), PostProcessOnAnnotation::isImplementingOneAbstractMd(), and PostProcess::isImplementingOneAbstractMd().
|
|
Returns the SootClassManager of this class. Definition at line 413 of file SootClass.java. Referenced by Builder::identifyAllocatorsLocks().
|
|
Attempts to retrieve the method with the given name, parameters and return type. Definition at line 497 of file SootClass.java. |
|
Attempts to retrieve the method with the given name and parameters. This method may throw an AmbiguousMethodException if there are more than one method with the given name and parameter. Definition at line 460 of file SootClass.java. |
|
Attempts to retrieve the method with the given name. This method may throw an AmbiguousMethodException if there are more than one method with the given name. Definition at line 423 of file SootClass.java. Referenced by BOFA::analyze(), Slicer::basicInformation(), Builder::buildThread(), VInvokeCallBack::callback(), FGExpr::caseChooseExpr(), Slicer::collectReachableMethods(), Builder::declareClassGlobals(), MethodVariantManager::findDeclaringMethod(), IndexMaps::getImplementedMd(), IndexMaps::getInvokeMethodForStart(), Slicer::getInvokedMdsFrom(), CallGraphDialog::getNewSootMethod(), Slicer::getStartingMethods(), ClassTokenSimple::initClass(), PostProcessOnAnnotation::isImplementingOneAbstractMd(), PostProcess::isImplementingOneAbstractMd(), PostProcessOnAnnotation::isImplementingOneInterfaceMd(), PostProcess::isImplementingOneInterfaceMd(), PostProcessOnAnnotation::removeFieldInClinit(), PostProcess::removeFieldInClinit(), and TransExtractor::threadOperation().
|
|
Returns the number of methods in this class. Definition at line 524 of file SootClass.java. |
|
Returns a backed list of methods. Definition at line 532 of file SootClass.java. Referenced by InfoAnalysis::InfoAnalysis(), Demo::analyze(), Slicer::basicInformation(), CodeBrowserPane::buildClassNode(), Slicer::buildInterfaceAndSuperClassMap(), Builder::declareGlobals(), declaresMethod(), Decompiler::decompile(), DeadlockRelatedCriterion::extractSliceInterestForDL(), getMethod(), PostProcessOnAnnotation::getModifiedSootClasses(), Slicer::getStartingMethods(), Builder::identifyAllocatorsLocks(), PostProcessOnAnnotation::rmMethodAndClass(), and PostProcess::rmMethodAndClass().
|
|
Returns the modifiers of this class. Definition at line 542 of file SootClass.java. Referenced by Slicer::basicInformation(), Slicer::buildInterfaceAndSuperClassMap(), DeadlockRelatedCriterion::extractSliceInterestForDL(), PostProcessOnAnnotation::isImplementingOneAbstractMd(), PostProcess::isImplementingOneAbstractMd(), PostProcessOnAnnotation::isImplementingOneInterfaceMd(), and PostProcess::isImplementingOneInterfaceMd().
|
|
|
Returns the superclass of this class. (see hasSuperClass()) Definition at line 559 of file SootClass.java. Referenced by Slicer::buildInterfaceAndSuperClassMap(), Builder::createRecordAndArrayTypes(), TypeExtractor::createRefType(), MethodVariantManager::findDeclaringMethod(), Util::getDeclaringClass(), IndexMaps::getInvokeMethodForStart(), BuildPDG::getSpecialInvokeStmtOf(), TypeExtractor::getSuperClasses(), Builder::identifyAllocatorsLocks(), ClassTokenSimple::initClass(), Util::isAncestorOf(), PostProcessOnAnnotation::isImplementingOneAbstractMd(), PostProcess::isImplementingOneAbstractMd(), and IndexMaps::lookupSootClassByThread().
|
|
Does this class have a superclass? False implies that this is the java.lang.Object class. Note that interfaces are subclasses of the java.lang.Object class. Definition at line 580 of file SootClass.java. Referenced by Slicer::buildInterfaceAndSuperClassMap(), Builder::createRecordAndArrayTypes(), TypeExtractor::createRefType(), MethodVariantManager::findDeclaringMethod(), Util::getDeclaringClass(), TypeExtractor::getSuperClasses(), Builder::identifyAllocatorsLocks(), ClassTokenSimple::initClass(), Util::isAncestorOf(), PostProcessOnAnnotation::isImplementingOneAbstractMd(), and PostProcess::isImplementingOneAbstractMd().
|
|
Does this class directly implement the given interface? (see getInterfaceCount()) Definition at line 590 of file SootClass.java. Referenced by addInterface(), IndexMaps::lookupSootClassByThread(), and removeInterface().
|
|
Is this class being managed by a SootClassManager? A class may be unmanaged while it is being constructed. Definition at line 610 of file SootClass.java. |
|
Have the methods and fields for this class been loaded? False indicates that the class has been referred to but is not resolved in this sense. Definition at line 636 of file SootClass.java. |
|
Removes the given field from this class. Definition at line 739 of file SootClass.java. Referenced by PostProcess::removeIrrelevantFields().
|
|
Removes the given class from the list of interfaces which are direclty implemented by this class. Definition at line 753 of file SootClass.java. |
|
Removes the given method from this class. Definition at line 764 of file SootClass.java. Referenced by PostProcess::rmMethodAndClass().
|
|
Resolves the class by loading the fields and methods from the original class file. This creates SootFields and SootMethods. Definition at line 778 of file SootClass.java. Referenced by resolveIfNecessary(), and Demo::soot().
|
|
Resolves the class if it has not been resolved yet. Definition at line 800 of file SootClass.java. Referenced by addField(), addInterface(), addMethod(), declaresField(), declaresMethod(), getField(), getFields(), getInterfaces(), getMethod(), getMethods(), getModifiers(), getSuperClass(), hasSuperClass(), implementsInterface(), Main::main(), removeField(), removeMethod(), setModifiers(), and setSuperClass().
|
|
Sets the modifiers for this class. Definition at line 809 of file SootClass.java. |
|
Sets the name of this class. Definition at line 818 of file SootClass.java. |
|
Establishes the resolution state of the class (see isResolved()). This is useful when constructing the class such as with Coffi. Definition at line 827 of file SootClass.java. Referenced by SootClassManager::getClass().
|
|
Sets the superclass of this class. Note that passing a null will cause the class to have no superclass. Definition at line 835 of file SootClass.java. |
|
Writes the class out to a file. Definition at line 848 of file SootClass.java. |