Examples of ClassType


Examples of anvil.script.ClassType

          return null;
        }

      case Type.CLASS:
        {
          ClassType clazz = (ClassType)type;
          if (hasMoreSymbols()) {
            symbol = consumeSymbol();
            type = clazz.lookupDeclaration(symbol);
            break;
          }
          if (!hasArgs()) {
            listener.error(_location, "Syntax error: argument list expected after '"+_name.toString(1)+"'");
            return null;
          }
          CompilableFunction constructor = clazz.getConstructor();
          if (constructor == null) {
            listener.error(_location, "Class '" + clazz + "' does not have constructor");
            return null;
          }
          ClassType context = _statement.getClassStatement();
          checkArguments(listener, constructor);
          Grammar.checkInstanceAccess(listener, _location, _statement, clazz);
          //Grammar.checkInstanceAmbiguity(listener, _location, context, clazz);
          return new NewNode(context, clazz, constructor, consumeArgs());
        }
View Full Code Here

Examples of anvil.script.ClassType

  }


  protected Node doLink(ErrorListener listener)
  {
    ClassType classtype;
    switch(peekKind()) {
    case ParserBaseConstants.SYMBOL:
      {
        String symbol = peekSymbol();
        if (symbol.equals("__FILE__")) {
View Full Code Here

Examples of anvil.script.ClassType

 
  public Type lookupInheritedDeclaration(String name)
  {
    Type type;
    if (_base != null) {
      ClassType classtype = _base.getClassType();
      if (classtype != null) {
        if ((type = classtype.lookupDeclaration(name)) != null) {
          return type;
        }
      }
    }
    if (_interfaces != null) {
View Full Code Here

Examples of anvil.script.ClassType

  public CompilableFunction getBaseClassConstructor()
  {
    ClassRef ref = getBase();
    if (ref != null) {
      ClassType base = ref.getClassType();
      if (base != Any.__class__) {
        return base.getConstructor();
      }
    }
    return null;
  }
View Full Code Here

Examples of anvil.script.ClassType

    clazz.setAccessFlags(Code.ACC_PUBLIC);
    ConstantPool pool = clazz.getPool();
    context.pushClass(clazz);
    Field typefield1 = clazz.createField("_class", "Lanvil/script/compiler/CompiledClassType;", Code.ACC_PUBLIC|Code.ACC_STATIC);
    Field typefield2 = clazz.createField("_type", "Lanvil/core/Any;", Code.ACC_PUBLIC|Code.ACC_STATIC);
    ClassType base = getBaseClass();
    if (base != Any.__class__) {
      clazz.setSuperClassname(base.getDescriptor());
    } else {
      clazz.setSuperClassname("anvil/core/AnyClass");
    }
    clazz.setAccessFlags(Code.ACC_SUPER|Code.ACC_PUBLIC);
View Full Code Here

Examples of anvil.script.ClassType

  public Any execute(Context context, Any[] parameters)
  {
    switch(_typecode) {
    case Type.CLASS:
      {
        ClassType type = (ClassType)_type;
        Function ctor = type.getConstructor();
        if (ctor != null) {
          return ctor.execute(context, parameters);
        }
        throw context.InstantiationError("No constructor for "+type);
      }
View Full Code Here

Examples of anvil.script.ClassType

  {
    if (!(clazz instanceof AnyType)) {
      throw context.BadParameter("Type expected");
    }
    if (_typecode == Type.CLASS) {
      ClassType self = (ClassType)_type;
      Type other = (Type)clazz.toObject();
      return self.isInstanceOf(other) ? TRUE : FALSE;
    }
    return FALSE;
  }
View Full Code Here

Examples of anvil.script.ClassType

  public Any newInstance(Context context, String name, Any[] parameters)
  {
    Type type = (Type)_types.get(name);
    if (type != null) {
      if (type.getType() == CLASS) {
        ClassType clazz = (ClassType)type;
        return clazz.getConstructor().execute(context, parameters);
      }
    }
    throw context.NoSuchClass(_name + '.' + name);
  }
View Full Code Here

Examples of archmapper.main.model.stylemapping.ClassType

            if (classDef != null) {
              String classTypeName = classDef.getType();
              if (classTypeName != null) {
                ComponentTypeMapping typeMapping = mappingHelper.getComponentTypeMapping(compName);
                if (typeMapping != null) {
                  ClassType classType = typeMapping.getClassType(classTypeName);
                  if (classType != null) {
                    if (classType.isSingleton()) {
                      generateResultsForASTNode(history, creation, resource, "The singleton "+
                          binding.getName() + " should only be created by the Spring configuration");
                    }
                  }
                }
View Full Code Here

Examples of com.google.gwt.resources.client.GwtCreateResource.ClassType

    assert returnType != null;

    JClassType args[] = returnType.getTypeArgs();
    assert args.length == 1;

    ClassType override = method.getAnnotation(ClassType.class);
    JClassType toCreate;
    if (override != null) {
      toCreate = context.getGeneratorContext().getTypeOracle().findType(
          override.value().getName().replace('$', '.'));
      assert toCreate != null;
    } else {
      toCreate = args[0];
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.