public static class Morph.Binder extends Object implements TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph>, MethodLookupEngine.Factory, MethodLookupEngine
Morph
annotation.Modifier and Type | Class and Description |
---|---|
protected static interface |
Morph.Binder.DefaultMethodLocator
A default method locator is responsible for looking up a default method to a given source method.
|
protected class |
Morph.Binder.PrecomputedFinding
A finding that is precomputed to only return methods that are relevant to generating the required proxy.
|
protected static class |
Morph.Binder.RedirectionProxy
A proxy that implements the installed interface in order to allow for a morphed super method invocation.
|
MethodLookupEngine.ConflictingInterfaceMethod, MethodLookupEngine.Default, MethodLookupEngine.Factory, MethodLookupEngine.Finding, MethodLookupEngine.OverridenClassMethod
Modifier | Constructor and Description |
---|---|
protected |
Binder(MethodDescription forwardingMethod)
Creates a new binder.
|
Modifier and Type | Method and Description |
---|---|
MethodDelegationBinder.ParameterBinding<?> |
bind(AnnotationDescription.Loadable<Morph> annotation,
MethodDescription source,
ParameterDescription target,
Implementation.Target implementationTarget,
Assigner assigner)
Creates a parameter binding for the given target parameter.
|
boolean |
equals(Object other) |
Class<Morph> |
getHandledType()
The annotation type that is handled by this parameter binder.
|
int |
hashCode() |
static TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph> |
install(Class<?> type)
Installs a given type for use on a
Morph
annotation. |
static TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph> |
install(TypeDescription typeDescription)
Installs a given type for use on a
Morph
annotation. |
MethodLookupEngine |
make(boolean extractDefaultMethods)
Returns a
MethodLookupEngine . |
MethodLookupEngine.Finding |
process(TypeDescription typeDescription)
Retrieves all methods that can be called on a given type.
|
String |
toString() |
protected Binder(MethodDescription forwardingMethod)
forwardingMethod
- The method which is overridden for generating the proxy class.public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph> install(Class<?> type)
Morph
annotation. The given type must be an interface without any super interfaces and a single method which
maps an Object
array to a Object
type. The use of generics is
permitted.type
- The type to install.Morph
annotation.public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph> install(TypeDescription typeDescription)
Morph
annotation. The given type must be an interface without any super interfaces and a single method which
maps an Object
array to a Object
type. The use of generics is
permitted.typeDescription
- The type to install.Morph
annotation.public Class<Morph> getHandledType()
TargetMethodAnnotationDrivenBinder.ParameterBinder
getHandledType
in interface TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph>
Annotation.annotationType()
handled by this parameter binder.public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<Morph> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner)
TargetMethodAnnotationDrivenBinder.ParameterBinder
bind
in interface TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph>
annotation
- The annotation that was cause for the delegation to this argument binder.source
- The intercepted source method.target
- Tge target parameter that is subject to be bound to
intercepting the source
method.implementationTarget
- The target of the current implementation that is subject to this binding.assigner
- An assigner that can be used for applying the binding.public MethodLookupEngine make(boolean extractDefaultMethods)
MethodLookupEngine.Factory
MethodLookupEngine
.make
in interface MethodLookupEngine.Factory
extractDefaultMethods
- true
if interface default methods should be resolved.MethodLookupEngine
.public MethodLookupEngine.Finding process(TypeDescription typeDescription)
MethodLookupEngine
Class.getMethods()
, methods of identical
signature of incompatible interfaces must only be returned once. These methods should be represented by some
sort of virtual method description which is fully aware of its state. All virtually invokable methods must be
contained in this lookup. Static methods, constructors and private methods must however only be contained
for the actual class's type.
The
process
in interface MethodLookupEngine
typeDescription
- The type for which all invokable methods should be looked up.Copyright © 2014–2015. All rights reserved.