public static class Advice.DynamicValue.ForSerializedValue extends Object implements Advice.DynamicValue<Annotation>
Advice.DynamicValue.ForFieldValue, Advice.DynamicValue.ForFixedValue, Advice.DynamicValue.ForParameterValue, Advice.DynamicValue.ForSerializedValue
Modifier | Constructor and Description |
---|---|
protected |
ForSerializedValue(TypeDescription typeDescription,
String value)
Creates a new dynamic value for representing a serializable value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
int |
hashCode() |
protected static Advice.DynamicValue<Annotation> |
of(Serializable value)
Creates a dynamic value for binding to an annotation for representing a serializable value.
|
StackManipulation |
resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
ParameterDescription.InDefinedShape target,
AnnotationDescription.Loadable<Annotation> annotation,
Assigner assigner,
boolean initialized)
Resolves a constant value that is mapped to a parameter that is annotated with a custom bound annotation:
A primitive wrapper value allow binding of the primitive which is optionally boxed but never unboxed.
|
String |
toString() |
protected ForSerializedValue(TypeDescription typeDescription, String value)
typeDescription
- The represented type.value
- The string-representation of the serializable value.protected static Advice.DynamicValue<Annotation> of(Serializable value)
value
- The value to represent.public StackManipulation resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<Annotation> annotation, Assigner assigner, boolean initialized)
Advice.DynamicValue
Resolves a constant value that is mapped to a parameter that is annotated with a custom bound annotation:
Class
or TypeDescription
indicate the binding of a type constant.FieldDescription
indicates binding the field value. The field must be visible and be declared by a super type or
be static. A field value is optionally boxed but never unboxed,ParameterDescription
indicates binding the assigned argument value. The parameter must be declared by the instrumented method.
The parameter value is optionally boxed but never unboxed,Serializable
value is serialized and stored Base64 encoded in the constant pool.resolve
in interface Advice.DynamicValue<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.assigner
- The assigner to use.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.Copyright © 2014–2016. All rights reserved.