T
- The annotation type this factory binds.@HashCodeAndEqualsPlugin.Enhance public static class Advice.OffsetMapping.ForStackManipulation.Factory<T extends Annotation> extends Object implements Advice.OffsetMapping.Factory<T>
Advice.OffsetMapping.Factory.AdviceType, Advice.OffsetMapping.Factory.Illegal<T extends Annotation>, Advice.OffsetMapping.Factory.Simple<T extends Annotation>
Constructor and Description |
---|
Factory(Class<T> annotationType,
ConstantValue constant)
Creates a new factory for binding a Java constant.
|
Factory(Class<T> annotationType,
EnumerationDescription enumerationDescription)
Creates a new factory for binding an enumeration.
|
Factory(Class<T> annotationType,
StackManipulation stackManipulation,
TypeDescription.Generic typeDescription)
Creates a new factory for binding a stack manipulation.
|
Factory(Class<T> annotationType,
TypeDescription typeDescription)
Creates a new factory for binding a type description.
|
Modifier and Type | Method and Description |
---|---|
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 Annotation> |
of(Class<S> annotationType,
Object value)
Creates a binding for a fixed
String , a primitive value or a method handle or type. |
public Factory(Class<T> annotationType, TypeDescription typeDescription)
annotationType
- The annotation type.typeDescription
- The type to bind.public Factory(Class<T> annotationType, EnumerationDescription enumerationDescription)
annotationType
- The annotation type.enumerationDescription
- The enumeration to bind.public Factory(Class<T> annotationType, ConstantValue constant)
annotationType
- The annotation type.constant
- The bound constant value.public Factory(Class<T> annotationType, StackManipulation stackManipulation, TypeDescription.Generic typeDescription)
annotationType
- The annotation type.stackManipulation
- The stack manipulation that loads the bound value.typeDescription
- The type of the loaded value.public static <S extends Annotation> Advice.OffsetMapping.Factory<S> of(Class<S> annotationType, @MaybeNull Object value)
String
, a primitive value or a method handle or type.S
- The annotation type.annotationType
- The annotation type.value
- The constant value to bind or null
to bind the parameter type's default value.public Class<T> getAnnotationType()
getAnnotationType
in interface Advice.OffsetMapping.Factory<T extends 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 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.Copyright © 2014–2025. All rights reserved.