Search in sources :

Example 6 with ArrayTypeTree

use of org.sonar.plugins.java.api.tree.ArrayTypeTree in project sonar-java by SonarSource.

the class JavaTreeModelTest method type.

@Test
public void type() {
    ArrayTypeTree tree = (ArrayTypeTree) ((MethodTree) firstTypeMember("class T { int[] m() { return null; } }")).returnType();
    assertThat(tree.type()).isInstanceOf(PrimitiveTypeTree.class);
}
Also used : ArrayTypeTree(org.sonar.plugins.java.api.tree.ArrayTypeTree) Test(org.junit.Test)

Example 7 with ArrayTypeTree

use of org.sonar.plugins.java.api.tree.ArrayTypeTree in project sonar-java by SonarSource.

the class JavaTreeModelTest method enum_field.

@Test
public void enum_field() {
    List<Tree> declarations = firstType("enum T { ; public int f1 = 42, f2[]; }").members();
    assertThat(declarations).hasSize(3);
    assertThat(declarations.get(0).is(Tree.Kind.EMPTY_STATEMENT)).isTrue();
    VariableTree tree = (VariableTree) declarations.get(1);
    assertThat(tree.is(Tree.Kind.VARIABLE)).isTrue();
    assertThat(tree.modifiers().modifiers()).hasSize(1);
    assertThat(tree.modifiers().modifiers().get(0).modifier()).isEqualTo(Modifier.PUBLIC);
    assertThat(tree.type()).isInstanceOf(PrimitiveTypeTree.class);
    assertThat(tree.simpleName().name()).isEqualTo("f1");
    assertThat(tree.initializer()).isNotNull();
    assertThatChildrenIteratorHasSize(tree, 6);
    tree = (VariableTree) declarations.get(2);
    assertThat(tree.is(Tree.Kind.VARIABLE)).isTrue();
    assertThat(tree.modifiers().modifiers()).hasSize(1);
    assertThat(tree.modifiers().modifiers().get(0).modifier()).isEqualTo(Modifier.PUBLIC);
    assertThatArrayTypeHasBrackets((ArrayTypeTree) tree.type());
    assertThat(tree.simpleName().name()).isEqualTo("f2");
    assertThat(tree.initializer()).isNull();
    assertThatChildrenIteratorHasSize(tree, 4);
}
Also used : VariableTree(org.sonar.plugins.java.api.tree.VariableTree) ImportClauseTree(org.sonar.plugins.java.api.tree.ImportClauseTree) BlockTree(org.sonar.plugins.java.api.tree.BlockTree) CompilationUnitTree(org.sonar.plugins.java.api.tree.CompilationUnitTree) SynchronizedStatementTree(org.sonar.plugins.java.api.tree.SynchronizedStatementTree) StaticInitializerTree(org.sonar.plugins.java.api.tree.StaticInitializerTree) TryStatementTree(org.sonar.plugins.java.api.tree.TryStatementTree) IfStatementTree(org.sonar.plugins.java.api.tree.IfStatementTree) CaseLabelTree(org.sonar.plugins.java.api.tree.CaseLabelTree) UnionTypeTree(org.sonar.plugins.java.api.tree.UnionTypeTree) MemberSelectExpressionTree(org.sonar.plugins.java.api.tree.MemberSelectExpressionTree) ArrayTypeTree(org.sonar.plugins.java.api.tree.ArrayTypeTree) TypeTree(org.sonar.plugins.java.api.tree.TypeTree) NewArrayTree(org.sonar.plugins.java.api.tree.NewArrayTree) ContinueStatementTree(org.sonar.plugins.java.api.tree.ContinueStatementTree) ExpressionStatementTree(org.sonar.plugins.java.api.tree.ExpressionStatementTree) ParameterizedTypeTree(org.sonar.plugins.java.api.tree.ParameterizedTypeTree) StatementTree(org.sonar.plugins.java.api.tree.StatementTree) TypeCastTree(org.sonar.plugins.java.api.tree.TypeCastTree) NewClassTree(org.sonar.plugins.java.api.tree.NewClassTree) AssignmentExpressionTree(org.sonar.plugins.java.api.tree.AssignmentExpressionTree) ClassTree(org.sonar.plugins.java.api.tree.ClassTree) UnaryExpressionTree(org.sonar.plugins.java.api.tree.UnaryExpressionTree) IdentifierTree(org.sonar.plugins.java.api.tree.IdentifierTree) PackageDeclarationTree(org.sonar.plugins.java.api.tree.PackageDeclarationTree) WildcardTree(org.sonar.plugins.java.api.tree.WildcardTree) LabeledStatementTree(org.sonar.plugins.java.api.tree.LabeledStatementTree) BreakStatementTree(org.sonar.plugins.java.api.tree.BreakStatementTree) ThrowStatementTree(org.sonar.plugins.java.api.tree.ThrowStatementTree) ExpressionTree(org.sonar.plugins.java.api.tree.ExpressionTree) ForStatementTree(org.sonar.plugins.java.api.tree.ForStatementTree) ParenthesizedTree(org.sonar.plugins.java.api.tree.ParenthesizedTree) VariableTree(org.sonar.plugins.java.api.tree.VariableTree) SwitchStatementTree(org.sonar.plugins.java.api.tree.SwitchStatementTree) ArrayDimensionTree(org.sonar.plugins.java.api.tree.ArrayDimensionTree) AssertStatementTree(org.sonar.plugins.java.api.tree.AssertStatementTree) EnumConstantTree(org.sonar.plugins.java.api.tree.EnumConstantTree) MethodReferenceTree(org.sonar.plugins.java.api.tree.MethodReferenceTree) AnnotationTree(org.sonar.plugins.java.api.tree.AnnotationTree) BinaryExpressionTree(org.sonar.plugins.java.api.tree.BinaryExpressionTree) ReturnStatementTree(org.sonar.plugins.java.api.tree.ReturnStatementTree) LiteralTree(org.sonar.plugins.java.api.tree.LiteralTree) ConditionalExpressionTree(org.sonar.plugins.java.api.tree.ConditionalExpressionTree) ImportTree(org.sonar.plugins.java.api.tree.ImportTree) PrimitiveTypeTree(org.sonar.plugins.java.api.tree.PrimitiveTypeTree) ModifierKeywordTree(org.sonar.plugins.java.api.tree.ModifierKeywordTree) TypeParameterTree(org.sonar.plugins.java.api.tree.TypeParameterTree) CaseGroupTree(org.sonar.plugins.java.api.tree.CaseGroupTree) Tree(org.sonar.plugins.java.api.tree.Tree) ArrayAccessExpressionTree(org.sonar.plugins.java.api.tree.ArrayAccessExpressionTree) WhileStatementTree(org.sonar.plugins.java.api.tree.WhileStatementTree) EmptyStatementTree(org.sonar.plugins.java.api.tree.EmptyStatementTree) MethodInvocationTree(org.sonar.plugins.java.api.tree.MethodInvocationTree) DoWhileStatementTree(org.sonar.plugins.java.api.tree.DoWhileStatementTree) LambdaExpressionTree(org.sonar.plugins.java.api.tree.LambdaExpressionTree) InstanceOfTree(org.sonar.plugins.java.api.tree.InstanceOfTree) CatchTree(org.sonar.plugins.java.api.tree.CatchTree) MethodTree(org.sonar.plugins.java.api.tree.MethodTree) Test(org.junit.Test)

