T - The annotation type this factory binds.@HashCodeAndEqualsPlugin.Enhance public static class Advice.OffsetMapping.ForSerializedValue.Factory<T extends java.lang.annotation.Annotation> extends java.lang.Object implements Advice.OffsetMapping.Factory<T>
Advice.OffsetMapping.Factory.AdviceType, Advice.OffsetMapping.Factory.Illegal<T extends java.lang.annotation.Annotation>, Advice.OffsetMapping.Factory.Simple<T extends java.lang.annotation.Annotation>| Modifier and Type | Field and Description |
|---|---|
private java.lang.Class<T> |
annotationType
The annotation type.
|
private StackManipulation |
deserialization
The stack manipulation that loads the represented value.
|
private TypeDescription |
typeDescription
The type description as which to treat the deserialized value.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Factory(java.lang.Class<T> annotationType,
TypeDescription typeDescription,
StackManipulation deserialization)
Creates a factory for loading a deserialized value.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<T> |
getAnnotationType()
Returns the annotation type of this factory.
|
Advice.OffsetMapping |
make(ParameterDescription.InDefinedShape target,
AnnotationDescription.Loadable<T> annotation,
Advice.OffsetMapping.Factory.AdviceType adviceType)
Creates a new offset mapping for the supplied parameter if possible.
|
static <S extends java.lang.annotation.Annotation> |
of(java.lang.Class<S> annotationType,
java.io.Serializable target,
java.lang.Class<?> targetType)
Creates a factory for an offset mapping that loads the provided value.
|
private final java.lang.Class<T extends java.lang.annotation.Annotation> annotationType
private final TypeDescription typeDescription
private final StackManipulation deserialization
protected Factory(java.lang.Class<T> annotationType, TypeDescription typeDescription, StackManipulation deserialization)
annotationType - The annotation type.typeDescription - The type description as which to treat the deserialized value.deserialization - The stack manipulation that loads the represented value.public static <S extends java.lang.annotation.Annotation> Advice.OffsetMapping.Factory<S> of(java.lang.Class<S> annotationType, java.io.Serializable target, java.lang.Class<?> targetType)
S - The annotation type the created factory binds.annotationType - The annotation type to be bound.target - The instance representing the value to be deserialized.targetType - The target type as which to use the target value.public java.lang.Class<T> getAnnotationType()
getAnnotationType in interface Advice.OffsetMapping.Factory<T extends java.lang.annotation.Annotation>public Advice.OffsetMapping make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType)
make in interface Advice.OffsetMapping.Factory<T extends java.lang.annotation.Annotation>target - The parameter description for which to resolve an offset mapping.annotation - The annotation that triggered this factory.adviceType - true if the binding is applied using advice method delegation.null if no mapping can be resolved for this parameter.