Package soot.jimple.parser
Class JimpleAST
- java.lang.Object
-
- soot.jimple.parser.JimpleAST
-
public class JimpleAST extends Object
This class encapsulates a JimpleAST instance and provides methods to act on it.
-
-
Constructor Summary
Constructors Constructor Description JimpleAST(InputStream aJIS)Constructs a JimpleAST and generates its parse tree from the given InputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SootClasscreateSootClass()Reads an entire class from jimple, creates the Soot objects & returns it.BodygetBody(SootMethod m)Returns a body corresponding to the parsed jimple for m.Set<String>getCstPool()Extracts the reference constant pool for this JimpleAST.SootResolvergetResolver()Returns the SootResolver currently in use.voidgetSkeleton(SootClass sc)Applies a SkeletonExtractorWalker to the given SootClass, using the given Resolver to resolve the reference types it contains.
-
-
-
Constructor Detail
-
JimpleAST
public JimpleAST(InputStream aJIS) throws ParserException, LexerException, IOException
Constructs a JimpleAST and generates its parse tree from the given InputStream.- Parameters:
aJIS- The InputStream to parse.- Throws:
ParserExceptionLexerExceptionIOException
-
-
Method Detail
-
createSootClass
public SootClass createSootClass()
Reads an entire class from jimple, creates the Soot objects & returns it.
-
getSkeleton
public void getSkeleton(SootClass sc)
Applies a SkeletonExtractorWalker to the given SootClass, using the given Resolver to resolve the reference types it contains. The given SootClass instance will be filled to contain a class skeleton: that is no Body instances will be created for the class' methods.- Parameters:
sc- a SootClass to fill in.
-
getBody
public Body getBody(SootMethod m)
Returns a body corresponding to the parsed jimple for m. If necessary, applies the BodyExtractorWalker to initialize the bodies map.- Parameters:
m- the method we want to get a body for.- Returns:
- the actual body for the given method.
-
getCstPool
public Set<String> getCstPool()
Extracts the reference constant pool for this JimpleAST.- Returns:
- the Set of RefTypes for the reference types contained this AST.
-
getResolver
public SootResolver getResolver()
Returns the SootResolver currently in use.
-
-