Package net.bytebuddy.asm
Annotation Interface Advice.Origin
- Enclosing class:
Advice
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 a Method, Constructor
or java.lang.reflect.Executable representing this method. It can also load the instrumented method's
java.lang.invoke.MethodType, java.lang.invoke.MethodHandle or
java.lang.invoke.MethodHandles$Lookup.
Note: A constant representing a Method or Constructor is not cached but is recreated for
every read.
Important: Don't confuse this annotation with Origin or
MemberSubstitution.Origin. This annotation should
be used only in combination with Advice.
- See Also:
-
Optional Element Summary
Optional Elements -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIndicates that the origin string should be indicated by theObject.toString()representation of the instrumented method.
-
Field Details
-
DEFAULT
Indicates that the origin string should be indicated by theObject.toString()representation of the instrumented method.- See Also:
-
-
Element Details
-
value
String valueReturns 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:#tinserts the method's declaring type.#minserts the name of the method (<init>for constructors and<clinit>for static initializers).#dfor the method's descriptor.#sfor the method's signature.#rfor the method's return type.#pfor 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:
""
-