Package proguard.analysis.cpa.util
Class ValueAnalyzer.Builder
java.lang.Object
proguard.analysis.cpa.util.ValueAnalyzer.Builder
- Enclosing class:
- ValueAnalyzer
Class to configure and build a
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 Summary
ConstructorsConstructorDescriptionCreate a builder for aValueAnalyzerusing a defaultExecutingInvocationUnit.Builder(JvmCfa cfa, ExecutingInvocationUnit.Builder invocationUnitBuilder) Create a builder for aValueAnalyzerusing a customExecutingInvocationUnit. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aValueAnalyzer.setAbortOperator(AbortOperator abortOperator) Sets the abort operator to allow premature CPA algorithm termination.setMaxCallStackDepth(int maxCallStackDepth) Set the max depth call depth of the inter-procedural analysis.
-
Constructor Details
-
Builder
Create a builder for aValueAnalyzerusing a defaultExecutingInvocationUnit.The
InvocationUnitdefines how to handle invocations ofLibraryMethods through customExecutors.The only executor for the default invocation unit is
StringReflectionExecutor. -
Builder
Create a builder for aValueAnalyzerusing a customExecutingInvocationUnit.The
InvocationUnitdefines how to handle invocations ofLibraryMethods.
-
-
Method Details
-
build
Build aValueAnalyzer. -
setMaxCallStackDepth
Set the max depth call depth of the inter-procedural analysis. After the max depth has been reached, the analysis will provide a default result for the method (i.e., in the same wayLibraryMethods are usually not analyzed).The default value is 10.
- Parameters:
maxCallStackDepth- maximum depth of the call stack analyzed inter-procedurally. 0 means intra-procedural analysis.< 0means no maximum depth.- Returns:
- this
ValueAnalyzerbuilder.
-
setAbortOperator
Sets the abort operator to allow premature CPA algorithm termination.The default operator never aborts the analysis.
- Parameters:
abortOperator- anAbortOperator.- Returns:
- this
ValueAnalyzerbuilder.
-