示例#1
0
  private IClass resolveClass(String descriptor) throws ClassNotFoundException {
    ClassFileIClass.LOGGER.entering(null, "resolveIClass", descriptor);

    IClass result = (IClass) this.resolvedClasses.get(descriptor);
    if (result != null) return result;

    result = this.iClassLoader.loadIClass(descriptor);
    if (result == null) throw new ClassNotFoundException(descriptor);

    this.resolvedClasses.put(descriptor, result);
    return result;
  }
示例#2
0
  /** @param index Index of the CONSTANT_Class_info to resolve (JVMS 4.4.1) */
  private IClass resolveClass(short index) throws ClassNotFoundException {
    ClassFileIClass.LOGGER.entering(null, "resolveClass", index);

    ConstantClassInfo cci = (ConstantClassInfo) this.classFile.getConstantPoolInfo(index);
    return this.resolveClass(Descriptor.fromInternalForm(cci.getName(this.classFile)));
  }