See: Description
Interface | Description |
---|---|
Value |
An immutable symbolic value for the semantic interpretation of bytecode.
|
Class | Description |
---|---|
Analyzer<V extends Value> |
A semantic bytecode analyzer.
|
BasicInterpreter |
An
Interpreter for BasicValue values. |
BasicValue |
A
Value that is represented with its type in a seven types type system. |
BasicVerifier |
An extended
BasicInterpreter that checks that bytecode instructions are correctly used. |
Frame<V extends Value> |
A symbolic execution stack frame.
|
Interpreter<V extends Value> |
A semantic bytecode interpreter.
|
SimpleVerifier |
An extended
BasicVerifier that performs more precise verifications. |
SourceInterpreter |
An
Interpreter for SourceValue values. |
SourceValue |
A
Value which keeps track of the bytecode instructions that can produce it. |
Exception | Description |
---|---|
AnalyzerException |
An exception thrown if a problem occurs during the analysis of a method.
|
Provides a framework for static code analysis based on the asm.tree package.
Basic usage:
ClassReader classReader = new ClassReader(bytecode); ClassNode classNode = new ClassNode(); classReader.accept(classNode, ClassReader.SKIP_DEBUG); for (MethodNode method : classNode.methods) { if (method.instructions.size() > 0) { Analyzer analyzer = new Analyzer(new BasicInterpreter()); analyzer.analyze(classNode.name, method); Frame[] frames = analyzer.getFrames(); // Elements of the frames array now contains info for each instruction // from the analyzed method. BasicInterpreter creates BasicValue, that // is using simplified type system that distinguishes the UNINITIALZED, // INT, FLOAT, LONG, DOUBLE, REFERENCE and RETURNADDRESS types. ... } }
Copyright © 2020. All rights reserved.