Examples of ClassOrInterfaceDeclaration


Examples of japa.parser.ast.body.ClassOrInterfaceDeclaration

            return casted.getType();
        } else if (node instanceof FieldDeclaration) {
            FieldDeclaration casted = (FieldDeclaration) node;
            return casted.getType();
        } else if (node instanceof ClassOrInterfaceDeclaration) {
            ClassOrInterfaceDeclaration casted = (ClassOrInterfaceDeclaration) node;
            return casted.getNameExpr();
        else {
            return node;
        }
    }
View Full Code Here

Examples of japa.parser.ast.body.ClassOrInterfaceDeclaration

    List<ClassOrInterfaceType> extendsList = visit(_n.getExtends(), _arg);
    List<ClassOrInterfaceType> implementsList = visit(_n.getImplements(), _arg);
    List<BodyDeclaration> members = visit(_n.getMembers(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    ClassOrInterfaceDeclaration r = new ClassOrInterfaceDeclaration(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        _n.getModifiers(), annotations, _n.isInterface(), _n.getName(), typeParameters, extendsList, implementsList, members
    );
    r.setComment(comment);
    return r;
  }
View Full Code Here

Examples of japa.parser.ast.body.ClassOrInterfaceDeclaration

    return Boolean.TRUE;
  }

  @Override public Boolean visit(final ClassOrInterfaceDeclaration n1, final Node arg) {
    final ClassOrInterfaceDeclaration n2 = (ClassOrInterfaceDeclaration) arg;

    // javadoc are checked at CompilationUnit

    if (n1.getModifiers() != n2.getModifiers()) {
      return Boolean.FALSE;
    }

    if (n1.isInterface() != n2.isInterface()) {
      return Boolean.FALSE;
    }

    if (!objEquals(n1.getName(), n2.getName())) {
      return Boolean.FALSE;
    }

    if (!nodesEquals(n1.getAnnotations(), n2.getAnnotations())) {
      return Boolean.FALSE;
    }

    if (!nodesEquals(n1.getTypeParameters(), n2.getTypeParameters())) {
      return Boolean.FALSE;
    }

    if (!nodesEquals(n1.getExtends(), n2.getExtends())) {
      return Boolean.FALSE;
    }

    if (!nodesEquals(n1.getImplements(), n2.getImplements())) {
      return Boolean.FALSE;
    }

    if (!nodesEquals(n1.getMembers(), n2.getMembers())) {
      return Boolean.FALSE;
    }

    return Boolean.TRUE;
  }
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.