예제 #1
0
 /**
  * Package-visible constructor; only for use by ArrayClassLoader class. 'loader' must be the
  * Primordial IClassLoader.
  *
  * <p>[WHY? -- array classes are loaded by the element classloader??]
  */
 ArrayClass(TypeReference type, IClassLoader loader, IClassHierarchy cha) {
   this.type = type;
   this.loader = loader;
   this.cha = cha;
   TypeReference elementType = type.getInnermostElementType();
   if (!elementType.isPrimitiveType()) {
     IClass klass = loader.lookupClass(elementType.getName());
     if (klass == null) {
       Assertions.UNREACHABLE("caller should not attempt to create an array with type " + type);
     }
   } else {
     // assert loader.getReference().equals(ClassLoaderReference.Primordial);
   }
 }