Example 8 with ArrayTypeTree

use of org.sonar.plugins.java.api.tree.ArrayTypeTree in project sonar-java by SonarSource.

the class JavaTreeModelTest method class_field.

@Test
public void class_field() {
    List<Tree> declarations = firstType("class T { public int f1 = 42, f2[]; }").members();
    assertThat(declarations).hasSize(2);
    VariableTree tree = (VariableTree) declarations.get(0);
    assertThat(tree.is(Tree.Kind.VARIABLE)).isTrue();
    assertThat(tree.modifiers().modifiers()).hasSize(1);
    assertThat(tree.modifiers().modifiers().get(0).modifier()).isEqualTo(Modifier.PUBLIC);
    assertThat(tree.type()).isInstanceOf(PrimitiveTypeTree.class);
    assertThat(tree.simpleName().name()).isEqualTo("f1");
    assertThat(tree.initializer()).isNotNull();
    assertThat(tree.endToken()).isNotNull();
    assertThat(tree.endToken().text()).isEqualTo(",");
    assertThatChildrenIteratorHasSize(tree, 6);
    tree = (VariableTree) declarations.get(1);
    assertThat(tree.is(Tree.Kind.VARIABLE)).isTrue();
    assertThat(tree.modifiers().modifiers()).hasSize(1);
    assertThat(tree.modifiers().modifiers().get(0).modifier()).isEqualTo(Modifier.PUBLIC);
    assertThat(tree.type()).isInstanceOf(ArrayTypeTree.class);
    assertThatArrayTypeHasBrackets((ArrayTypeTree) tree.type());
    assertThat(tree.simpleName().name()).isEqualTo("f2");
    assertThat(tree.initializer()).isNull();
    assertThat(tree.endToken()).isNotNull();
    assertThat(tree.endToken().text()).isEqualTo(";");
    assertThatChildrenIteratorHasSize(tree, 4);
}
Also used : VariableTree(org.sonar.plugins.java.api.tree.VariableTree) ImportClauseTree(org.sonar.plugins.java.api.tree.ImportClauseTree) BlockTree(org.sonar.plugins.java.api.tree.BlockTree) CompilationUnitTree(org.sonar.plugins.java.api.tree.CompilationUnitTree) SynchronizedStatementTree(org.sonar.plugins.java.api.tree.SynchronizedStatementTree) StaticInitializerTree(org.sonar.plugins.java.api.tree.StaticInitializerTree) TryStatementTree(org.sonar.plugins.java.api.tree.TryStatementTree) IfStatementTree(org.sonar.plugins.java.api.tree.IfStatementTree) CaseLabelTree(org.sonar.plugins.java.api.tree.CaseLabelTree) UnionTypeTree(org.sonar.plugins.java.api.tree.UnionTypeTree) MemberSelectExpressionTree(org.sonar.plugins.java.api.tree.MemberSelectExpressionTree) ArrayTypeTree(org.sonar.plugins.java.api.tree.ArrayTypeTree) TypeTree(org.sonar.plugins.java.api.tree.TypeTree) NewArrayTree(org.sonar.plugins.java.api.tree.NewArrayTree) ContinueStatementTree(org.sonar.plugins.java.api.tree.ContinueStatementTree) ExpressionStatementTree(org.sonar.plugins.java.api.tree.ExpressionStatementTree) ParameterizedTypeTree(org.sonar.plugins.java.api.tree.ParameterizedTypeTree) StatementTree(org.sonar.plugins.java.api.tree.StatementTree) TypeCastTree(org.sonar.plugins.java.api.tree.TypeCastTree) NewClassTree(org.sonar.plugins.java.api.tree.NewClassTree) AssignmentExpressionTree(org.sonar.plugins.java.api.tree.AssignmentExpressionTree) ClassTree(org.sonar.plugins.java.api.tree.ClassTree) UnaryExpressionTree(org.sonar.plugins.java.api.tree.UnaryExpressionTree) IdentifierTree(org.sonar.plugins.java.api.tree.IdentifierTree) PackageDeclarationTree(org.sonar.plugins.java.api.tree.PackageDeclarationTree) WildcardTree(org.sonar.plugins.java.api.tree.WildcardTree) LabeledStatementTree(org.sonar.plugins.java.api.tree.LabeledStatementTree) BreakStatementTree(org.sonar.plugins.java.api.tree.BreakStatementTree) ThrowStatementTree(org.sonar.plugins.java.api.tree.ThrowStatementTree) ExpressionTree(org.sonar.plugins.java.api.tree.ExpressionTree) ForStatementTree(org.sonar.plugins.java.api.tree.ForStatementTree) ParenthesizedTree(org.sonar.plugins.java.api.tree.ParenthesizedTree) VariableTree(org.sonar.plugins.java.api.tree.VariableTree) SwitchStatementTree(org.sonar.plugins.java.api.tree.SwitchStatementTree) ArrayDimensionTree(org.sonar.plugins.java.api.tree.ArrayDimensionTree) AssertStatementTree(org.sonar.plugins.java.api.tree.AssertStatementTree) EnumConstantTree(org.sonar.plugins.java.api.tree.EnumConstantTree) MethodReferenceTree(org.sonar.plugins.java.api.tree.MethodReferenceTree) AnnotationTree(org.sonar.plugins.java.api.tree.AnnotationTree) BinaryExpressionTree(org.sonar.plugins.java.api.tree.BinaryExpressionTree) ReturnStatementTree(org.sonar.plugins.java.api.tree.ReturnStatementTree) LiteralTree(org.sonar.plugins.java.api.tree.LiteralTree) ConditionalExpressionTree(org.sonar.plugins.java.api.tree.ConditionalExpressionTree) ImportTree(org.sonar.plugins.java.api.tree.ImportTree) PrimitiveTypeTree(org.sonar.plugins.java.api.tree.PrimitiveTypeTree) ModifierKeywordTree(org.sonar.plugins.java.api.tree.ModifierKeywordTree) TypeParameterTree(org.sonar.plugins.java.api.tree.TypeParameterTree) CaseGroupTree(org.sonar.plugins.java.api.tree.CaseGroupTree) Tree(org.sonar.plugins.java.api.tree.Tree) ArrayAccessExpressionTree(org.sonar.plugins.java.api.tree.ArrayAccessExpressionTree) WhileStatementTree(org.sonar.plugins.java.api.tree.WhileStatementTree) EmptyStatementTree(org.sonar.plugins.java.api.tree.EmptyStatementTree) MethodInvocationTree(org.sonar.plugins.java.api.tree.MethodInvocationTree) DoWhileStatementTree(org.sonar.plugins.java.api.tree.DoWhileStatementTree) LambdaExpressionTree(org.sonar.plugins.java.api.tree.LambdaExpressionTree) InstanceOfTree(org.sonar.plugins.java.api.tree.InstanceOfTree) CatchTree(org.sonar.plugins.java.api.tree.CatchTree) MethodTree(org.sonar.plugins.java.api.tree.MethodTree) Test(org.junit.Test)

