public class ExecutorMethodInstanceHandler extends java.lang.Object implements ExecutorInstanceHandler
ExecutorInstanceHandler
decides whether a method always returns its calling instance
based on a mapping of class names to a StringMatcher
for method names.Constructor and Description |
---|
ExecutorMethodInstanceHandler(java.util.Map<java.lang.String,StringMatcher> alwaysReturnsOwnInstance)
Creates an
ExecutorMethodInstanceHandler using the given mapping. |
Modifier and Type | Method and Description |
---|---|
boolean |
returnsOwnInstance(java.lang.String internalClassName,
java.lang.String methodName)
Return whether the method always returns its calling instance.
|
public ExecutorMethodInstanceHandler(java.util.Map<java.lang.String,StringMatcher> alwaysReturnsOwnInstance)
ExecutorMethodInstanceHandler
using the given mapping.alwaysReturnsOwnInstance
- A mapping from class names to a matcher for methods that return
a new instancepublic boolean returnsOwnInstance(java.lang.String internalClassName, java.lang.String methodName)
ExecutorInstanceHandler
returnsOwnInstance
in interface ExecutorInstanceHandler