Search in sources :

Example 6 with ClassExpr

use of com.github.javaparser.ast.expr.ClassExpr in project javaparser by javaparser.

the class PrettyPrintVisitorTest method printArrayClassExpr.

@Test
public void printArrayClassExpr() {
    ClassExpr expr = JavaParser.parseExpression("Foo[].class");
    assertEquals("Foo[].class", print(expr));
}
Also used : ClassExpr(com.github.javaparser.ast.expr.ClassExpr) Test(org.junit.Test)

Example 7 with ClassExpr

use of com.github.javaparser.ast.expr.ClassExpr in project javaparser by javaparser.

the class PrettyPrintVisitorTest method printSimpleClassExpr.

@Test
public void printSimpleClassExpr() {
    ClassExpr expr = JavaParser.parseExpression("Foo.class");
    assertEquals("Foo.class", print(expr));
}
Also used : ClassExpr(com.github.javaparser.ast.expr.ClassExpr) Test(org.junit.Test)

Aggregations

ClassExpr (com.github.javaparser.ast.expr.ClassExpr)7 Test (org.junit.Test)6 BooleanLiteralExpr (com.github.javaparser.ast.expr.BooleanLiteralExpr)1 CharLiteralExpr (com.github.javaparser.ast.expr.CharLiteralExpr)1 DoubleLiteralExpr (com.github.javaparser.ast.expr.DoubleLiteralExpr)1 FieldAccessExpr (com.github.javaparser.ast.expr.FieldAccessExpr)1 IntegerLiteralExpr (com.github.javaparser.ast.expr.IntegerLiteralExpr)1 LongLiteralExpr (com.github.javaparser.ast.expr.LongLiteralExpr)1 NameExpr (com.github.javaparser.ast.expr.NameExpr)1 NullLiteralExpr (com.github.javaparser.ast.expr.NullLiteralExpr)1 StringLiteralExpr (com.github.javaparser.ast.expr.StringLiteralExpr)1 TypeElement (javax.lang.model.element.TypeElement)1 VariableElement (javax.lang.model.element.VariableElement)1