@Override public void visitIdentifier(IdentifierTree tree) { scan(tree.annotations()); }
@Override public void visitIdentifier(IdentifierTree tree) { scan(tree.annotations()); }
@Override public void visitIdentifier(IdentifierTree tree) { scan(tree.annotations()); }
@Override public void visitIdentifier(IdentifierTree tree) { scan(tree.annotations()); pendingReferences.add(tree.name()); }
@Override public void visitIdentifier(IdentifierTree tree) { scan(tree.annotations()); pendingReferences.add(tree.name()); }
private static void moveAnnotations(ExpressionTree result, ExpressionTree firstIdentifier) { List<AnnotationTree> firstIdentifierAnnotations; boolean isParameterizedType = firstIdentifier.is(Tree.Kind.PARAMETERIZED_TYPE); if (isParameterizedType) { firstIdentifierAnnotations = ((ParameterizedTypeTree) firstIdentifier).annotations(); } else { firstIdentifierAnnotations = ((IdentifierTree) firstIdentifier).annotations(); } // move the annotations from the first identifier to the member select or the parameterized type if (!firstIdentifierAnnotations.isEmpty()) { if (result.is(Tree.Kind.MEMBER_SELECT)) { ((MemberSelectExpressionTreeImpl) result).complete(firstIdentifierAnnotations); } else { ((ParameterizedTypeTreeImpl) result).complete(firstIdentifierAnnotations); } if (isParameterizedType) { ((ParameterizedTypeTreeImpl) firstIdentifier).complete(ImmutableList.<AnnotationTree>of()); } else { ((IdentifierTreeImpl) firstIdentifier).complete(ImmutableList.<AnnotationTree>of()); } } }
@Override public void visitMemberSelectExpression(MemberSelectExpressionTree tree) { scan(tree.annotations()); scan(tree.identifier().annotations()); pendingReferences.add(ExpressionsHelper.concatenate(tree)); //Don't visit identifiers of a member select expression. if (!tree.expression().is(Tree.Kind.IDENTIFIER)) { scan(tree.expression()); } }
@Override public void visitMemberSelectExpression(MemberSelectExpressionTree tree) { scan(tree.annotations()); scan(tree.identifier().annotations()); pendingReferences.add(ExpressionsHelper.concatenate(tree)); //Don't visit identifiers of a member select expression. if (!tree.expression().is(Tree.Kind.IDENTIFIER)) { scan(tree.expression()); } }
List<AnnotationTree> identifierAnnotations = identifierTree.annotations(); scan(identifierAnnotations); completeMetadata((JavaSymbol) identifierTree.symbol(), identifierAnnotations);
List<AnnotationTree> identifierAnnotations = identifierTree.annotations(); scan(identifierAnnotations); completeMetadata((JavaSymbol) identifierTree.symbol(), identifierAnnotations);