< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java

Print this page




 459     }
 460 
 461     @Override
 462     public ConstantPool getConstantPool() {
 463         return constantPool;
 464     }
 465 
 466     @Override
 467     public Annotation[][] getParameterAnnotations() {
 468         Executable javaMethod = toJava();
 469         return javaMethod == null ? null : javaMethod.getParameterAnnotations();
 470     }
 471 
 472     @Override
 473     public Annotation[] getAnnotations() {
 474         Executable javaMethod = toJava();
 475         return javaMethod == null ? new Annotation[0] : javaMethod.getAnnotations();
 476     }
 477 
 478     @Override






 479     public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
 480         Executable javaMethod = toJava();
 481         return javaMethod == null ? null : javaMethod.getAnnotation(annotationClass);
 482     }
 483 
 484     public boolean isDefault() {
 485         if (isConstructor()) {
 486             return false;
 487         }
 488         // Copied from java.lang.Method.isDefault()
 489         int mask = Modifier.ABSTRACT | Modifier.PUBLIC | Modifier.STATIC;
 490         return ((getModifiers() & mask) == Modifier.PUBLIC) && getDeclaringClass().isInterface();
 491     }
 492 
 493     @Override
 494     public Type[] getGenericParameterTypes() {
 495         Executable javaMethod = toJava();
 496         return javaMethod == null ? null : javaMethod.getGenericParameterTypes();
 497     }
 498 




 459     }
 460 
 461     @Override
 462     public ConstantPool getConstantPool() {
 463         return constantPool;
 464     }
 465 
 466     @Override
 467     public Annotation[][] getParameterAnnotations() {
 468         Executable javaMethod = toJava();
 469         return javaMethod == null ? null : javaMethod.getParameterAnnotations();
 470     }
 471 
 472     @Override
 473     public Annotation[] getAnnotations() {
 474         Executable javaMethod = toJava();
 475         return javaMethod == null ? new Annotation[0] : javaMethod.getAnnotations();
 476     }
 477 
 478     @Override
 479     public Annotation[] getDeclaredAnnotations() {
 480         Executable javaMethod = toJava();
 481         return javaMethod == null ? null : javaMethod.getDeclaredAnnotations();
 482     }
 483 
 484     @Override
 485     public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
 486         Executable javaMethod = toJava();
 487         return javaMethod == null ? null : javaMethod.getAnnotation(annotationClass);
 488     }
 489 
 490     public boolean isDefault() {
 491         if (isConstructor()) {
 492             return false;
 493         }
 494         // Copied from java.lang.Method.isDefault()
 495         int mask = Modifier.ABSTRACT | Modifier.PUBLIC | Modifier.STATIC;
 496         return ((getModifiers() & mask) == Modifier.PUBLIC) && getDeclaringClass().isInterface();
 497     }
 498 
 499     @Override
 500     public Type[] getGenericParameterTypes() {
 501         Executable javaMethod = toJava();
 502         return javaMethod == null ? null : javaMethod.getGenericParameterTypes();
 503     }
 504 


< prev index next >