use of org.sonar.java.model.JavaTree.ParameterizedTypeTreeImpl in project sonar-java by SonarSource.
the class TreeFactory method newAnnotatedParameterizedIdentifier.
public ExpressionTree newAnnotatedParameterizedIdentifier(Optional<List<AnnotationTreeImpl>> annotations, InternalSyntaxToken identifierToken, Optional<TypeArgumentListTreeImpl> typeArguments) {
List<AnnotationTree> annotationList = ImmutableList.copyOf(annotations.or(ImmutableList.of()));
ExpressionTree result = new IdentifierTreeImpl(identifierToken);
if (typeArguments.isPresent()) {
result = new ParameterizedTypeTreeImpl((TypeTree) result, typeArguments.get()).complete(annotationList);
} else {
result = ((IdentifierTreeImpl) result).complete(annotationList);
}
return result;
}
Aggregations