public static enum Advice.Dispatcher.Inactive extends Enum<Advice.Dispatcher.Inactive> implements Advice.Dispatcher.Unresolved, Advice.Dispatcher.Resolved.ForMethodEnter, Advice.Dispatcher.Resolved.ForMethodExit, Advice.Dispatcher.Bound
Advice.Dispatcher.Resolved.AbstractBase, Advice.Dispatcher.Resolved.ForMethodEnter, Advice.Dispatcher.Resolved.ForMethodExit
Advice.Dispatcher.Bound, Advice.Dispatcher.Delegating, Advice.Dispatcher.Inactive, Advice.Dispatcher.Inlining, Advice.Dispatcher.RelocationHandler, Advice.Dispatcher.Resolved, Advice.Dispatcher.SuppressionHandler, Advice.Dispatcher.Unresolved
Enum Constant and Description |
---|
INSTANCE
The singleton instance.
|
IGNORE_ANNOTATION, IGNORE_METHOD
Modifier and Type | Method and Description |
---|---|
void |
apply()
Applies this dispatcher.
|
Advice.Dispatcher.Resolved.ForMethodEnter |
asMethodEnter(List<? extends Advice.OffsetMapping.Factory<?>> userFactories,
AsmClassReader classReader,
Advice.Dispatcher.Unresolved methodExit,
Advice.PostProcessor.Factory postProcessorFactory)
Resolves this dispatcher as a dispatcher for entering a method.
|
Advice.Dispatcher.Resolved.ForMethodExit |
asMethodExit(List<? extends Advice.OffsetMapping.Factory<?>> userFactories,
AsmClassReader classReader,
Advice.Dispatcher.Unresolved methodEnter,
Advice.PostProcessor.Factory postProcessorFactory)
Resolves this dispatcher as a dispatcher for exiting a method.
|
Advice.Dispatcher.Bound |
bind(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
MethodVisitor methodVisitor,
Implementation.Context implementationContext,
Assigner assigner,
Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler,
Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler,
Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler,
StackManipulation exceptionHandler,
Advice.Dispatcher.RelocationHandler.Relocation relocation)
Binds this dispatcher for resolution to a specific method.
|
TypeDefinition |
getActualAdviceType()
Returns the actual advice type, even if it is not required post advice processing.
|
TypeDescription |
getAdviceType()
The type that is produced as a result of executing this advice method.
|
Advice.ArgumentHandler.Factory |
getArgumentHandlerFactory()
Returns a factory for creating an
Advice.ArgumentHandler . |
Map<String,TypeDefinition> |
getNamedTypes()
Returns the named types declared by this enter advice.
|
TypeDescription |
getThrowable()
Returns the type of throwable for which this exit advice is supposed to be invoked.
|
void |
initialize()
Initialized the advice's methods local variables.
|
boolean |
isAlive()
Returns
true if this dispatcher is alive. |
boolean |
isBinary()
Indicates that this dispatcher requires access to the class file declaring the advice method.
|
boolean |
isPrependLineNumber()
Returns
true if the first discovered line number information should be prepended to the advice code. |
void |
prepare()
Prepares the advice method's exception handlers.
|
static Advice.Dispatcher.Inactive |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Advice.Dispatcher.Inactive[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Advice.Dispatcher.Inactive INSTANCE
public static Advice.Dispatcher.Inactive[] values()
for (Advice.Dispatcher.Inactive c : Advice.Dispatcher.Inactive.values()) System.out.println(c);
public static Advice.Dispatcher.Inactive 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 nullpublic boolean isAlive()
true
if this dispatcher is alive.isAlive
in interface Advice.Dispatcher
true
if this dispatcher is alive.public boolean isBinary()
isBinary
in interface Advice.Dispatcher.Unresolved
true
if this dispatcher requires access to the advice method's class file.public TypeDescription getAdviceType()
getAdviceType
in interface Advice.Dispatcher
public boolean isPrependLineNumber()
true
if the first discovered line number information should be prepended to the advice code.isPrependLineNumber
in interface Advice.Dispatcher.Resolved.ForMethodEnter
true
if the first discovered line number information should be prepended to the advice code.public TypeDefinition getActualAdviceType()
getActualAdviceType
in interface Advice.Dispatcher.Resolved.ForMethodEnter
public Map<String,TypeDefinition> getNamedTypes()
getNamedTypes
in interface Advice.Dispatcher.Resolved
getNamedTypes
in interface Advice.Dispatcher.Unresolved
public TypeDescription getThrowable()
getThrowable
in interface Advice.Dispatcher.Resolved.ForMethodExit
Throwable
type for which to invoke this exit advice or a description of NoExceptionHandler
if this exit advice does not expect to be invoked upon any throwable.public Advice.ArgumentHandler.Factory getArgumentHandlerFactory()
Advice.ArgumentHandler
.getArgumentHandlerFactory
in interface Advice.Dispatcher.Resolved.ForMethodExit
Advice.ArgumentHandler
.public Advice.Dispatcher.Resolved.ForMethodEnter asMethodEnter(List<? extends Advice.OffsetMapping.Factory<?>> userFactories, @MaybeNull AsmClassReader classReader, Advice.Dispatcher.Unresolved methodExit, Advice.PostProcessor.Factory postProcessorFactory)
asMethodEnter
in interface Advice.Dispatcher.Unresolved
userFactories
- A list of custom factories for binding parameters of an advice method.classReader
- A class reader to query for a class file which might be null
if this dispatcher is not binary.methodExit
- The unresolved dispatcher for the method exit advice.postProcessorFactory
- The post processor factory to use.public Advice.Dispatcher.Resolved.ForMethodExit asMethodExit(List<? extends Advice.OffsetMapping.Factory<?>> userFactories, @MaybeNull AsmClassReader classReader, Advice.Dispatcher.Unresolved methodEnter, Advice.PostProcessor.Factory postProcessorFactory)
asMethodExit
in interface Advice.Dispatcher.Unresolved
userFactories
- A list of custom factories for binding parameters of an advice method.classReader
- A class reader to query for a class file which might be null
if this dispatcher is not binary.methodEnter
- The unresolved dispatcher for the method enter advice.postProcessorFactory
- The post processor factory to use.public void prepare()
prepare
in interface Advice.Dispatcher.Bound
public void initialize()
initialize
in interface Advice.Dispatcher.Bound
public void apply()
apply
in interface Advice.Dispatcher.Bound
public Advice.Dispatcher.Bound bind(TypeDescription instrumentedType, MethodDescription instrumentedMethod, MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler, Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler, Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler, StackManipulation exceptionHandler, Advice.Dispatcher.RelocationHandler.Relocation relocation)
bind
in interface Advice.Dispatcher.Resolved
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.methodVisitor
- The method visitor for writing the instrumented method.implementationContext
- The implementation context to use.assigner
- The assigner to use.argumentHandler
- A handler for accessing values on the local variable array.methodSizeHandler
- A handler for computing the method size requirements.stackMapFrameHandler
- A handler for translating and injecting stack map frames.exceptionHandler
- The stack manipulation to apply within a suppression handler.relocation
- A relocation to use with a relocation handler.Copyright © 2014–2025. All rights reserved.