Class ExecutorMethodInstanceHandler
java.lang.Object
proguard.evaluation.executor.instancehandler.ExecutorMethodInstanceHandler
- All Implemented Interfaces:
ExecutorInstanceHandler
This
ExecutorInstanceHandler decides whether a method always returns its calling instance
based on a mapping of class names to a StringMatcher for method names.-
Constructor Summary
ConstructorsConstructorDescriptionExecutorMethodInstanceHandler(Map<String, StringMatcher> alwaysReturnsOwnInstance) Creates anExecutorMethodInstanceHandlerusing the given mapping. -
Method Summary
Modifier and TypeMethodDescriptionbooleanreturnsOwnInstance(String internalClassName, String methodName) Return whether the method always returns its calling instance.
-
Constructor Details
-
ExecutorMethodInstanceHandler
Creates anExecutorMethodInstanceHandlerusing the given mapping.- Parameters:
alwaysReturnsOwnInstance- A mapping from class names to a matcher for methods that return a new instance
-
-
Method Details
-
returnsOwnInstance
Description copied from interface:ExecutorInstanceHandlerReturn whether the method always returns its calling instance. If unknown, return false.- Specified by:
returnsOwnInstancein interfaceExecutorInstanceHandler
-