Пример #1
0
  private boolean isVisible(MethodDeclaration method) {
    boolean samePackage = isLocal(ASTHelper.getOutermostTypeDeclarationOf(method).getPackage());

    if (samePackage && !method.getModifiers().isPrivate()) {
      return true;
    }
    if (method.getModifiers().isPublic() || method.getModifiers().isProtected()) {
      return true;
    }

    return false;
  }
Пример #2
0
  public void visitMethodDeclaration(MethodDeclaration node) {
    visit(node.getModifiers());

    if (node.getReturnType() != null) {
      visit(node.getReturnType());
    }

    if (node.hasParameters()) {
      visit(node.getParameterList());
    }

    for (TypeIterator it = node.getThrownExceptions().getIterator(); it.hasNext(); ) {
      visit(it.getNext());
    }

    if (node.hasBody()) {
      visit(node.getBody());
    }
  }
Пример #3
0
 private boolean isRedefined(MethodDeclaration method) {
   return _localType.getMethods().contains(method.getSignature());
 }