Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SootClass Class Reference

List of all members.

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

Detailed Description

Instances of this class represent Java classes. They are usually created by a SootClassManager, but can also be constructed manually through the given constructors.

Definition at line 107 of file SootClass.java.


Constructor & Destructor Documentation

SootClass::SootClass String   name [inline]
 

Constructs an empty SootClass with the given name and no modifiers.

Definition at line 125 of file SootClass.java.

SootClass::SootClass String   name,
int   modifiers
[inline]
 

Constructs an empty SootClass with the given name and modifiers.

Definition at line 135 of file SootClass.java.


Member Function Documentation

void SootClass::addField SootField   f [inline]
 

Adds the given field to this class.

Definition at line 153 of file SootClass.java.

void SootClass::addInterface SootClass   interfaceClass [inline]
 

Add the given class to the list of interfaces which are directly implemented by this class.

Definition at line 174 of file SootClass.java.

void SootClass::addMethod SootMethod   m [inline]
 

Adds the given method to this class.

Definition at line 193 of file SootClass.java.

boolean SootClass::declaresField String   name,
Type   type
[inline]
 

Does this class declare a field with the given name and type.

Definition at line 233 of file SootClass.java.

boolean SootClass::declaresField String   name [inline]
 

Does this class declare a field with the given name?

Definition at line 213 of file SootClass.java.

boolean SootClass::declaresMethod String   name,
List   parameterTypes,
Type   returnType
[inline]
 

Does this class declare a method with the given name, parameter types, and return type?

Definition at line 297 of file SootClass.java.

boolean SootClass::declaresMethod String   name,
List   parameterTypes
[inline]
 

Does this class declare a method with the given name and parameter types?

Definition at line 275 of file SootClass.java.

boolean SootClass::declaresMethod String   name [inline]
 

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().

SootField SootClass::getField String   name,
Type   type
[inline]
 

Returns the field of this class with the given name and type.

Definition at line 354 of file SootClass.java.

SootField SootClass::getField String   name [inline]
 

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.

int SootClass::getFieldCount   [inline]
 

Returns the number of fields in this class.

Definition at line 374 of file SootClass.java.

List SootClass::getFields   [inline]
 

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().

int SootClass::getInterfaceCount   [inline]
 

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.

List SootClass::getInterfaces   [inline]
 

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().

SootClassManager SootClass::getManager   [inline]
 

Returns the SootClassManager of this class.

Definition at line 413 of file SootClass.java.

Referenced by Builder::identifyAllocatorsLocks().

SootMethod SootClass::getMethod String   name,
List   parameterTypes,
Type   returnType
[inline]
 

Attempts to retrieve the method with the given name, parameters and return type.

Definition at line 497 of file SootClass.java.

SootMethod SootClass::getMethod String   name,
List   parameterTypes
[inline]
 

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.

SootMethod SootClass::getMethod String   name [inline]
 

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().

int SootClass::getMethodCount   [inline]
 

Returns the number of methods in this class.

Definition at line 524 of file SootClass.java.

List SootClass::getMethods   [inline]
 

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().

int SootClass::getModifiers   [inline]
 

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().

String SootClass::getName   [inline]
 

Returns the name of this class.

Definition at line 551 of file SootClass.java.

Referenced by DynamicMap::addEntry(), Slicer::basicInformation(), Slicer::buildInterfaceAndSuperClassMap(), CodeBrowserPane::buildPackageNode(), TransExtractor::caseInvokeStmt(), Builder::createCollections(), TypeExtractor::createRecordType(), TypeExtractor::createRefType(), Builder::declareClassGlobals(), Builder::declareGlobals(), BOFA::dumpFile(), Slicer::dumpJimpleCode(), DeadlockRelatedCriterion::extractSliceInterestForDL(), PostProcessOnAnnotation::getAllClassesFor(), PostProcessOnAnnotation::getAllPackages(), SootClassManager::getClass(), getField(), CodeBrowserPane::getHierTree(), getMethod(), CallGraphDialog::getNewSootMethod(), LockAnalysis::getSynchAnnotation(), TypeResolver::getTypeVariable(), Builder::identifyAllocatorsLocks(), implementsInterface(), Util::isAncestorOf(), Slicer::isObjectClass(), IndexMaps::lookupSootClassByName(), IndexMaps::lookupSootClassByThread(), ClassInfo::methodsInfoList(), Slicer::outputResidualCls(), resolve(), TransExtractor::threadOperation(), and write().

SootClass SootClass::getSuperClass   [inline]
 

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().

boolean SootClass::hasSuperClass   [inline]
 

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().

boolean SootClass::implementsInterface String   name [inline]
 

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().

boolean SootClass::isManaged   [inline]
 

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.

boolean SootClass::isResolved   [inline]
 

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.

void SootClass::removeField SootField   f [inline]
 

Removes the given field from this class.

Definition at line 739 of file SootClass.java.

Referenced by PostProcess::removeIrrelevantFields().

void SootClass::removeInterface SootClass   interfaceClass [inline]
 

Removes the given class from the list of interfaces which are direclty implemented by this class.

Definition at line 753 of file SootClass.java.

void SootClass::removeMethod SootMethod   m [inline]
 

Removes the given method from this class.

Definition at line 764 of file SootClass.java.

Referenced by PostProcess::rmMethodAndClass().

void SootClass::resolve   [inline]
 

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().

void SootClass::resolveIfNecessary   [inline]
 

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().

void SootClass::setModifiers int   modifiers [inline]
 

Sets the modifiers for this class.

Definition at line 809 of file SootClass.java.

void SootClass::setName String   name [inline]
 

Sets the name of this class.

Definition at line 818 of file SootClass.java.

void SootClass::setResolved boolean   flag [inline]
 

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().

void SootClass::setSuperClass SootClass   c [inline]
 

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.

void SootClass::write BodyExpr   bodyExpr [inline]
 

Writes the class out to a file.

Definition at line 848 of file SootClass.java.


The documentation for this class was generated from the following file:
Generated at Thu Feb 7 07:21:52 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001