Package net.bytebuddy.asm
Interface Advice.OffsetMapping.Factory<T extends java.lang.annotation.Annotation>
-
- Type Parameters:
T- The annotation type that triggers this factory.
- All Known Implementing Classes:
Advice.OffsetMapping.Factory.Illegal,Advice.OffsetMapping.Factory.Simple,Advice.OffsetMapping.ForAllArguments.Factory,Advice.OffsetMapping.ForArgument.Resolved.Factory,Advice.OffsetMapping.ForArgument.Unresolved.Factory,Advice.OffsetMapping.ForDynamicConstant.Factory,Advice.OffsetMapping.ForEnterValue.Factory,Advice.OffsetMapping.ForExitValue.Factory,Advice.OffsetMapping.ForField.Resolved.Factory,Advice.OffsetMapping.ForField.Unresolved.Factory,Advice.OffsetMapping.ForFieldHandle.Resolved.Factory,Advice.OffsetMapping.ForFieldHandle.Unresolved.ReaderFactory,Advice.OffsetMapping.ForFieldHandle.Unresolved.WriterFactory,Advice.OffsetMapping.ForHandle.Factory,Advice.OffsetMapping.ForLocalValue.Factory,Advice.OffsetMapping.ForOrigin.Factory,Advice.OffsetMapping.ForReturnValue.Factory,Advice.OffsetMapping.ForSelfCallHandle.Factory,Advice.OffsetMapping.ForSerializedValue.Factory,Advice.OffsetMapping.ForStackManipulation.Factory,Advice.OffsetMapping.ForStackManipulation.OfAnnotationProperty,Advice.OffsetMapping.ForStackManipulation.OfDefaultValue,Advice.OffsetMapping.ForStackManipulation.OfDynamicInvocation,Advice.OffsetMapping.ForStubValue,Advice.OffsetMapping.ForThisReference.Factory,Advice.OffsetMapping.ForThrowable.Factory,Advice.OffsetMapping.ForUnusedValue.Factory
- Enclosing interface:
- Advice.OffsetMapping
public static interface Advice.OffsetMapping.Factory<T extends java.lang.annotation.Annotation>Represents a factory for creating aAdvice.OffsetMappingfor a given parameter for a given annotation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAdvice.OffsetMapping.Factory.AdviceTypeDescribes the type of advice being applied.static classAdvice.OffsetMapping.Factory.Illegal<T extends java.lang.annotation.Annotation>A factory for an annotation whose use is not permitted.static classAdvice.OffsetMapping.Factory.Simple<T extends java.lang.annotation.Annotation>A simple factory that binds a constant offset mapping.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<T>getAnnotationType()Returns the annotation type of this factory.Advice.OffsetMappingmake(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType)Creates a new offset mapping for the supplied parameter if possible.
-
-
-
Method Detail
-
getAnnotationType
java.lang.Class<T> getAnnotationType()
Returns the annotation type of this factory.- Returns:
- The factory's annotation type.
-
make
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.- Parameters:
target- The parameter description for which to resolve an offset mapping.annotation- The annotation that triggered this factory.adviceType-trueif the binding is applied using advice method delegation.- Returns:
- A resolved offset mapping or
nullif no mapping can be resolved for this parameter.
-
-