Package anvil.script

Examples of anvil.script.Scope


    Context context = unserializer.getContext();
    unserializer.consume('s');
    String classname = unserializer.getUTF16String();
    unserializer.consume('s');
    String pathinfo = unserializer.getUTF16String();
    Scope scope = context.import_(pathinfo);
    AnyClass self = null;
    Type type = anvil.script.Grammar.follow(scope, classname);
    if (type != null) {
      if (type.getType() == Type.CLASS) {
        self = ((ClassType)type).newInstance();
View Full Code Here


      ACC_PUBLIC|ACC_FINAL);
    code = method.getCode();
    code.addLocals(4);
   
    boolean ismethod = (function.getType() == Type.METHOD);
    Scope parent = function.getParent();
    int parent_ref = parent.getTypeRef(pool);
    if (ismethod) {
      code.aload(2);
      code.checkcast(parent_ref);
    }
    code.aload(1);
View Full Code Here

  }
 

  protected Scope onNamespace(ClassLoader classloader, Class cls, String name, Doc doc)
  {
    Scope namespace = new CompiledNamespace(classloader, this, cls, name, doc);
    declare(namespace);
    return namespace;
  }
View Full Code Here

  }

  public String buildQualifiedName()
  {
    StringBuffer buffer = new StringBuffer(24);
    Scope scope = this;
    out: while(true) {
      switch(scope.getType()) {
      case CLASS:
      case NAMESPACE:
        if (buffer.length()>0) {
          buffer.insert(0, '.');
        }
        buffer.insert(0, scope.getName());
        scope = scope.getParent();
        break;
      default:
        break out;
      }
    }
View Full Code Here

    StringBuffer libname = new StringBuffer(32);
    int i = _index;
    int length = _name.size();
    int foundIndex = -1;
    Scope foundScope = null;
    libname.append(_name.get(i-1));
    while(i <= length) {
      String name = libname.toString();
      Scope scope = zone.findJava(name);
      if (scope != null) {
        foundIndex = i;
        foundScope = scope;
      }
      if (i >= length) {
View Full Code Here

TOP

Related Classes of anvil.script.Scope

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.