Examples of MethodType


Examples of anvil.script.MethodType

  }


  protected MethodType onMethod(Method method, String name, Object[] parameters, Doc doc)
  {
    MethodType function = new MethodBase(this, method, name, parameters, doc);
    putstatic(_class, "m_" + name, function);
    putstatic(_class, "M_" + name, new AnyFunction(function));
    declare(function);
    return function;
  }
View Full Code Here

Examples of anvil.script.MethodType

  }


  protected MethodType onInterfaceMethod(Method method, String name, Object[] parameters, Doc doc)
  {
    MethodType function = new InterfaceMethodBase(this, method, name, parameters, doc);
    putstatic(_class, "m_" + name, function);
    putstatic(_class, "M_" + name, new AnyFunction(function));
    declare(function);
    return function;
  }
View Full Code Here

Examples of anvil.script.MethodType

  }
 

  protected MethodType onConstructor(Method method, Constructor constructor, String name, Object[] parameters, Doc doc)
  {
    MethodType function = new ConstructorBase(this, constructor, method, name, parameters, doc);
    putfield(_class, null, "m_" + name, function);
    putfield(_class, null, "M_" + name, new AnyFunction(function))
    declare(function);
    return function;
  }
View Full Code Here

Examples of anvil.script.MethodType

        return new TypeNode(type);
      }
      if (_statement.isStaticRegion()) {
        context.error(_location, "Attempting to invoke '"+type+"' from static region");
      }
      MethodType ctor = (MethodType)type;
      checkArguments(context, ctor);
      return new SuperInvokeNode(ctor, consumeArgs());

    case Type.FUNCTION:
      if (!hasArgs()) {
View Full Code Here

Examples of anvil.script.MethodType

      return null;
    }
    switch(type.getType()) {
    case Type.METHOD:
      {
        MethodType method = (MethodType)type;
       
        consumeSymbol();
        if (hasMoreSymbols()) {
          //methodname
          return new DelegateNode(new ThisNode(context, classtype), method);
View Full Code Here

Examples of anvil.script.MethodType

        return new TypeNode(type);
      }

    case Type.METHOD:
      {
        MethodType method = (MethodType)type;
        ClassStatement context = _statement.getClassStatement();

        if (type instanceof FunctionStatement) {
          FunctionStatement function = (FunctionStatement)type;
          if (function.getContext() != null) {
            if (hasArgs()) {
              return new InlinedCallNode(_statement.getFunctionStatement(), function, consumeArgs());
            } else {
              return new InlinedFunctionNode(_statement.getFunctionStatement(), function);
            }
          }
        }
        if (hasMoreSymbols()) {
          return new TypeNode(type);
        } else {
          Grammar.checkInstanceAmbiguity(listener, _location, context, method);
          if (hasArgs()) {
            //methodname(...)
            checkArguments(listener, method);
            return new StaticInvokeNode(method.getClassType(), context, method, consumeArgs());
          } else {
            //methodname
            return new DelegateNode(new ThisNode(context, method.getClassType()), method);
          }
        }
      }
     
    case Type.CONSTRUCTOR:
View Full Code Here

Examples of com.bastengao.struts2.freeroute.annotation.MethodType

    static int weightOfMethod(HttpServletRequest request, RouteMapping routeMapping) {
        if (routeMapping.getHttpMethods().size() == 0) {
            return 1000;
        }

        MethodType methodType = RouteUtil.valueOfMethod(request.getMethod());
        if (methodType == null) {
            return -1;
        }

        for (MethodType m : routeMapping.getHttpMethods()) {
View Full Code Here

Examples of com.icona.tree.nodes.MethodType


    // $ANTLR start "type_name"
    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:238:1: type_name returns [MethodType methodType] : sql= specifier_qualifier_list ad= abstract_declarator ;
    public final MethodType type_name() throws RecognitionException {
        MethodType methodType = null;


        ObjectiveCParser.specifier_qualifier_list_return sql =null;

        ArrayType ad =null;



          methodType =new MethodType(null,-1);

        try {
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:244:2: (sql= specifier_qualifier_list ad= abstract_declarator )
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:245:2: sql= specifier_qualifier_list ad= abstract_declarator
            {
            pushFollow(FOLLOW_specifier_qualifier_list_in_type_name750);
            sql=specifier_qualifier_list();

            state._fsp--;
            if (state.failed) return methodType;

            if ( state.backtracking==0 ) {
                methodType.setModifier((sql!=null?sql.modifier:null));
                methodType.setSpecifier((sql!=null?sql.specifier:null));
                methodType.setDataType((sql!=null?sql.dataType:null));

              }

            pushFollow(FOLLOW_abstract_declarator_in_type_name760);
            ad=abstract_declarator();

            state._fsp--;
            if (state.failed) return methodType;

            if ( state.backtracking==0 ) {
                  methodType.setArrayType(ad);
                }

            }

        }
View Full Code Here

Examples of com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType

     * first entry in the vector of primops that has the right arity is
     * considered to be the default one.
     */
    public MethodType lookupPrimop(SymbolTable stable, String op,
           MethodType ctype) {
  MethodType result = null;
  final Vector primop = stable.lookupPrimop(op);
  if (primop != null) {
      final int n = primop.size();
      int minDistance = Integer.MAX_VALUE;
      for (int i = 0; i < n; i++) {
    final MethodType ptype = (MethodType) primop.elementAt(i);
    // Skip if different arity
    if (ptype.argsCount() != ctype.argsCount()) {
        continue;
    }
       
    // The first method with the right arity is the default
    if (result == null) {
View Full Code Here

Examples of com.sun.tools.javac.code.Type.MethodType

                sym.type = type;
                if (sym.getQualifiedName().equals(names._this)) {
                    sym.owner.type.asMethodType().recvtype = type;
                    // note that the typeAnnotations will also be added to the owner below.
                } else {
                    MethodType methType = sym.owner.type.asMethodType();
                    List<VarSymbol> params = ((MethodSymbol)sym.owner).params;
                    List<Type> oldArgs = methType.argtypes;
                    ListBuffer<Type> newArgs = new ListBuffer<Type>();
                    while (params.nonEmpty()) {
                        if (params.head == sym) {
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.