Example #1
0
  @Override
  public Package resolvePackage(String name) {
    Package pack = super.resolvePackage(name);
    if (pack != null) {
      return pack;
    }

    String name1 = this.internalName + name;
    pack = this.library.resolvePackage(name1);
    if (pack != null) {
      this.addSubPackage(pack);
      return pack;
    }

    for (Library lib : DyvilCompiler.config.libraries) {
      if (lib == this.library) {
        continue;
      }

      pack = lib.resolvePackage(name1);
      if (pack != null) {
        this.addSubPackage(pack);
        return pack;
      }
    }

    return null;
  }
Example #2
0
 private IClass loadClass(String fileName, String name, Library library) {
   InputStream is = library.getInputStream(fileName);
   if (is != null) {
     ExternalClass bclass = new ExternalClass(Name.getQualified(name));
     this.classes.add(bclass);
     return ClassReader.loadClass(bclass, is, false);
   }
   return null;
 }
Example #3
0
 private IDyvilHeader loadHeader(String fileName, String name, Library library) {
   InputStream is = library.getInputStream(fileName);
   if (is != null) {
     DyvilHeader header = HeaderFile.read(is);
     header.pack = this;
     this.headers.add(header);
     return header;
   }
   return null;
 }