Class ExecutorMethodInstanceHandler
- java.lang.Object
-
- proguard.evaluation.executor.instancehandler.ExecutorMethodInstanceHandler
-
- All Implemented Interfaces:
ExecutorInstanceHandler
public class ExecutorMethodInstanceHandler extends java.lang.Object implements ExecutorInstanceHandler
ThisExecutorInstanceHandler
decides whether a method always returns its calling instance based on a mapping of class names to aStringMatcher
for method names.
-
-
Constructor Summary
Constructors Constructor Description ExecutorMethodInstanceHandler(java.util.Map<java.lang.String,StringMatcher> alwaysReturnsOwnInstance)
Creates anExecutorMethodInstanceHandler
using the given mapping.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
returnsOwnInstance(java.lang.String internalClassName, java.lang.String methodName)
Return whether the method always returns its calling instance.
-
-
-
Constructor Detail
-
ExecutorMethodInstanceHandler
public ExecutorMethodInstanceHandler(java.util.Map<java.lang.String,StringMatcher> alwaysReturnsOwnInstance)
Creates anExecutorMethodInstanceHandler
using the given mapping.- Parameters:
alwaysReturnsOwnInstance
- A mapping from class names to a matcher for methods that return a new instance
-
-
Method Detail
-
returnsOwnInstance
public boolean returnsOwnInstance(java.lang.String internalClassName, java.lang.String methodName)
Description copied from interface:ExecutorInstanceHandler
Return whether the method always returns its calling instance. If unknown, return false.- Specified by:
returnsOwnInstance
in interfaceExecutorInstanceHandler
-
-