Example 9 with ArrayTypeTree

use of org.sonar.plugins.java.api.tree.ArrayTypeTree in project sonar-java by SonarSource.

the class JavaTreeModelTest method array_field.

@Test
public void array_field() {
    VariableTree field;
    ArrayTypeTree arrayTypeTree, childArrayTypeTree;
    field = (VariableTree) firstTypeMember("class T { int[] a; }");
    assertThatChildrenIteratorHasSize(field, 4);
    assertThat(field.type()).isInstanceOf(ArrayTypeTree.class);
    arrayTypeTree = (ArrayTypeTree) field.type();
    assertThatArrayTypeHasBrackets(arrayTypeTree);
    assertThatChildrenIteratorHasSize(arrayTypeTree, 3);
    assertThat(arrayTypeTree.type()).isInstanceOf(PrimitiveTypeTree.class);
    field = (VariableTree) firstTypeMember("class T { int[][] a; }");
    assertThatChildrenIteratorHasSize(field, 4);
    assertThat(field.type()).isInstanceOf(ArrayTypeTree.class);
    arrayTypeTree = (ArrayTypeTree) field.type();
    assertThatArrayTypeHasBrackets(arrayTypeTree);
    assertThatChildrenIteratorHasSize(arrayTypeTree, 3);
    assertThat(arrayTypeTree.type()).isInstanceOf(ArrayTypeTree.class);
    childArrayTypeTree = (ArrayTypeTree) arrayTypeTree.type();
    assertThatArrayTypeHasBrackets(childArrayTypeTree);
    assertThatChildrenIteratorHasSize(arrayTypeTree, 3);
    assertThat(childArrayTypeTree.openBracketToken().column() < arrayTypeTree.openBracketToken().column()).isTrue();
    assertThat(childArrayTypeTree.type()).isInstanceOf(PrimitiveTypeTree.class);
    field = (VariableTree) firstTypeMember("class T { int @Foo [] a; }");
    assertThatChildrenIteratorHasSize(field, 4);
    assertThat(field.type()).isInstanceOf(ArrayTypeTree.class);
    arrayTypeTree = (ArrayTypeTree) field.type();
    assertThat(arrayTypeTree.type()).isInstanceOf(PrimitiveTypeTree.class);
    assertThatArrayTypeHasBracketsAndAnnotations(arrayTypeTree, 1);
    assertThatChildrenIteratorHasSize(arrayTypeTree, 4);
    field = (VariableTree) firstTypeMember("class T { int @Foo @bar [] a; }");
    assertThatChildrenIteratorHasSize(field, 4);
    assertThat(field.type()).isInstanceOf(ArrayTypeTree.class);
    arrayTypeTree = (ArrayTypeTree) field.type();
    assertThat(arrayTypeTree.type()).isInstanceOf(PrimitiveTypeTree.class);
    assertThatArrayTypeHasBracketsAndAnnotations(arrayTypeTree, 2);
    assertThatChildrenIteratorHasSize(arrayTypeTree, 5);
    field = (VariableTree) firstTypeMember("class T { int[] @Foo [] a; }");
    assertThatChildrenIteratorHasSize(field, 4);
    assertThat(field.type()).isInstanceOf(ArrayTypeTree.class);
    arrayTypeTree = (ArrayTypeTree) field.type();
    assertThatArrayTypeHasBracketsAndAnnotations(arrayTypeTree, 1);
    assertThatChildrenIteratorHasSize(arrayTypeTree, 4);
    childArrayTypeTree = (ArrayTypeTree) arrayTypeTree.type();
    assertThat(childArrayTypeTree).isInstanceOf(ArrayTypeTree.class);
    assertThatArrayTypeHasBrackets(childArrayTypeTree);
    assertThatChildrenIteratorHasSize(childArrayTypeTree, 3);
    assertThat(childArrayTypeTree.openBracketToken().column() < arrayTypeTree.openBracketToken().column()).isTrue();
    assertThat(childArrayTypeTree.type()).isInstanceOf(PrimitiveTypeTree.class);
    field = (VariableTree) firstTypeMember("class T { int[] a[]; }");
    assertThatChildrenIteratorHasSize(field, 4);
    assertThat(field.type()).isInstanceOf(ArrayTypeTree.class);
    arrayTypeTree = (ArrayTypeTree) field.type();
    assertThatArrayTypeHasBrackets(arrayTypeTree);
    assertThatChildrenIteratorHasSize(arrayTypeTree, 3);
    childArrayTypeTree = (ArrayTypeTree) arrayTypeTree.type();
    assertThat(childArrayTypeTree).isInstanceOf(ArrayTypeTree.class);
    assertThatArrayTypeHasBrackets(childArrayTypeTree);
    assertThatChildrenIteratorHasSize(childArrayTypeTree, 3);
    assertThat(childArrayTypeTree.openBracketToken().column() < arrayTypeTree.openBracketToken().column()).isTrue();
    assertThat(childArrayTypeTree.type()).isInstanceOf(PrimitiveTypeTree.class);
    field = (VariableTree) firstTypeMember("class T { int[] a @Foo []; }");
    assertThatChildrenIteratorHasSize(field, 4);
    assertThat(field.type()).isInstanceOf(ArrayTypeTree.class);
    arrayTypeTree = (ArrayTypeTree) field.type();
    assertThat(arrayTypeTree).isInstanceOf(ArrayTypeTree.class);
    assertThatArrayTypeHasBracketsAndAnnotations(arrayTypeTree, 1);
    assertThatChildrenIteratorHasSize(arrayTypeTree, 4);
    childArrayTypeTree = (ArrayTypeTree) arrayTypeTree.type();
    assertThat(childArrayTypeTree).isInstanceOf(ArrayTypeTree.class);
    assertThatArrayTypeHasBrackets(childArrayTypeTree);
    assertThatChildrenIteratorHasSize(childArrayTypeTree, 3);
    assertThat(childArrayTypeTree.openBracketToken().column() < arrayTypeTree.openBracketToken().column()).isTrue();
    assertThat(childArrayTypeTree.type()).isInstanceOf(PrimitiveTypeTree.class);
}
Also used : VariableTree(org.sonar.plugins.java.api.tree.VariableTree) ArrayTypeTree(org.sonar.plugins.java.api.tree.ArrayTypeTree) Test(org.junit.Test)

