protected class DynamicType.Builder.AbstractBase.DefaultMatchedMethodInterception extends Object implements DynamicType.Builder.MatchedMethodInterception<S>
DynamicType.Builder.MatchedMethodInterception
for which a method was recently
identified or defined such that an Implementation
for these methods can
now be defined.Modifier | Constructor and Description |
---|---|
protected |
DefaultMatchedMethodInterception(LatentMethodMatcher methodMatcher,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens)
Creates a new instance of a default matched method interception.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
hashCode() |
DynamicType.Builder.MethodAnnotationTarget<S> |
intercept(Implementation implementation)
Intercepts the currently selected method by a given implementation.
|
String |
toString() |
DynamicType.Builder.MethodAnnotationTarget<S> |
withDefaultValue(Object value)
Defines a default annotation value to set for any matched method.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
withDefaultValue(Object value,
Class<?> type)
Defines a default annotation value to set for any matched method.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
withoutCode()
Implements the currently selected methods as
abstract methods. |
protected DefaultMatchedMethodInterception(LatentMethodMatcher methodMatcher, List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens)
methodMatcher
- The latent method matcher that identifies this interception.methodTokens
- A list of all method tokens that were previously defined.public DynamicType.Builder.MethodAnnotationTarget<S> intercept(Implementation implementation)
DynamicType.Builder.MatchedMethodInterception
intercept
in interface DynamicType.Builder.MatchedMethodInterception<S>
implementation
- An implementation to apply to the currently selected method.public DynamicType.Builder.MethodAnnotationTarget<S> withoutCode()
DynamicType.Builder.MatchedMethodInterception
abstract
methods.withoutCode
in interface DynamicType.Builder.MatchedMethodInterception<S>
abstract
methods.public DynamicType.Builder.MethodAnnotationTarget<S> withDefaultValue(Object value, Class<?> type)
DynamicType.Builder.MatchedMethodInterception
withDefaultValue
in interface DynamicType.Builder.MatchedMethodInterception<S>
value
- The value that the annotation property should set as a default.type
- The type of the annotation property.public DynamicType.Builder.MethodAnnotationTarget<S> withDefaultValue(Object value)
DynamicType.Builder.MatchedMethodInterception
enum
values should be handed as AnnotationDescription.EnumerationValue
instances, annotations as AnnotationDescription
instances and
Class
values as TypeDescription
instances. Other values are handed in their raw format or as their wrapper types.withDefaultValue
in interface DynamicType.Builder.MatchedMethodInterception<S>
value
- A non-loaded value that the annotation property should set as a default.Copyright © 2014–2015. All rights reserved.