Package anvil.script

Examples of anvil.script.Dependency


      int n = imports.length;
      for(int i=0; i<n; ) {
        String pathinfo = imports[i++];
        String descriptor = imports[i++];
        Address imported = getAddress().resolve(pathinfo);
        _dependencies.put(imported, new Dependency(imported, descriptor, _location));
      }
     
      Field field;
     
      field = scriptclass.getDeclaredField("_module");
View Full Code Here


  public void addDependency(Import imprt)
  {
    Address addr = imprt.getAddress();
    if (addr != null) {
      _dependencies.put(addr, new Dependency(addr, null, imprt.getLocation()));
    }
  }
View Full Code Here

    Field field = clazz.createField("_imports", "[Ljava/lang/String;", Code.ACC_PUBLIC|Code.ACC_STATIC);
    code.iconst(_dependencies.size()*2);
    code.anewarray("java/lang/String");
    Iterator iter = _dependencies.values().iterator();
    for(int i=0; iter.hasNext(); ) {
      Dependency dep = (Dependency)iter.next();
      code.dup();
      code.iconst(i++);
      code.astring(dep.getPathinfo());
      code.aastore();
      code.dup();
      code.iconst(i++);
      code.astring(dep.getDescriptor());
      code.aastore();
    }
    code.putstatic(field);

  }
View Full Code Here

TOP

Related Classes of anvil.script.Dependency

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.