/** * Returns the name of the annotation as it is used, * eg {@code java.lang.Override} or {@code Override}. */ public String getAnnotationName() { return jjtGetChild(0).jjtGetChild(0).getImage(); }
private boolean doesNodeContainJUnitAnnotation(Node node, String annotationTypeClassName) { List<ASTAnnotation> annotations = node.findDescendantsOfType(ASTAnnotation.class); for (ASTAnnotation annotation : annotations) { Node annotationTypeNode = annotation.jjtGetChild(0); TypeNode annotationType = (TypeNode) annotationTypeNode; if (annotationType.getType() == null) { ASTName name = annotationTypeNode.getFirstChildOfType(ASTName.class); if (name != null && (name.hasImageEqualTo("Test") || name.hasImageEqualTo(annotationTypeClassName))) { return true; } } else if (TypeHelper.isA(annotationType, annotationTypeClassName)) { return true; } } return false; }
if (jjtGetChild(0) instanceof ASTMarkerAnnotation) { return false;
/** * Returns the name of the annotation as it is used, * eg {@code java.lang.Override} or {@code Override}. */ public String getAnnotationName() { return jjtGetChild(0).jjtGetChild(0).getImage(); }
private boolean doesNodeContainJUnitAnnotation(Node node, String annotationTypeClassName) { List<ASTAnnotation> annotations = node.findDescendantsOfType(ASTAnnotation.class); for (ASTAnnotation annotation : annotations) { Node annotationTypeNode = annotation.jjtGetChild(0); TypeNode annotationType = (TypeNode) annotationTypeNode; if (annotationType.getType() == null) { ASTName name = annotationTypeNode.getFirstChildOfType(ASTName.class); if (name != null && (name.hasImageEqualTo("Test") || name.hasImageEqualTo(annotationTypeClassName))) { return true; } } else if (TypeHelper.isA(annotationType, annotationTypeClassName)) { return true; } } return false; }
if (jjtGetChild(0) instanceof ASTMarkerAnnotation) { return false;