@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface Origin
Method
, the parameter is assigned a reference
to the method it intercepts.Class
, the parameter is assigned a reference of the
type of the instrumented type.String
, the parameter is assigned a string with
the value that would be returned by the Method.toString()
method.
java.lang.invoke.MethodHandle
, a handle of the intercepted method is injected.
A java.lang.invoke.MethodHandle
is stored in a class's constant pool and does therefore not face the same
runtime performance limitations as a (non-cached) Method
reference. Method handles are
only supported for byte code versions starting from Java 7.java.lang.invoke.MethodType
, a description of the intercepted method's type
is injected. Method type descriptions are only supported for byte code versions starting from Java 7.IllegalStateException
.Modifier and Type | Optional Element and Description |
---|---|
boolean |
cache
Determines if the value that is assigned by this annotation is cached.
|
public abstract boolean cache
Method
instances.true
if the value for this parameter should be cached in a static
field inside the instrumented class.Copyright © 2014–2015. All rights reserved.