public static class ValueAnalyzer.Builder
extends java.lang.Object
ValueAnalyzer.
Each separate built ValueAnalyzer uses its own BamCache, so different
analyzers won't share results, while all execution of ValueAnalyzer.analyze(MethodSignature) from the same analyzer will use the same cache.
| Constructor and Description |
|---|
Builder(JvmCfa cfa,
ClassPool programClassPool,
ClassPool libraryClassPool)
Create a builder for a
ValueAnalyzer using a default ExecutingInvocationUnit. |
Builder(JvmCfa cfa,
ExecutingInvocationUnit.Builder invocationUnitBuilder)
Create a builder for a
ValueAnalyzer using a custom ExecutingInvocationUnit. |
| Modifier and Type | Method and Description |
|---|---|
ValueAnalyzer |
build()
Build a
ValueAnalyzer. |
ValueAnalyzer.Builder |
setAbortOperator(AbortOperator abortOperator)
Sets the abort operator to allow premature CPA algorithm termination.
|
ValueAnalyzer.Builder |
setMaxCallStackDepth(int maxCallStackDepth)
Set the max depth call depth of the inter-procedural analysis.
|
public Builder(JvmCfa cfa, ClassPool programClassPool, ClassPool libraryClassPool)
ValueAnalyzer using a default ExecutingInvocationUnit.
The InvocationUnit defines how to handle invocations of LibraryMethods through custom Executors.
The only executor for the default invocation unit is StringReflectionExecutor.
public Builder(JvmCfa cfa, ExecutingInvocationUnit.Builder invocationUnitBuilder)
ValueAnalyzer using a custom ExecutingInvocationUnit.
The InvocationUnit defines how to handle invocations of LibraryMethods.
public ValueAnalyzer build()
ValueAnalyzer.public ValueAnalyzer.Builder setMaxCallStackDepth(int maxCallStackDepth)
LibraryMethods are usually not analyzed).
The default value is 10.
maxCallStackDepth - maximum depth of the call stack analyzed inter-procedurally. 0 means
intra-procedural analysis. < 0 means no maximum depth.ValueAnalyzer builder.public ValueAnalyzer.Builder setAbortOperator(AbortOperator abortOperator)
The default operator never aborts the analysis.
abortOperator - an AbortOperator.ValueAnalyzer builder.