Package japa.parser.ast.type

Examples of japa.parser.ast.type.VoidType


    public static Type getType(final JavaType javaType) {
        Validate.notNull(javaType, "Java type required");
        Validate.isTrue(javaType.isPrimitive(),
                "Java type must be primitive to be presented to this method");
        if (javaType.equals(JavaType.VOID_PRIMITIVE)) {
            return new VoidType();
        }
        else if (javaType.equals(JavaType.BOOLEAN_PRIMITIVE)) {
            return new PrimitiveType(Primitive.Boolean);
        }
        else if (javaType.equals(JavaType.BYTE_PRIMITIVE)) {
View Full Code Here


    final public Type ResultType() throws ParseException {
        Type ret;
        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
            case VOID:
                jj_consume_token(VOID);
                ret = new VoidType(token.beginLine, token.beginColumn, token.endLine, token.endColumn);
                break;
            case BOOLEAN:
            case BYTE:
            case CHAR:
            case DOUBLE:
View Full Code Here

    @When("a public static method called \"$methodName\" returning void is added to class $position in the compilation unit")
    public void whenAStaticMethodCalledReturningIsAddedToClassInTheCompilationUnit(String methodName, int position) {
        CompilationUnit compilationUnit = (CompilationUnit) state.get("cu1");
        TypeDeclaration type = compilationUnit.getTypes().get(position -1);
        MethodDeclaration method = new MethodDeclaration(ModifierSet.PUBLIC, new VoidType(), methodName);
        method.setModifiers(ModifierSet.addModifier(method.getModifiers(), ModifierSet.STATIC));
        ASTHelper.addMember(type, method);
        state.put("cu1", compilationUnit);
    }
View Full Code Here

  @Override
  public Node visit(VoidType _n, Object _arg) {
    Comment comment = cloneNodes(_n.getComment(), _arg);

    VoidType r = new VoidType(_n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn());
    r.setComment(comment);
    return r;
  }
View Full Code Here

TOP

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

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.