Package proguard.evaluation
Class ExecutingInvocationUnit.Builder
- java.lang.Object
- 
- proguard.evaluation.ExecutingInvocationUnit.Builder
 
- 
- Enclosing class:
- ExecutingInvocationUnit
 
 public static class ExecutingInvocationUnit.Builder extends java.lang.ObjectBuilds anExecutingInvocationUnit.
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleanenableSameInstanceIdApproximationprotected java.util.List<Executor.Builder<?>>registeredExecutorBuildersprotected booleanuseDefaultStringReflectionExecutor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutingInvocationUnit.BuilderaddExecutor(Executor.Builder<?> executor)Add anExecutorto be considered by theExecutingInvocationUnitwhen trying to analyze a method call.ExecutingInvocationUnit.BuilderaddExecutors(Executor.Builder<?>... executors)Add multipleExecutors to be considered by theExecutingInvocationUnitwhen trying to analyze a method call.ExecutingInvocationUnitbuild(ValueFactory valueFactory)Build theExecutingInvocationUnitdefined by this builder instance.ExecutingInvocationUnitbuildWithoutDefaults(ValueFactory valueFactory)Build theExecutingInvocationUnitdefined by this builder instance, do not add the default executor even if otherwise specified.ExecutingInvocationUnit.BuildersetAllowNonFinalConstants(boolean allowNonFinalConstants)By default, the ExecutingInvocationUnit will read constant value attributes from static final fields.ExecutingInvocationUnit.BuildersetEnableSameInstanceIdApproximation(boolean enableSameInstanceIdApproximation)For methods that are not supported by any executor, decide, whether a method with matching return and instance types should be treated as a method which returns its instance.ExecutingInvocationUnit.BuilderuseDefaultStringReflectionExecutor(boolean useDefaultStringReflectionExecutor)Set this flag to false if theExecutingInvocationUnitshould not useStringReflectionExecutorby default.
 
- 
- 
- 
Field Detail- 
enableSameInstanceIdApproximationprotected boolean enableSameInstanceIdApproximation 
 - 
useDefaultStringReflectionExecutorprotected boolean useDefaultStringReflectionExecutor 
 - 
registeredExecutorBuildersprotected java.util.List<Executor.Builder<?>> registeredExecutorBuilders 
 
- 
 - 
Method Detail- 
setEnableSameInstanceIdApproximationpublic ExecutingInvocationUnit.Builder setEnableSameInstanceIdApproximation(boolean enableSameInstanceIdApproximation) For methods that are not supported by any executor, decide, whether a method with matching return and instance types should be treated as a method which returns its instance. In such a case, setting this flag to true will result in no new ID being created for the return value.- Parameters:
- enableSameInstanceIdApproximation- whether the approximation should be enabled.
 
 - 
setAllowNonFinalConstantspublic ExecutingInvocationUnit.Builder setAllowNonFinalConstants(boolean allowNonFinalConstants) By default, the ExecutingInvocationUnit will read constant value attributes from static final fields. This method allows for reading constant value attributes from non-final static fields as well.- Parameters:
- allowNonFinalConstants- whether reading from non-final constants should be enabled.
 
 - 
addExecutorpublic ExecutingInvocationUnit.Builder addExecutor(Executor.Builder<?> executor) Add anExecutorto be considered by theExecutingInvocationUnitwhen trying to analyze a method call.N.B.: If a method is supported by different executors the first one added gets priority. If useDefaultStringReflectionExecutor(boolean)is not set tofalsethe defaultStringReflectionExecutorhas the highest priority.- Parameters:
- executor- A- Executor.Builderof the- Executorto be added.
 
 - 
addExecutorspublic ExecutingInvocationUnit.Builder addExecutors(Executor.Builder<?>... executors) Add multipleExecutors to be considered by theExecutingInvocationUnitwhen trying to analyze a method call.N.B.: If a method is supported by different executors the first one added gets priority. If useDefaultStringReflectionExecutor(boolean)is not set tofalsethe defaultStringReflectionExecutorhas the highest priority.- Parameters:
- executors-- Executor.Builders of the- Executors to be added.
 
 - 
useDefaultStringReflectionExecutorpublic ExecutingInvocationUnit.Builder useDefaultStringReflectionExecutor(boolean useDefaultStringReflectionExecutor) Set this flag to false if theExecutingInvocationUnitshould not useStringReflectionExecutorby default.- Parameters:
- useDefaultStringReflectionExecutor- whether a default- StringReflectionExecutorshould be used.
 
 - 
buildpublic ExecutingInvocationUnit build(ValueFactory valueFactory) Build theExecutingInvocationUnitdefined by this builder instance.- Parameters:
- valueFactory- The- ValueFactoryresponsible for creating result values.
- Returns:
- The built ExecutingInvocationUnit
 
 - 
buildWithoutDefaultspublic ExecutingInvocationUnit buildWithoutDefaults(ValueFactory valueFactory) Build theExecutingInvocationUnitdefined by this builder instance, do not add the default executor even if otherwise specified.- Parameters:
- valueFactory- The- ValueFactoryresponsible for creating result values.
- Returns:
- The built ExecutingInvocationUnit
 
 
- 
 
-