public static AntClassLoader newAntClassLoader(
     final ClassLoader parent, final Project project, final Path path, final boolean parentFirst) {
   if (AntClassLoader.subClassToLoad != null) {
     return ReflectUtil.newInstance(
         AntClassLoader.subClassToLoad,
         AntClassLoader.CONSTRUCTOR_ARGS,
         new Object[] {parent, project, path, parentFirst});
   }
   return new AntClassLoader(parent, project, path, parentFirst);
 }
Exemplo n.º 2
0
  public void read(StructureReader ins) throws IOException {
    int ncomponents = ins.readInt();
    components = new GEdge[ncomponents];
    weights = new double[ncomponents];

    for (int i = 0; i < components.length; i++) {
      weights[i] = ins.readDouble();
      String cls = ins.readString();
      components[i] = (GEdge) ReflectUtil.createObject(cls);
      ins.blockBegin();
      components[i].read(ins);
      ins.blockEnd();
    }

    attributes = Attributes.read(ins);

    nodes = LinAlg.copy(components[0].nodes);
  }