T
- The type of the annotation for which a property is bound.public static class Advice.DynamicValue.ForAnnotationProperty<T extends Annotation> extends Object implements Advice.DynamicValue<T>
Advice.DynamicValue.ForAnnotationProperty<T extends Annotation>, Advice.DynamicValue.ForFixedValue
Modifier | Constructor and Description |
---|---|
protected |
ForAnnotationProperty(MethodDescription.InDefinedShape annotationProperty)
Creates a new dynamic value for an annotation property.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
hashCode() |
protected static <T extends Annotation> |
of(Class<? extends T> type,
String property)
Locates the annotation property of the given name or throws an exception if no such property exists.
|
Object |
resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
ParameterDescription.InDefinedShape target,
AnnotationDescription.Loadable<T> annotation,
boolean initialized)
Resolves a constant value that is mapped to a parameter that is annotated with a custom bound annotation.
|
String |
toString() |
protected ForAnnotationProperty(MethodDescription.InDefinedShape annotationProperty)
annotationProperty
- The annotation property.protected static <T extends Annotation> Advice.DynamicValue<T> of(Class<? extends T> type, String property)
T
- The type of the annotation.type
- The annotation type being bound.property
- The name of the annotation property.public Object resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation, boolean initialized)
Advice.DynamicValue
resolve
in interface Advice.DynamicValue<T extends Annotation>
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method onto which this advice is applied.target
- The target parameter that is bound.annotation
- The annotation that triggered this binding.initialized
- true
if the method is initialized when the value is bound, i.e. that the value is not
supplied to a constructor before the super constructor was invoked.null
to assign this value.Copyright © 2014–2016. All rights reserved.