public class StringReflectionExecutor extends ReflectionExecutor
Modifier and Type | Class and Description |
---|---|
static class |
StringReflectionExecutor.Builder
A builder for
StringReflectionExecutor . |
ReflectionExecutor.InstanceCopyResult
Constructor and Description |
---|
StringReflectionExecutor(ClassPool libraryClassPool) |
Modifier and Type | Method and 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.
|
getMethodResult
public StringReflectionExecutor(ClassPool libraryClassPool)
public java.util.Optional<ReflectionExecutor.InstanceCopyResult> getInstanceOrCopyIfMutable(ReferenceValue instanceValue)
ReflectionExecutor
getInstanceOrCopyIfMutable
in class ReflectionExecutor
instanceValue
- The ReferenceValue
of the instance.public ExecutorInstanceHandler getDefaultInstanceHandler()
ReflectionExecutor
The handler carries information on whether a method returns the same object as its instance.
getDefaultInstanceHandler
in class ReflectionExecutor
public java.util.Set<MethodSignature> getSupportedMethodSignatures()
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.