private lombok.ast.Annotation createAnnotation(Annotation node) { lombok.ast.Annotation annotation = new lombok.ast.Annotation(); annotation.astAnnotationTypeReference((lombok.ast.TypeReference) toTree(node.type)); return annotation; }
private lombok.ast.Annotation createAnnotation(Annotation node) { lombok.ast.Annotation annotation = new lombok.ast.Annotation(); annotation.astAnnotationTypeReference((lombok.ast.TypeReference) toTree(node.type)); return annotation; }
private lombok.ast.Annotation createAnnotation(Annotation node) { lombok.ast.Annotation annotation = new lombok.ast.Annotation(); annotation.astAnnotationTypeReference((lombok.ast.TypeReference) toTree(node.type)); return annotation; }
@CopyMethod static String getDescription(Annotation self) { try { return self.astAnnotationTypeReference().getDescription(); } catch (NullPointerException e) { return null; } }
@CopyMethod static String getDescription(Annotation self) { try { return self.astAnnotationTypeReference().getDescription(); } catch (NullPointerException e) { return null; } }
@CopyMethod static String getDescription(Annotation self) { try { return self.astAnnotationTypeReference().getDescription(); } catch (NullPointerException e) { return null; } }
@Override public boolean visitAnnotation(Annotation node) { int start = node.getPosition().getStart(); int end = node.getPosition().getEnd(); // Newer javacs //int end = node.astAnnotationTypeReference().getPosition().getEnd(); // Older javacs return set(node, setPos(start, end, treeMaker.Annotation(toTree(node.astAnnotationTypeReference()), toList(JCExpression.class, node.astElements())))); }
@Override public boolean visitAnnotation(Annotation node) { int start = node.getPosition().getStart(); int end = node.getPosition().getEnd(); // Newer javacs //int end = node.astAnnotationTypeReference().getPosition().getEnd(); // Older javacs return set(node, setPos(start, end, treeMaker.Annotation(toTree(node.astAnnotationTypeReference()), toList(JCExpression.class, node.astElements())))); }
@Override public boolean visitAnnotation(Annotation node) { int start = node.getPosition().getStart(); int end = node.getPosition().getEnd(); // Newer javacs //int end = node.astAnnotationTypeReference().getPosition().getEnd(); // Older javacs return set(node, setPos(start, end, treeMaker.Annotation(toTree(node.astAnnotationTypeReference()), toList(JCExpression.class, node.astElements())))); }
@Override public boolean visitAnnotation(Annotation node) { String type = node.astAnnotationTypeReference().getTypeName(); if (SUPPRESS_LINT.equals(type) || FQCN_SUPPRESS_LINT.equals(type)) { Node parent = node.getParent();
TypeReference t = annotation.astAnnotationTypeReference(); String typeName = t.getTypeName(); if (typeName.endsWith(SUPPRESS_LINT)
@Override public boolean visitAnnotation(lombok.ast.Annotation node) { //TODO add test where the value is the result of string concatenation TypeReference type = (TypeReference) toTree(node.astAnnotationTypeReference()); boolean isEcjNormal = Position.UNPLACED == getConversionPositionInfo(node, "isNormalAnnotation"); if (node.astElements().isEmpty() && countStructure(node, "(") == 0 && !isEcjNormal) { MarkerAnnotation ann = new MarkerAnnotation(type, start(node)); ann.declarationSourceEnd = end(node); return set(node, ann); } MemberValuePair[] values = toArray(MemberValuePair.class, node.astElements()); if (values != null && (values.length == 1 && values[0].name == null)) { SingleMemberAnnotation ann = new SingleMemberAnnotation(type, start(node)); ann.declarationSourceEnd = end(node); ann.memberValue = values[0].value; return set(node, ann); } NormalAnnotation ann = new NormalAnnotation(type, start(node)); ann.declarationSourceEnd = end(node); ann.memberValuePairs = values; return set(node, ann); }
@Override public boolean visitAnnotation(lombok.ast.Annotation node) { //TODO add test where the value is the result of string concatenation TypeReference type = (TypeReference) toTree(node.astAnnotationTypeReference()); boolean isEcjNormal = Position.UNPLACED == getConversionPositionInfo(node, "isNormalAnnotation"); if (node.astElements().isEmpty() && countStructure(node, "(") == 0 && !isEcjNormal) { MarkerAnnotation ann = new MarkerAnnotation(type, start(node)); ann.declarationSourceEnd = end(node); return set(node, ann); } MemberValuePair[] values = toArray(MemberValuePair.class, node.astElements()); if (values != null && (values.length == 1 && values[0].name == null)) { SingleMemberAnnotation ann = new SingleMemberAnnotation(type, start(node)); ann.declarationSourceEnd = end(node); ann.memberValue = values[0].value; return set(node, ann); } NormalAnnotation ann = new NormalAnnotation(type, start(node)); ann.declarationSourceEnd = end(node); ann.memberValuePairs = values; return set(node, ann); }
@Override public boolean visitAnnotation(lombok.ast.Annotation node) { //TODO add test where the value is the result of string concatenation TypeReference type = (TypeReference) toTree(node.astAnnotationTypeReference()); boolean isEcjNormal = Position.UNPLACED == getConversionPositionInfo(node, "isNormalAnnotation"); if (node.astElements().isEmpty() && countStructure(node, "(") == 0 && !isEcjNormal) { MarkerAnnotation ann = new MarkerAnnotation(type, start(node)); ann.declarationSourceEnd = end(node); return set(node, ann); } MemberValuePair[] values = toArray(MemberValuePair.class, node.astElements()); if (values != null && (values.length == 1 && values[0].name == null)) { SingleMemberAnnotation ann = new SingleMemberAnnotation(type, start(node)); ann.declarationSourceEnd = end(node); ann.memberValue = values[0].value; return set(node, ann); } NormalAnnotation ann = new NormalAnnotation(type, start(node)); ann.declarationSourceEnd = end(node); ann.memberValuePairs = values; return set(node, ann); }
TypeReference t = annotation.astAnnotationTypeReference(); String typeName = t.getTypeName(); if (typeName.endsWith(TARGET_API)) {