Example 10 with ArrayTypeTree

use of org.sonar.plugins.java.api.tree.ArrayTypeTree in project sonar-java by SonarSource.

the class JavaTreeModelTest method annotation_constant.

@Test
public void annotation_constant() {
    List<Tree> members = firstType("@interface T { int c1 = 1, c2[] = { 2 }; }").members();
    assertThat(members).hasSize(2);
    VariableTree tree = (VariableTree) members.get(0);
    assertThat(tree.is(Tree.Kind.VARIABLE)).isTrue();
    assertThat(tree.type()).isInstanceOf(PrimitiveTypeTree.class);
    assertThat(tree.simpleName().name()).isEqualTo("c1");
    assertThat(tree.initializer()).isNotNull();
    // 1+5, as empty modifiers are always included
    assertThatChildrenIteratorHasSize(tree, 6);
    tree = (VariableTree) members.get(1);
    assertThat(tree.is(Tree.Kind.VARIABLE)).isTrue();
    assertThat(tree.type()).isInstanceOf(ArrayTypeTree.class);
    assertThatArrayTypeHasBrackets((ArrayTypeTree) tree.type());
    assertThat(tree.simpleName().name()).isEqualTo("c2");
    assertThat(tree.initializer()).isNotNull();
    assertThatChildrenIteratorHasSize(tree, 6);
}
Also used : VariableTree(org.sonar.plugins.java.api.tree.VariableTree) ImportClauseTree(org.sonar.plugins.java.api.tree.ImportClauseTree) BlockTree(org.sonar.plugins.java.api.tree.BlockTree) CompilationUnitTree(org.sonar.plugins.java.api.tree.CompilationUnitTree) SynchronizedStatementTree(org.sonar.plugins.java.api.tree.SynchronizedStatementTree) StaticInitializerTree(org.sonar.plugins.java.api.tree.StaticInitializerTree) TryStatementTree(org.sonar.plugins.java.api.tree.TryStatementTree) IfStatementTree(org.sonar.plugins.java.api.tree.IfStatementTree) CaseLabelTree(org.sonar.plugins.java.api.tree.CaseLabelTree) UnionTypeTree(org.sonar.plugins.java.api.tree.UnionTypeTree) MemberSelectExpressionTree(org.sonar.plugins.java.api.tree.MemberSelectExpressionTree) ArrayTypeTree(org.sonar.plugins.java.api.tree.ArrayTypeTree) TypeTree(org.sonar.plugins.java.api.tree.TypeTree) NewArrayTree(org.sonar.plugins.java.api.tree.NewArrayTree) ContinueStatementTree(org.sonar.plugins.java.api.tree.ContinueStatementTree) ExpressionStatementTree(org.sonar.plugins.java.api.tree.ExpressionStatementTree) ParameterizedTypeTree(org.sonar.plugins.java.api.tree.ParameterizedTypeTree) StatementTree(org.sonar.plugins.java.api.tree.StatementTree) TypeCastTree(org.sonar.plugins.java.api.tree.TypeCastTree) NewClassTree(org.sonar.plugins.java.api.tree.NewClassTree) AssignmentExpressionTree(org.sonar.plugins.java.api.tree.AssignmentExpressionTree) ClassTree(org.sonar.plugins.java.api.tree.ClassTree) UnaryExpressionTree(org.sonar.plugins.java.api.tree.UnaryExpressionTree) IdentifierTree(org.sonar.plugins.java.api.tree.IdentifierTree) PackageDeclarationTree(org.sonar.plugins.java.api.tree.PackageDeclarationTree) WildcardTree(org.sonar.plugins.java.api.tree.WildcardTree) LabeledStatementTree(org.sonar.plugins.java.api.tree.LabeledStatementTree) BreakStatementTree(org.sonar.plugins.java.api.tree.BreakStatementTree) ThrowStatementTree(org.sonar.plugins.java.api.tree.ThrowStatementTree) ExpressionTree(org.sonar.plugins.java.api.tree.ExpressionTree) ForStatementTree(org.sonar.plugins.java.api.tree.ForStatementTree) ParenthesizedTree(org.sonar.plugins.java.api.tree.ParenthesizedTree) VariableTree(org.sonar.plugins.java.api.tree.VariableTree) SwitchStatementTree(org.sonar.plugins.java.api.tree.SwitchStatementTree) ArrayDimensionTree(org.sonar.plugins.java.api.tree.ArrayDimensionTree) AssertStatementTree(org.sonar.plugins.java.api.tree.AssertStatementTree) EnumConstantTree(org.sonar.plugins.java.api.tree.EnumConstantTree) MethodReferenceTree(org.sonar.plugins.java.api.tree.MethodReferenceTree) AnnotationTree(org.sonar.plugins.java.api.tree.AnnotationTree) BinaryExpressionTree(org.sonar.plugins.java.api.tree.BinaryExpressionTree) ReturnStatementTree(org.sonar.plugins.java.api.tree.ReturnStatementTree) LiteralTree(org.sonar.plugins.java.api.tree.LiteralTree) ConditionalExpressionTree(org.sonar.plugins.java.api.tree.ConditionalExpressionTree) ImportTree(org.sonar.plugins.java.api.tree.ImportTree) PrimitiveTypeTree(org.sonar.plugins.java.api.tree.PrimitiveTypeTree) ModifierKeywordTree(org.sonar.plugins.java.api.tree.ModifierKeywordTree) TypeParameterTree(org.sonar.plugins.java.api.tree.TypeParameterTree) CaseGroupTree(org.sonar.plugins.java.api.tree.CaseGroupTree) Tree(org.sonar.plugins.java.api.tree.Tree) ArrayAccessExpressionTree(org.sonar.plugins.java.api.tree.ArrayAccessExpressionTree) WhileStatementTree(org.sonar.plugins.java.api.tree.WhileStatementTree) EmptyStatementTree(org.sonar.plugins.java.api.tree.EmptyStatementTree) MethodInvocationTree(org.sonar.plugins.java.api.tree.MethodInvocationTree) DoWhileStatementTree(org.sonar.plugins.java.api.tree.DoWhileStatementTree) LambdaExpressionTree(org.sonar.plugins.java.api.tree.LambdaExpressionTree) InstanceOfTree(org.sonar.plugins.java.api.tree.InstanceOfTree) CatchTree(org.sonar.plugins.java.api.tree.CatchTree) MethodTree(org.sonar.plugins.java.api.tree.MethodTree) Test(org.junit.Test)

