类 ExecutingInvocationUnit.Builder
java.lang.Object
proguard.evaluation.ExecutingInvocationUnit.Builder
Builds an
ExecutingInvocationUnit.-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明addExecutor(Executor.Builder<?> executor) Add anExecutorto be considered by theExecutingInvocationUnitwhen trying to analyze a method call.addExecutors(Executor.Builder<?>... executors) Add multipleExecutors to be considered by theExecutingInvocationUnitwhen trying to analyze a method call.build(ValueFactory valueFactory) Build theExecutingInvocationUnitdefined by this builder instance.buildWithoutDefaults(ValueFactory valueFactory) Build theExecutingInvocationUnitdefined by this builder instance, do not add the default executor even if otherwise specified.setAllowNonFinalConstants(boolean allowNonFinalConstants) By default, the ExecutingInvocationUnit will read constant value attributes from static final fields.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.useDefaultStringReflectionExecutor(boolean useDefaultStringReflectionExecutor) Set this flag to false if theExecutingInvocationUnitshould not useStringReflectionExecutorby default.
-
字段详细资料
-
enableSameInstanceIdApproximation
protected boolean enableSameInstanceIdApproximation -
useDefaultStringReflectionExecutor
protected boolean useDefaultStringReflectionExecutor -
registeredExecutorBuilders
-
-
构造器详细资料
-
Builder
-
-
方法详细资料
-
setEnableSameInstanceIdApproximation
public 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.- 参数:
enableSameInstanceIdApproximation- whether the approximation should be enabled.
-
setAllowNonFinalConstants
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.- 参数:
allowNonFinalConstants- whether reading from non-final constants should be enabled.
-
addExecutor
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.- 参数:
executor- AExecutor.Builderof theExecutorto be added.
-
addExecutors
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.- 参数:
executors-Executor.Builders of theExecutors to be added.
-
useDefaultStringReflectionExecutor
public ExecutingInvocationUnit.Builder useDefaultStringReflectionExecutor(boolean useDefaultStringReflectionExecutor) Set this flag to false if theExecutingInvocationUnitshould not useStringReflectionExecutorby default.- 参数:
useDefaultStringReflectionExecutor- whether a defaultStringReflectionExecutorshould be used.
-
build
Build theExecutingInvocationUnitdefined by this builder instance.- 参数:
valueFactory- TheValueFactoryresponsible for creating result values.- 返回:
- The built
ExecutingInvocationUnit
-
buildWithoutDefaults
Build theExecutingInvocationUnitdefined by this builder instance, do not add the default executor even if otherwise specified.- 参数:
valueFactory- TheValueFactoryresponsible for creating result values.- 返回:
- The built
ExecutingInvocationUnit
-