< prev index next >

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

Print this page

 268         }
 269         HotSpotResolvedObjectTypeImpl javaLangObject = runtime().getJavaLangObject();
 270         if (this.equals(javaLangObject)) {
 271             return null;
 272         }
 273         if (isArray()) {
 274             return javaLangObject;
 275         }
 276 
 277         // Cache result of native call
 278         if (superClass == null) {
 279             superClass = compilerToVM().getResolvedJavaType(this, config().superOffset, false);
 280         }
 281         return superClass;
 282     }
 283 
 284     @Override
 285     public HotSpotResolvedObjectTypeImpl[] getInterfaces() {
 286         if (interfaces == null) {
 287             if (isArray()) {
 288                 HotSpotResolvedObjectTypeImpl[] types = new HotSpotResolvedObjectTypeImpl[2];
 289                 types[0] = runtime().getJavaLangCloneable();
 290                 types[1] = runtime().getJavaLangSerializable();

 291                 this.interfaces = types;
 292             } else {
 293                 interfaces = runtime().compilerToVm.getInterfaces(this);
 294             }
 295         }
 296         return interfaces;
 297     }
 298 
 299     @Override
 300     public HotSpotResolvedObjectTypeImpl getSingleImplementor() {
 301         if (!isInterface()) {
 302             throw new JVMCIError("Cannot call getSingleImplementor() on a non-interface type: %s", this);
 303         }
 304         return compilerToVM().getImplementor(this);
 305     }
 306 
 307     @Override
 308     public HotSpotResolvedObjectTypeImpl getSupertype() {
 309         ResolvedJavaType component = getComponentType();
 310         if (component != null) {

 268         }
 269         HotSpotResolvedObjectTypeImpl javaLangObject = runtime().getJavaLangObject();
 270         if (this.equals(javaLangObject)) {
 271             return null;
 272         }
 273         if (isArray()) {
 274             return javaLangObject;
 275         }
 276 
 277         // Cache result of native call
 278         if (superClass == null) {
 279             superClass = compilerToVM().getResolvedJavaType(this, config().superOffset, false);
 280         }
 281         return superClass;
 282     }
 283 
 284     @Override
 285     public HotSpotResolvedObjectTypeImpl[] getInterfaces() {
 286         if (interfaces == null) {
 287             if (isArray()) {
 288                 HotSpotResolvedObjectTypeImpl[] types = new HotSpotResolvedObjectTypeImpl[3];
 289                 types[0] = runtime().getJavaLangCloneable();
 290                 types[1] = runtime().getJavaLangSerializable();
 291                 types[2] = runtime().getJavaLangIdentityObject();
 292                 this.interfaces = types;
 293             } else {
 294                 interfaces = runtime().compilerToVm.getInterfaces(this);
 295             }
 296         }
 297         return interfaces;
 298     }
 299 
 300     @Override
 301     public HotSpotResolvedObjectTypeImpl getSingleImplementor() {
 302         if (!isInterface()) {
 303             throw new JVMCIError("Cannot call getSingleImplementor() on a non-interface type: %s", this);
 304         }
 305         return compilerToVM().getImplementor(this);
 306     }
 307 
 308     @Override
 309     public HotSpotResolvedObjectTypeImpl getSupertype() {
 310         ResolvedJavaType component = getComponentType();
 311         if (component != null) {
< prev index next >