类 ExecutingInvocationUnit.Builder
- java.lang.Object
-
- proguard.evaluation.ExecutingInvocationUnit.Builder
-
public static class ExecutingInvocationUnit.Builder extends java.lang.ObjectBuilds anExecutingInvocationUnit.
-
-
字段概要
字段 修饰符和类型 字段 说明 protected booleanenableSameInstanceIdApproximationprotected java.util.List<Executor.Builder<?>>registeredExecutorBuildersprotected booleanuseDefaultStringReflectionExecutor
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.
-
-
-
字段详细资料
-
enableSameInstanceIdApproximation
protected boolean enableSameInstanceIdApproximation
-
useDefaultStringReflectionExecutor
protected boolean useDefaultStringReflectionExecutor
-
registeredExecutorBuilders
protected java.util.List<Executor.Builder<?>> registeredExecutorBuilders
-
-
方法详细资料
-
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
public 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.- 参数:
allowNonFinalConstants- whether reading from non-final constants should be enabled.
-
addExecutor
public 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.- 参数:
executor- AExecutor.Builderof theExecutorto be added.
-
addExecutors
public 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.- 参数:
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
public ExecutingInvocationUnit build(ValueFactory valueFactory)
Build theExecutingInvocationUnitdefined by this builder instance.- 参数:
valueFactory- TheValueFactoryresponsible for creating result values.- 返回:
- The built
ExecutingInvocationUnit
-
buildWithoutDefaults
public ExecutingInvocationUnit buildWithoutDefaults(ValueFactory valueFactory)
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
-
-