Package proguard.evaluation.executor
Class StringReflectionExecutor
- java.lang.Object
-
- proguard.evaluation.executor.ReflectionExecutor
-
- proguard.evaluation.executor.StringReflectionExecutor
-
- All Implemented Interfaces:
Executor
public class StringReflectionExecutor extends ReflectionExecutor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StringReflectionExecutor.Builder
A builder forStringReflectionExecutor
.-
Nested classes/interfaces inherited from class proguard.evaluation.executor.ReflectionExecutor
ReflectionExecutor.InstanceCopyResult
-
-
Constructor Summary
Constructors Constructor Description StringReflectionExecutor(ClassPool libraryClassPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutorInstanceHandler
getDefaultInstanceHandler()
Provides a default instance handler used by the executor in case the reflective execution fails.java.util.Optional<ReflectionExecutor.InstanceCopyResult>
getInstanceOrCopyIfMutable(ReferenceValue instanceValue)
Get an object which will act as the calling instance.java.util.Set<MethodSignature>
getSupportedMethodSignatures()
Get a list of method signatures that indicate which methods are supported by this executor.-
Methods inherited from class proguard.evaluation.executor.ReflectionExecutor
getMethodResult
-
-
-
-
Constructor Detail
-
StringReflectionExecutor
public StringReflectionExecutor(ClassPool libraryClassPool)
-
-
Method Detail
-
getInstanceOrCopyIfMutable
public java.util.Optional<ReflectionExecutor.InstanceCopyResult> getInstanceOrCopyIfMutable(ReferenceValue instanceValue)
Description copied from class:ReflectionExecutor
Get an object which will act as the calling instance. If we know that executing the method does not modify the instance this can just be the same value. Otherwise, a copy should be returned in order to not change the reference whose state may be of interest at the end of an analysis.- Specified by:
getInstanceOrCopyIfMutable
in classReflectionExecutor
- Parameters:
instanceValue
- TheReferenceValue
of the instance.- Returns:
- The new calling instance.
-
getDefaultInstanceHandler
public ExecutorInstanceHandler getDefaultInstanceHandler()
Description copied from class:ReflectionExecutor
Provides a default instance handler used by the executor in case the reflective execution fails.The handler carries information on whether a method returns the same object as its instance.
- Specified by:
getDefaultInstanceHandler
in classReflectionExecutor
- Returns:
- the default instance handler.
-
getSupportedMethodSignatures
public java.util.Set<MethodSignature> getSupportedMethodSignatures()
Description copied from interface:Executor
Get a list of method signatures that indicate which methods are supported by this executor.The returned methods should be exactly the ones that the executor is expected to be able to handle. The invocation unit does not make any additional assumption on the executors available to execute a method and will match them iff the signature of the target method matches exactly.
Only full method signatures should be returned, the invocation unit does not support wildcards.
- Returns:
- a set of methods the executor can handle.
-
-