protected static enum Advice.OffsetMapping.ForThrowable.Factory extends Enum<Advice.OffsetMapping.ForThrowable.Factory> implements Advice.OffsetMapping.Factory<Advice.Thrown>
Advice.OffsetMapping.Factory.AdviceType, Advice.OffsetMapping.Factory.Illegal<T extends Annotation>, Advice.OffsetMapping.Factory.Simple<T extends Annotation>
Enum Constant and Description |
---|
INSTANCE
The singleton instance.
|
Modifier and Type | Method and Description |
---|---|
Class<Advice.Thrown> |
getAnnotationType()
Returns the annotation type of this factory.
|
Advice.OffsetMapping |
make(ParameterDescription.InDefinedShape target,
AnnotationDescription.Loadable<Advice.Thrown> annotation,
Advice.OffsetMapping.Factory.AdviceType adviceType)
Creates a new offset mapping for the supplied parameter if possible.
|
protected static Advice.OffsetMapping.Factory<?> |
of(MethodDescription.InDefinedShape adviceMethod)
Resolves an appropriate offset mapping factory for the
Advice.Thrown parameter annotation. |
static Advice.OffsetMapping.ForThrowable.Factory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Advice.OffsetMapping.ForThrowable.Factory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Advice.OffsetMapping.ForThrowable.Factory INSTANCE
public static Advice.OffsetMapping.ForThrowable.Factory[] values()
for (Advice.OffsetMapping.ForThrowable.Factory c : Advice.OffsetMapping.ForThrowable.Factory.values()) System.out.println(c);
public static Advice.OffsetMapping.ForThrowable.Factory valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullprotected static Advice.OffsetMapping.Factory<?> of(MethodDescription.InDefinedShape adviceMethod)
Advice.Thrown
parameter annotation.adviceMethod
- The exit advice method, annotated with Advice.OnMethodExit
.public Class<Advice.Thrown> getAnnotationType()
getAnnotationType
in interface Advice.OffsetMapping.Factory<Advice.Thrown>
public Advice.OffsetMapping make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<Advice.Thrown> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType)
make
in interface Advice.OffsetMapping.Factory<Advice.Thrown>
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.