Package japa.parser.ast.type

Examples of japa.parser.ast.type.Type


        throw new Error("Missing return statement in function");
    }

    final public Expression InstanceOfExpression() throws ParseException {
        Expression ret;
        Type type;
        ret = RelationalExpression();
        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
            case INSTANCEOF:
                jj_consume_token(INSTANCEOF);
                type = Type();
View Full Code Here


        throw new Error("Missing return statement in function");
    }

    final public Expression CastExpression() throws ParseException {
        Expression ret;
        Type type;
        int line;
        int column;
        jj_consume_token(LPAREN);
        line = token.beginLine;
        column = token.beginColumn;
View Full Code Here

        Expression ret;
        String name;
        List typeArgs = null;
        List args = null;
        boolean hasArgs = false;
        Type type;
        int line;
        int column;
        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
            case FALSE:
            case NULL:
            case TRUE:
            case LONG_LITERAL:
            case INTEGER_LITERAL:
            case FLOATING_POINT_LITERAL:
            case CHARACTER_LITERAL:
            case STRING_LITERAL:
                ret = Literal();
                break;
            case THIS:
                jj_consume_token(THIS);
                ret = new ThisExpr(token.beginLine, token.beginColumn, token.endLine, token.endColumn, null);
                break;
            case SUPER:
                jj_consume_token(SUPER);
                ret = new SuperExpr(token.beginLine, token.beginColumn, token.endLine, token.endColumn, null);
                jj_consume_token(DOT);
                switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                    case LT:
                        typeArgs = TypeArguments();
                        typeArgs.remove(0);
                        break;
                    default:
                        jj_la1[83] = jj_gen;
                        ;
                }
                jj_consume_token(IDENTIFIER);
                name = token.image;
                switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                    case LPAREN:
                        args = Arguments();
                        hasArgs = true;
                        break;
                    default:
                        jj_la1[84] = jj_gen;
                        ;
                }
                ret = hasArgs ? new MethodCallExpr(ret.getBeginLine(), ret.getBeginColumn(), token.endLine, token.endColumn, ret, typeArgs, name, args) : new FieldAccessExpr(ret.getBeginLine(), ret.getBeginColumn(), token.endLine, token.endColumn, ret, null, name);
                break;
            case LPAREN:
                jj_consume_token(LPAREN);
                line = token.beginLine;
                column = token.beginColumn;
                ret = Expression();
                jj_consume_token(RPAREN);
                ret = new EnclosedExpr(line, column, token.endLine, token.endColumn, ret);
                break;
            case NEW:
                ret = AllocationExpression(null);
                break;
            default:
                jj_la1[86] = jj_gen;
                if (jj_2_27(2147483647)) {
                    type = ResultType();
                    jj_consume_token(DOT);
                    jj_consume_token(CLASS);
                    ret = new ClassExpr(type.getBeginLine(), type.getBeginColumn(), token.endLine, token.endColumn, type);
                } else {
                    switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                        case IDENTIFIER:
                            jj_consume_token(IDENTIFIER);
                            name = token.image;
View Full Code Here

        throw new Error("Missing return statement in function");
    }

    final public Expression AllocationExpression(Expression scope) throws ParseException {
        Expression ret;
        Type type;
        Object[] arr = null;
        List typeArgs = null;
        List anonymousBody = null;
        List args;
        int line;
View Full Code Here

        throw new Error("Missing return statement in function");
    }

    final public VariableDeclarationExpr VariableDeclarationExpression() throws ParseException {
        Modifier modifier;
        Type type;
        List vars = new LinkedList();
        VariableDeclarator var;
        modifier = Modifiers();
        type = Type();
        var = VariableDeclarator();
        vars.add(var);
        label_41: while (true) {
            switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                case COMMA:
                    ;
                    break;
                default:
                    jj_la1[105] = jj_gen;
                    break label_41;
            }
            jj_consume_token(COMMA);
            var = VariableDeclarator();
            vars.add(var);
        }
        int line = modifier.beginLine;
        int column = modifier.beginColumn;
        if (line == -1) {
            line = type.getBeginLine();
            column = type.getBeginColumn();
        }
        {
            if (true) {
                return new VariableDeclarationExpr(line, column, token.endLine, token.endColumn, modifier.modifiers, modifier.annotations, type, vars);
            }
View Full Code Here

        }
        throw new Error("Missing return statement in function");
    }

    final public AnnotationMemberDeclaration AnnotationTypeMemberDeclaration(Modifier modifier) throws ParseException {
        Type type;
        String name;
        Expression defaultVal = null;
        type = Type();
        jj_consume_token(IDENTIFIER);
        name = token.image;
        jj_consume_token(LPAREN);
        jj_consume_token(RPAREN);
        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
            case _DEFAULT:
                defaultVal = DefaultValue();
                break;
            default:
                jj_la1[133] = jj_gen;
                ;
        }
        jj_consume_token(SEMICOLON);
        int line = modifier.beginLine;
        int column = modifier.beginColumn;
        {
            if (line == -1) {
                line = type.getBeginLine();
                column = type.getBeginColumn();
            }
        }
        {
            if (true) {
                return new AnnotationMemberDeclaration(line, column, token.endLine, token.endColumn, popJavadoc(), modifier.modifiers, modifier.annotations, type, name, defaultVal);
View Full Code Here

        }
        throw new Error("Missing return statement in function");
    }

    final public FieldDeclaration FieldDeclaration(Modifier modifier) throws ParseException {
        Type type;
        List variables = new LinkedList();
        VariableDeclarator val;
        // Modifiers are already matched in the caller
        type = Type();
        val = VariableDeclarator();
        variables.add(val);
        label_13: while (true) {
            switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                case COMMA:
                    ;
                    break;
                default:
                    jj_la1[30] = jj_gen;
                    break label_13;
            }
            jj_consume_token(COMMA);
            val = VariableDeclarator();
            variables.add(val);
        }
        jj_consume_token(SEMICOLON);
        int line = modifier.beginLine;
        int column = modifier.beginColumn;
        if (line == -1) {
            line = type.getBeginLine();
            column = type.getBeginColumn();
        }
        {
            if (true) {
                return new FieldDeclaration(line, column, token.endLine, token.endColumn, popJavadoc(), modifier.modifiers, modifier.annotations, type, variables);
            }
View Full Code Here

        throw new Error("Missing return statement in function");
    }

    final public MethodDeclaration MethodDeclaration(Modifier modifier) throws ParseException {
        List typeParameters = null;
        Type type;
        String name;
        List parameters;
        int arrayCount = 0;
        List throws_ = null;
        BlockStmt block = null;
        int line = modifier.beginLine;
        int column = modifier.beginColumn;
        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
            case LT:
                typeParameters = TypeParameters();
                int[] lineCol = (int[]) typeParameters.remove(0);
                if (line == -1) {
                    line = lineCol[0];
                    column = lineCol[1];
                }
                break;
            default:
                jj_la1[36] = jj_gen;
                ;
        }
        type = ResultType();
        if (line == -1) {
            line = type.getBeginLine();
            column = type.getBeginColumn();
        }
        jj_consume_token(IDENTIFIER);
        name = token.image;
        parameters = FormalParameters();
        label_16: while (true) {
View Full Code Here

        throw new Error("Missing return statement in function");
    }

    final public Parameter FormalParameter() throws ParseException {
        Modifier modifier;
        Type type;
        boolean isVarArg = false;
        VariableDeclaratorId id;
        modifier = Modifiers();
        type = Type();
        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
            case ELLIPSIS:
                jj_consume_token(ELLIPSIS);
                isVarArg = true;
                break;
            default:
                jj_la1[42] = jj_gen;
                ;
        }
        id = VariableDeclaratorId();
        int line = modifier.beginLine;
        int column = modifier.beginColumn;
        if (line == -1) {
            line = type.getBeginLine();
            column = type.getBeginColumn();
        }
        {
            if (true) {
                return new Parameter(line, column, token.endLine, token.endColumn, modifier.modifiers, modifier.annotations, type, isVarArg, id);
            }
View Full Code Here

      @Override
      public void visit(MethodDeclaration n, Object arg) {
        if (n.getName().equals(name)) {
          int modifiers2 = n.getModifiers();
          if (modifiers2 == modis) {
            Type type = n.getType();
            if (type.toString().equals(returnType)) {
              List<Parameter> ps = n.getParameters();
              if (ps == null)
                ps = new ArrayList<Parameter>();
              if (paramsMatch(params, ps)) {
                sb.append(1);
View Full Code Here

TOP

Related Classes of japa.parser.ast.type.Type

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.