T
- The type of the bound annotation.@HashCodeAndEqualsPlugin.Enhance public static class Advice.OffsetMapping.ForArgument.Resolved.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 ParameterDescription |
parameterDescription
The bound parameter.
|
private boolean |
readOnly
true if the factory should create a read-only binding. |
private Assigner.Typing |
typing
The typing to use.
|
Constructor and Description |
---|
Factory(java.lang.Class<T> annotationType,
ParameterDescription parameterDescription)
Creates a new factory for binding a parameter of the instrumented method with read-only semantics and static typing.
|
Factory(java.lang.Class<T> annotationType,
ParameterDescription parameterDescription,
boolean readOnly,
Assigner.Typing typing)
Creates a new factory for binding a parameter of the instrumented method.
|
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.
|
private final java.lang.Class<T extends java.lang.annotation.Annotation> annotationType
private final ParameterDescription parameterDescription
private final boolean readOnly
true
if the factory should create a read-only binding.private final Assigner.Typing typing
public Factory(java.lang.Class<T> annotationType, ParameterDescription parameterDescription)
annotationType
- The annotation type.parameterDescription
- The bound parameter.public Factory(java.lang.Class<T> annotationType, ParameterDescription parameterDescription, boolean readOnly, Assigner.Typing typing)
annotationType
- The annotation type.parameterDescription
- The bound parameter.readOnly
- true
if the factory should create a read-only binding.typing
- The typing to use.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.