Package net.bytebuddy.asm
Annotation Type Advice.Origin
-
@Documented @Retention(RUNTIME) @Target(PARAMETER) public static @interface Advice.Origin
Indicates that the annotated parameter should be mapped to a string representation of the instrumented method, a constant representing the
Class
declaring the adviced method or aMethod
,Constructor
orjava.lang.reflect.Executable
representing this method.Note: A constant representing a
Method
orConstructor
is not cached but is recreated for every read.- See Also:
Advice
,Advice.OnMethodEnter
,Advice.OnMethodExit
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.String
DEFAULT
Indicates that the origin string should be indicated by theObject.toString()
representation of the instrumented method.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
value
Returns the pattern the annotated parameter should be assigned.
-
-
-
Element Detail
-
value
java.lang.String value
Returns the pattern the annotated parameter should be assigned. By default, theAnnotation.toString()
representation of the method is assigned. Alternatively, a pattern can be assigned where:#t
inserts the method's declaring type.#m
inserts the name of the method (<init>
for constructors and<clinit>
for static initializers).#d
for the method's descriptor.#s
for the method's signature.#r
for the method's return type.#p
for the property's name.
#
character must be escaped by\
which can be escaped by itself. This property is ignored if the annotated parameter is of typeClass
.- Returns:
- The pattern the annotated parameter should be assigned.
- Default:
- ""
-
-