Package net.bytebuddy.asm
Class Advice.AssignReturned.Handler.Factory.Simple<S extends java.lang.annotation.Annotation>
- java.lang.Object
-
- net.bytebuddy.asm.Advice.AssignReturned.Handler.Factory.Simple<S>
-
- Type Parameters:
S
- The annotation type that activates this handler factory.
- All Implemented Interfaces:
Advice.AssignReturned.Handler.Factory<S>
- Enclosing interface:
- Advice.AssignReturned.Handler.Factory<T extends java.lang.annotation.Annotation>
@Enhance public static class Advice.AssignReturned.Handler.Factory.Simple<S extends java.lang.annotation.Annotation> extends java.lang.Object implements Advice.AssignReturned.Handler.Factory<S>
A simple implementation of aAdvice.AssignReturned.Handler.Factory
that resolves a given list ofAdvice.AssignReturned.Handler
s.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.AssignReturned.Handler.Factory
Advice.AssignReturned.Handler.Factory.Simple<S extends java.lang.annotation.Annotation>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Advice.AssignReturned.Handler>
handlers
The handlers this factory should return.private java.lang.Class<S>
type
The annotation type that activates this handler factory.
-
Constructor Summary
Constructors Constructor Description Simple(java.lang.Class<S> type, java.util.List<Advice.AssignReturned.Handler> handlers)
Creates a new simple handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<S>
getAnnotationType()
Returns the annotation type that activates this handler factory.java.util.List<Advice.AssignReturned.Handler>
make(TypeDescription returnType, boolean exit, AnnotationDescription.Loadable<? extends S> annotation)
Resolves a list of handlers for this factory.
-
-
-
Field Detail
-
type
private final java.lang.Class<S extends java.lang.annotation.Annotation> type
The annotation type that activates this handler factory.
-
handlers
private final java.util.List<Advice.AssignReturned.Handler> handlers
The handlers this factory should return.
-
-
Constructor Detail
-
Simple
public Simple(java.lang.Class<S> type, java.util.List<Advice.AssignReturned.Handler> handlers)
Creates a new simple handler.- Parameters:
type
- The annotation type that activates this handler factory.handlers
- The handlers this factory should return.
-
-
Method Detail
-
getAnnotationType
public java.lang.Class<S> getAnnotationType()
Returns the annotation type that activates this handler factory.- Specified by:
getAnnotationType
in interfaceAdvice.AssignReturned.Handler.Factory<S extends java.lang.annotation.Annotation>
- Returns:
- The annotation type that activates this handler factory.
-
make
public java.util.List<Advice.AssignReturned.Handler> make(TypeDescription returnType, boolean exit, AnnotationDescription.Loadable<? extends S> annotation)
Resolves a list of handlers for this factory.- Specified by:
make
in interfaceAdvice.AssignReturned.Handler.Factory<S extends java.lang.annotation.Annotation>
- Parameters:
returnType
- The advice method's return type for which to resolve handlers.exit
-true
if this factory is applied for exit advice.annotation
- The annotation that activated this handler factory.- Returns:
- A list of handlers to apply.
-
-