< prev index next >
src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java
Print this page
@@ -22,20 +22,21 @@
*/
package jdk.vm.ci.meta;
import java.lang.annotation.Annotation;
import java.lang.invoke.MethodHandle;
+import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Array;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
/**
* Represents a resolved Java method. Methods, like fields and types, are resolved through
* {@link ConstantPool constant pools}.
*/
-public interface ResolvedJavaMethod extends JavaMethod, InvokeTarget, ModifiersProvider {
+public interface ResolvedJavaMethod extends JavaMethod, InvokeTarget, ModifiersProvider, AnnotatedElement {
/**
* Returns the bytecode of this method, if the method has code. The returned byte array does not
* contain breakpoints or non-Java bytecodes. This may return null if the
* {@link #getDeclaringClass() holder} is not {@link ResolvedJavaType#isLinked() linked}.
@@ -187,26 +188,10 @@
* Returns the constant pool of this method.
*/
ConstantPool getConstantPool();
/**
- * Returns all annotations of this method. If no annotations are present, an array of length 0
- * is returned.
- */
- Annotation[] getAnnotations();
-
- /**
- * Returns the annotation for the specified type of this method, if such an annotation is
- * present.
- *
- * @param annotationClass the Class object corresponding to the annotation type
- * @return this element's annotation for the specified annotation type if present on this
- * method, else {@code null}
- */
- <T extends Annotation> T getAnnotation(Class<T> annotationClass);
-
- /**
* Returns an array of arrays that represent the annotations on the formal parameters, in
* declaration order, of this method.
*
* @see Method#getParameterAnnotations()
*/
< prev index next >