Aggregations

ArrayTypeTree (org.sonar.plugins.java.api.tree.ArrayTypeTree)12 Test (org.junit.Test)9 MethodTree (org.sonar.plugins.java.api.tree.MethodTree)8 VariableTree (org.sonar.plugins.java.api.tree.VariableTree)8 TypeTree (org.sonar.plugins.java.api.tree.TypeTree)6 AnnotationTree (org.sonar.plugins.java.api.tree.AnnotationTree)4 ArrayAccessExpressionTree (org.sonar.plugins.java.api.tree.ArrayAccessExpressionTree)4 ArrayDimensionTree (org.sonar.plugins.java.api.tree.ArrayDimensionTree)4 AssertStatementTree (org.sonar.plugins.java.api.tree.AssertStatementTree)4 AssignmentExpressionTree (org.sonar.plugins.java.api.tree.AssignmentExpressionTree)4 BinaryExpressionTree (org.sonar.plugins.java.api.tree.BinaryExpressionTree)4 BlockTree (org.sonar.plugins.java.api.tree.BlockTree)4 BreakStatementTree (org.sonar.plugins.java.api.tree.BreakStatementTree)4 CaseGroupTree (org.sonar.plugins.java.api.tree.CaseGroupTree)4 CaseLabelTree (org.sonar.plugins.java.api.tree.CaseLabelTree)4 CatchTree (org.sonar.plugins.java.api.tree.CatchTree)4 ClassTree (org.sonar.plugins.java.api.tree.ClassTree)4 CompilationUnitTree (org.sonar.plugins.java.api.tree.CompilationUnitTree)4 ConditionalExpressionTree (org.sonar.plugins.java.api.tree.ConditionalExpressionTree)4 ContinueStatementTree (org.sonar.plugins.java.api.tree.ContinueStatementTree)4