public class ByteBuddy.MatchedMethodInterception extends Object implements ByteBuddy.MethodInterceptable
Modifier and Type | Field and Description |
---|---|
protected LatentMethodMatcher |
methodMatcher
A method matcher that represents the current method selection.
|
Modifier | Constructor and Description |
---|---|
protected |
MatchedMethodInterception(LatentMethodMatcher methodMatcher)
Creates a new matched method interception.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
hashCode() |
ByteBuddy.MethodAnnotationTarget |
intercept(Implementation implementation)
Intercepts the currently selected methods with the provided implementation.
|
String |
toString() |
ByteBuddy.MethodAnnotationTarget |
withDefaultValue(Object value)
Defines a default annotation value to set for any matched method.
|
ByteBuddy.MethodAnnotationTarget |
withDefaultValue(Object value,
Class<?> type)
Defines a default annotation value to set for any matched method.
|
ByteBuddy.MethodAnnotationTarget |
withoutCode()
Implements the currently selected methods as
abstract methods. |
protected final LatentMethodMatcher methodMatcher
protected MatchedMethodInterception(LatentMethodMatcher methodMatcher)
methodMatcher
- The method matcher representing the current method selection.public ByteBuddy.MethodAnnotationTarget intercept(Implementation implementation)
ByteBuddy.MethodInterceptable
intercept
in interface ByteBuddy.MethodInterceptable
implementation
- The implementation to apply to the currently selected method.public ByteBuddy.MethodAnnotationTarget withoutCode()
ByteBuddy.MethodInterceptable
abstract
methods.withoutCode
in interface ByteBuddy.MethodInterceptable
abstract
methods.public ByteBuddy.MethodAnnotationTarget withDefaultValue(Object value, Class<?> type)
ByteBuddy.MethodInterceptable
withDefaultValue
in interface ByteBuddy.MethodInterceptable
value
- The value that the annotation property should set as a default.type
- The type of the annotation property.public ByteBuddy.MethodAnnotationTarget withDefaultValue(Object value)
ByteBuddy.MethodInterceptable
enum
values should be handed as EnumerationDescription
instances, annotations as AnnotationDescription
instances and
Class
values as TypeDescription
instances. Other values are handed in their actual form or as their wrapper types.withDefaultValue
in interface ByteBuddy.MethodInterceptable
value
- A non-loaded value that the annotation property should set as a default.Copyright © 2014–2015. All rights reserved.