src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SharedLibraryJVMCIReflection.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File open Sdiff src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SharedLibraryJVMCIReflection.java

Print this page




 123     }
 124 
 125     @Override
 126     ResolvedJavaMethod.Parameter[] getParameters(HotSpotResolvedJavaMethodImpl javaMethod) {
 127         // ResolvedJavaMethod.getParameters allows a return value of null
 128         return null;
 129     }
 130 
 131     // Substituted by Target_jdk_vm_ci_hotspot_SharedLibraryJVMCIReflection
 132     static Annotation[] getClassAnnotations(String className) {
 133         throw new InternalError("missing substitution: " + className);
 134     }
 135 
 136     // Substituted by Target_jdk_vm_ci_hotspot_SharedLibraryJVMCIReflection
 137     static Annotation[][] getParameterAnnotations(String className, String methodName) {
 138         throw new InternalError("missing substitution: " + className + " " + methodName);
 139     }
 140 
 141     @Override
 142     Annotation[] getAnnotations(HotSpotResolvedObjectTypeImpl holder) {
 143         return getClassAnnotations(holder.getName());

 144     }
 145 
 146     @Override
 147     Annotation[] getDeclaredAnnotations(HotSpotResolvedObjectTypeImpl holder) {
 148         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
 149     }
 150 
 151     @Override
 152     <T extends Annotation> T getAnnotation(HotSpotResolvedObjectTypeImpl holder, Class<T> annotationClass) {
 153         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
 154     }
 155 
 156     @Override
 157     Annotation[][] getParameterAnnotations(HotSpotResolvedJavaMethodImpl javaMethod) {
 158         return getParameterAnnotations(javaMethod.getDeclaringClass().getName(), javaMethod.getName());




 159     }
 160 
 161     @Override
 162     Type[] getGenericParameterTypes(HotSpotResolvedJavaMethodImpl javaMethod) {
 163         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
 164     }
 165 
 166     @Override
 167     Annotation[] getFieldAnnotations(HotSpotResolvedJavaFieldImpl javaField) {
 168         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
 169     }
 170 
 171     @Override
 172     Annotation[] getMethodAnnotations(HotSpotResolvedJavaMethodImpl javaMethod) {
 173         return getMethodAnnotationsInternal(javaMethod);

 174     }
 175 
 176     @Override
 177     <T extends Annotation> T getMethodAnnotation(HotSpotResolvedJavaMethodImpl javaMethod, Class<T> annotationClass) {
 178         Annotation[] methodAnnotations = getMethodAnnotations(javaMethod);
 179         if (methodAnnotations != null) {
 180             for (Annotation ann : methodAnnotations) {
 181                 if (annotationClass.isInstance(ann)) {
 182                     return annotationClass.cast(ann);
 183                 }
 184             }
 185         }
 186         return null;
 187     }
 188 
 189     // Substituted by Target_jdk_vm_ci_hotspot_SharedLibraryJVMCIReflection
 190     @SuppressWarnings("unused")
 191     private static Annotation[] getMethodAnnotationsInternal(ResolvedJavaMethod javaMethod) {
 192         throw new InternalError("missing substitution");
 193     }




 123     }
 124 
 125     @Override
 126     ResolvedJavaMethod.Parameter[] getParameters(HotSpotResolvedJavaMethodImpl javaMethod) {
 127         // ResolvedJavaMethod.getParameters allows a return value of null
 128         return null;
 129     }
 130 
 131     // Substituted by Target_jdk_vm_ci_hotspot_SharedLibraryJVMCIReflection
 132     static Annotation[] getClassAnnotations(String className) {
 133         throw new InternalError("missing substitution: " + className);
 134     }
 135 
 136     // Substituted by Target_jdk_vm_ci_hotspot_SharedLibraryJVMCIReflection
 137     static Annotation[][] getParameterAnnotations(String className, String methodName) {
 138         throw new InternalError("missing substitution: " + className + " " + methodName);
 139     }
 140 
 141     @Override
 142     Annotation[] getAnnotations(HotSpotResolvedObjectTypeImpl holder) {
 143         Annotation[] annotations = getClassAnnotations(holder.getName());
 144         return annotations == null ? new Annotation[0] : annotations;
 145     }
 146 
 147     @Override
 148     Annotation[] getDeclaredAnnotations(HotSpotResolvedObjectTypeImpl holder) {
 149         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
 150     }
 151 
 152     @Override
 153     <T extends Annotation> T getAnnotation(HotSpotResolvedObjectTypeImpl holder, Class<T> annotationClass) {
 154         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
 155     }
 156 
 157     @Override
 158     Annotation[][] getParameterAnnotations(HotSpotResolvedJavaMethodImpl javaMethod) {
 159         Annotation[][] annotations = getParameterAnnotations(javaMethod.getDeclaringClass().getName(), javaMethod.getName());
 160         if (annotations == null) {
 161             return new Annotation[javaMethod.signature.getParameterCount(false)][0];
 162         }
 163         return annotations;
 164     }
 165 
 166     @Override
 167     Type[] getGenericParameterTypes(HotSpotResolvedJavaMethodImpl javaMethod) {
 168         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
 169     }
 170 
 171     @Override
 172     Annotation[] getFieldAnnotations(HotSpotResolvedJavaFieldImpl javaField) {
 173         throw new HotSpotJVMCIUnsupportedOperationError("unimplemented");
 174     }
 175 
 176     @Override
 177     Annotation[] getMethodAnnotations(HotSpotResolvedJavaMethodImpl javaMethod) {
 178         Annotation[] annotations = getMethodAnnotationsInternal(javaMethod);
 179         return annotations == null ? new Annotation[0] : annotations;
 180     }
 181 
 182     @Override
 183     <T extends Annotation> T getMethodAnnotation(HotSpotResolvedJavaMethodImpl javaMethod, Class<T> annotationClass) {
 184         Annotation[] methodAnnotations = getMethodAnnotations(javaMethod);
 185         if (methodAnnotations != null) {
 186             for (Annotation ann : methodAnnotations) {
 187                 if (annotationClass.isInstance(ann)) {
 188                     return annotationClass.cast(ann);
 189                 }
 190             }
 191         }
 192         return null;
 193     }
 194 
 195     // Substituted by Target_jdk_vm_ci_hotspot_SharedLibraryJVMCIReflection
 196     @SuppressWarnings("unused")
 197     private static Annotation[] getMethodAnnotationsInternal(ResolvedJavaMethod javaMethod) {
 198         throw new InternalError("missing substitution");
 199     }


src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SharedLibraryJVMCIReflection.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File