Search in sources :

Example 21 with AnnotationMemberDeclaration

use of com.github.javaparser.ast.body.AnnotationMemberDeclaration in project javaparser by javaparser.

the class AnnotationMemberDeclarationTransformationsTest method removingAnnotationOnSomeLine.

@Test
public void removingAnnotationOnSomeLine() {
    AnnotationMemberDeclaration it = consider("@myAnno int foo();");
    it.getAnnotations().remove(0);
    assertTransformedToString("int foo();", it);
}
Also used : AnnotationMemberDeclaration(com.github.javaparser.ast.body.AnnotationMemberDeclaration) Test(org.junit.Test) AbstractLexicalPreservingTest(com.github.javaparser.printer.lexicalpreservation.AbstractLexicalPreservingTest)

Aggregations

AnnotationMemberDeclaration (com.github.javaparser.ast.body.AnnotationMemberDeclaration)21 Test (org.junit.Test)20 AbstractLexicalPreservingTest (com.github.javaparser.printer.lexicalpreservation.AbstractLexicalPreservingTest)18 CompilationUnit (com.github.javaparser.ast.CompilationUnit)2 IntegerLiteralExpr (com.github.javaparser.ast.expr.IntegerLiteralExpr)2 Modifier (com.github.javaparser.ast.Modifier)1 NodeList (com.github.javaparser.ast.NodeList)1 BlockComment (com.github.javaparser.ast.comments.BlockComment)1 Comment (com.github.javaparser.ast.comments.Comment)1 JavadocComment (com.github.javaparser.ast.comments.JavadocComment)1 LineComment (com.github.javaparser.ast.comments.LineComment)1 Name (com.github.javaparser.ast.expr.Name)1 NormalAnnotationExpr (com.github.javaparser.ast.expr.NormalAnnotationExpr)1