[java] Rename ASTClassOrInterfaceBody to ASTClassBody

This commit is contained in:
Andreas Dangel
2023-12-13 10:49:13 +01:00
parent ba0611534d
commit c579576b32
78 changed files with 212 additions and 211 deletions

View File

@ -69,18 +69,16 @@ $ cat Foo.xml
<CompilationUnit Image='' PackageName='' declarationsAreInDefaultPackage='true'>
<TypeDeclaration Image=''>
<ClassDeclaration Abstract='false' BinaryName='Foo' Default='false' Final='false' Image='Foo' Interface='false' Local='false' Modifiers='1' Native='false' Nested='false' PackagePrivate='false' Private='false' Protected='false' Public='true' SimpleName='Foo' Static='false' Strictfp='false' Synchronized='false' Transient='false' TypeKind='CLASS' Volatile='false'>
<ClassOrInterfaceBody AnonymousInnerClass='false' EnumChild='false' Image=''>
<ClassOrInterfaceBodyDeclaration AnonymousInnerClass='false' EnumChild='false' Image='' Kind='FIELD'>
<FieldDeclaration Abstract='false' AnnotationMember='false' Array='false' ArrayDepth='0' Default='false' Final='false' Image='' InterfaceMember='false' Modifiers='0' Native='false' PackagePrivate='true' Private='false' Protected='false' Public='false' Static='false' Strictfp='false' Synchronized='false' SyntacticallyFinal='false' SyntacticallyPublic='false' SyntacticallyStatic='false' Transient='false' VariableName='a' Volatile='false'>
<Type Array='false' ArrayDepth='0' ArrayType='false' Image='' TypeImage='int'>
<PrimitiveType Array='false' ArrayDepth='0' Boolean='false' Image='int' />
</Type>
<VariableDeclarator Image='' Initializer='false' Name='a'>
<VariableId Array='false' ArrayDepth='0' ArrayType='false' ExceptionBlockParameter='false' ExplicitReceiverParameter='false' Field='true' Final='false' FormalParameter='false' Image='a' LambdaParameter='false' LocalVariable='false' ResourceDeclaration='false' TypeInferred='false' VariableName='a' />
</VariableDeclarator>
</FieldDeclaration>
</ClassOrInterfaceBodyDeclaration>
</ClassOrInterfaceBody>
<ClassBody AnonymousInnerClass='false' EnumChild='false' Image=''>
<FieldDeclaration Abstract='false' AnnotationMember='false' Array='false' ArrayDepth='0' Default='false' Final='false' Image='' InterfaceMember='false' Modifiers='0' Native='false' PackagePrivate='true' Private='false' Protected='false' Public='false' Static='false' Strictfp='false' Synchronized='false' SyntacticallyFinal='false' SyntacticallyPublic='false' SyntacticallyStatic='false' Transient='false' VariableName='a' Volatile='false'>
<Type Array='false' ArrayDepth='0' ArrayType='false' Image='' TypeImage='int'>
<PrimitiveType Array='false' ArrayDepth='0' Boolean='false' Image='int' />
</Type>
<VariableDeclarator Image='' Initializer='false' Name='a'>
<VariableId Array='false' ArrayDepth='0' ArrayType='false' ExceptionBlockParameter='false' ExplicitReceiverParameter='false' Field='true' Final='false' FormalParameter='false' Image='a' LambdaParameter='false' LocalVariable='false' ResourceDeclaration='false' TypeInferred='false' VariableName='a' />
</VariableDeclarator>
</FieldDeclaration>
</ClassBody>
</ClassDeclaration>
</TypeDeclaration>
</CompilationUnit>

View File

@ -52,7 +52,7 @@ class Foo extends Object {
└─ ClassDeclaration "Foo"
├─ ExtendsList
│ └─ ClassType "Object"
└─ ClassOrInterfaceBody
└─ ClassBody
```
</td>

View File

@ -398,6 +398,7 @@ which can also display the AST.
* AnyTypeDeclaration ➡️ TypeDeclaration ({% jdoc jast::ASTTypeDeclaration %})
* MethodOrConstructorDeclaration ➡️ ExecutableDeclaration ({% jdoc jast::ASTExecutableDeclaration %})
* VariableDeclaratorId ➡️ VariableId ({% jdoc jast::ASTVariableId %})
* ClassOrInterfaceBody ➡️ ClassBody ({% jdoc jast::ASTClassBody %})
#### Annotations
@ -615,7 +616,7 @@ Top-level type declaration
├─ ModifierList
│ └─ Annotation "A"
│ └─ ClassType "A"
└─ ClassOrInterfaceBody
└─ ClassBody
{% endhighlight %}
</td>
</tr>
@ -1383,7 +1384,7 @@ public @A class C {}
├─ ModifierList
│ └─ Annotation "A"
│ └─ ClassType "A"
└─ ClassOrInterfaceBody
└─ ClassBody
{% endhighlight %}
</td>
</tr>
@ -1428,7 +1429,7 @@ public class Flat {
└─ CompilationUnit
└─ ClassDeclaration "Flat"
├─ ModifierList
└─ ClassOrInterfaceBody
└─ ClassBody
└─ FieldDeclaration
├─ ModifierList
├─ PrimitiveType "int"
@ -1601,7 +1602,7 @@ Object anonymous = new Object() { };
├─ ArgumentList
└─ AnonymousClassDeclaration
├─ ModifierList
└─ ClassOrInterfaceBody
└─ ClassBody
{% endhighlight %}
</td></tr>
</table>
@ -1668,7 +1669,7 @@ public class Sample {
</td>
<td>
{% highlight js %}
└─ ClassOrInterfaceBody
└─ ClassBody
├─ ConstructorDeclaration[ @Name = 'Sample' ]
│ ├─ ModifierList
│ ├─ FormalParameters
@ -2257,7 +2258,7 @@ class LocalClass {}
└─ LocalClassStatement
└─ ClassDeclaration "LocalClass"
├─ ModifierList
└─ ClassOrInterfaceBody
└─ ClassBody
{% endhighlight %}
</td></tr>
</table>

View File

@ -179,6 +179,8 @@ The following previously deprecated classes have been removed:
directly, e.g. through downcasting. Or when using the XPath function `pmd-java:nodeIs()`.
* The node `ASTVariableDeclaratorId` has been renamed to {% jdoc java::lang.ast.ASTVariableId %}. XPath rules
need to be adjusted.
* The node `ASTClassOrInterfaceBody` has been renamed to {% jdoc java::lang.ast.ASTClassBody %}. XPath rules
need to be adjusted.
**Deprecated classes and methods**

View File

@ -1373,7 +1373,7 @@ void TypeParameter():
<IDENTIFIER> {setLastTokenImage(jjtThis);} [ "extends" IntersectionType() ]
}
void ClassOrInterfaceBody():
void ClassOrInterfaceBody() #ClassBody:
{}
{
"{" { tokenContexts.push(TokenContext.BLOCK); }

View File

@ -19,7 +19,7 @@ import net.sourceforge.pmd.lang.java.types.JTypeMirror;
*
* <pre class="grammar">
*
* AnonymousClassDeclaration ::= {@link ASTModifierList EmptyModifierList} {@link ASTClassOrInterfaceBody}
* AnonymousClassDeclaration ::= {@link ASTModifierList EmptyModifierList} {@link ASTClassBody}
*
* </pre>
*/

View File

@ -10,13 +10,13 @@ package net.sourceforge.pmd.lang.java.ast;
*
* <pre class="grammar">
*
* ClassOrInterfaceBody ::= "{" {@linkplain ASTBodyDeclaration ClassOrInterfaceBodyDeclaration}* "}"
* ClassBody ::= "{" {@linkplain ASTBodyDeclaration ClassBodyDeclaration}* "}"
*
* </pre>
*/
public final class ASTClassOrInterfaceBody extends ASTTypeBody {
public final class ASTClassBody extends ASTTypeBody {
ASTClassOrInterfaceBody(int id) {
ASTClassBody(int id) {
super(id);
}

View File

@ -21,7 +21,7 @@ import net.sourceforge.pmd.lang.ast.Node;
* {@link ASTTypeParameters TypeParameters}?
* {@link ASTExtendsList ExtendsList}?
* {@link ASTImplementsList ImplementsList}?
* {@link ASTClassOrInterfaceBody ClassOrInterfaceBody}
* {@link ASTClassBody ClassBody}
*
* </pre>
*/

View File

@ -12,7 +12,7 @@ package net.sourceforge.pmd.lang.java.ast;
* EnumBody ::= "{"
* [ {@link ASTEnumConstant EnumConstant} ( "," ( {@link ASTEnumConstant EnumConstant} )* ]
* [ "," ]
* [ ";" ( {@link ASTBodyDeclaration ClassOrInterfaceBodyDeclaration} )* ]
* [ ";" ( {@link ASTBodyDeclaration BodyDeclaration} )* ]
* "}"
*
* </pre>

View File

@ -9,7 +9,7 @@ package net.sourceforge.pmd.lang.java.ast;
*
* <pre class="grammar">
*
* TypeBody ::= {@link ASTClassOrInterfaceBody ClassOrInterfaceBody}
* TypeBody ::= {@link ASTClassBody ClassBody}
* | {@link ASTEnumBody EnumBody}
* | {@link ASTRecordBody RecordBody}
* | {@link ASTAnnotationTypeBody AnnotationTypeBody}

View File

@ -10,7 +10,7 @@ import java.util.Deque;
import net.sourceforge.pmd.lang.java.ast.ASTBlock;
import net.sourceforge.pmd.lang.java.ast.ASTBreakStatement;
import net.sourceforge.pmd.lang.java.ast.ASTCatchClause;
import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceBody;
import net.sourceforge.pmd.lang.java.ast.ASTClassBody;
import net.sourceforge.pmd.lang.java.ast.ASTConditionalExpression;
import net.sourceforge.pmd.lang.java.ast.ASTContinueStatement;
import net.sourceforge.pmd.lang.java.ast.ASTDoStatement;
@ -270,7 +270,7 @@ public class CognitiveComplexityVisitor extends JavaVisitorBase<CognitiveComplex
}
@Override
public Void visit(ASTClassOrInterfaceBody node, State state) {
public Void visit(ASTClassBody node, State state) {
return nonStructural(node, state);
}

View File

@ -426,7 +426,7 @@ For other scenarios, consider using a utility class. See Effective Java's 'Use i
<property name="xpath">
<value>
<![CDATA[
//ClassDeclaration[@Interface = true()][$ignoreIfHasMethods= false() or not(ClassOrInterfaceBody/MethodDeclaration)]/ClassOrInterfaceBody/FieldDeclaration
//ClassDeclaration[@Interface = true()][$ignoreIfHasMethods= false() or not(ClassBody/MethodDeclaration)]/ClassBody/FieldDeclaration
]]>
</value>
</property>
@ -514,7 +514,7 @@ public class Foo {
<property name="xpath">
<value>
<![CDATA[
//ConstructorCall/AnonymousClassDeclaration/ClassOrInterfaceBody[count(*)=1]/Initializer[@Static=false()]
//ConstructorCall/AnonymousClassDeclaration/ClassBody[count(*)=1]/Initializer[@Static=false()]
]]>
</value>
</property>
@ -774,7 +774,7 @@ In TestNG, only methods annotated with the @Test annotation are executed.
<![CDATA[
//ClassDeclaration[matches(@SimpleName, $testClassPattern) or pmd-java:typeIs('junit.framework.TestCase')]
(: a junit 3 method :)
/ClassOrInterfaceBody/MethodDeclaration[
/ClassBody/MethodDeclaration[
@Visibility="public"
and starts-with(@Name, 'test')
and not(ModifierList/Annotation[
@ -833,7 +833,7 @@ Test methods are identified as those which use `@Test`, `@RepeatedTest`,
//ClassDeclaration[
(: a Junit 5 test class, ie, it has methods with the annotation :)
@Interface = false() and
ClassOrInterfaceBody/MethodDeclaration
ClassBody/MethodDeclaration
[ModifierList/Annotation[
pmd-java:typeIs('org.junit.jupiter.api.Test')
or pmd-java:typeIs('org.junit.jupiter.api.RepeatedTest')
@ -843,7 +843,7 @@ Test methods are identified as those which use `@Test`, `@RepeatedTest`,
]]
]/(
self::*[@Abstract = false() and @Visibility = ("public", "protected")]
| ClassOrInterfaceBody/MethodDeclaration
| ClassBody/MethodDeclaration
[@Visibility = ("public", "protected")]
[ModifierList/Annotation[
pmd-java:typeIs('org.junit.jupiter.api.Test')

View File

@ -82,7 +82,7 @@ Clarify your intent by using private or package access modifiers instead.
<value>
<![CDATA[
//ClassDeclaration[@Final = true()]
/ClassOrInterfaceBody
/ClassBody
/FieldDeclaration[@Visibility = "protected"]
]]>
</value>
@ -116,7 +116,7 @@ visibility cannot be reduced). Clarify your intent by using private or package a
<value>
<![CDATA[
//ClassDeclaration[@Final= true() and not(ExtendsList)]
/ClassOrInterfaceBody
/ClassBody
/MethodDeclaration[@Visibility="protected" and @Name != 'finalize']
]]>
</value>
@ -219,7 +219,7 @@ another constructor (such as an overloaded constructor) is called, this rule wil
<value>
<![CDATA[
//ClassDeclaration[ExtendsList/*]
/ClassOrInterfaceBody
/ClassBody
/ConstructorDeclaration[ not(Block/ExplicitConstructorInvocation) ]
]]>
</value>
@ -432,7 +432,7 @@ usage by developers who should be implementing their own versions in the concret
<value>
<![CDATA[
//ClassDeclaration[@RegularClass = true() and pmd-java:modifiers() = "abstract"]
/ClassOrInterfaceBody
/ClassBody
/MethodDeclaration
[Block[
let $size := count(*[not(self::EmptyStatement)])

View File

@ -27,7 +27,7 @@ protected constructor in order to prevent instantiation than make the class misl
<![CDATA[
//ClassDeclaration
[@Abstract = true() and @Interface = false()]
[ClassOrInterfaceBody[not(ConstructorDeclaration | MethodDeclaration)]]
[ClassBody[not(ConstructorDeclaration | MethodDeclaration)]]
[not(pmd-java:hasAnnotation('com.google.auto.value.AutoValue')
or pmd-java:hasAnnotation('lombok.AllArgsConstructor')
or pmd-java:hasAnnotation('lombok.NoArgsConstructor')
@ -1414,7 +1414,7 @@ city/state/zip fields could park them within a single Address field.
<property name="xpath">
<value>
<![CDATA[
//ClassDeclaration/ClassOrInterfaceBody
//ClassDeclaration/ClassBody
[count(FieldDeclaration
[not(pmd-java:modifiers() = 'final')]
[not(pmd-java:modifiers() = 'static')]
@ -1457,7 +1457,7 @@ complexity and find a way to have more fine grained objects.
<property name="xpath">
<value>
<![CDATA[
//ClassDeclaration/ClassOrInterfaceBody
//ClassDeclaration/ClassBody
[
count(MethodDeclaration[
not (

View File

@ -400,7 +400,7 @@ Smalltalk often prefer this approach as the methods denote accessor methods.
<value>
<![CDATA[
//FieldDeclaration/VariableDeclarator/VariableId
[some $method in ../../..[self::ClassOrInterfaceBody or self::EnumBody]/MethodDeclaration
[some $method in ../../..[self::ClassBody or self::EnumBody]/MethodDeclaration
satisfies lower-case(@Name) = lower-case($method/@Name)]
]]>
</value>
@ -2318,7 +2318,7 @@ chain needs an own serialVersionUID field. See also [Should an abstract class ha
<![CDATA[
//ClassDeclaration
[@Interface = false()]
[count(ClassOrInterfaceBody/FieldDeclaration/VariableDeclarator/VariableId[@Name='serialVersionUID']) = 0]
[count(ClassBody/FieldDeclaration/VariableDeclarator/VariableId[@Name='serialVersionUID']) = 0]
[(ImplementsList | ExtendsList)/ClassType[pmd-java:typeIs('java.io.Serializable')]]
]]>
</value>
@ -2365,26 +2365,26 @@ $topLevelClass[
pmd-java:hasAnnotation('lombok.RequiredArgsConstructor') or
pmd-java:hasAnnotation('lombok.AllArgsConstructor')) and
(: or has non-default constructors … :)
ClassOrInterfaceBody/ConstructorDeclaration and
ClassBody/ConstructorDeclaration and
(: … but only private … :)
not(ClassOrInterfaceBody/ConstructorDeclaration[@Visibility != "private"]) and
not(ClassBody/ConstructorDeclaration[@Visibility != "private"]) and
(: … and none annotated … :)
(every $x in $annotations satisfies
not(ClassOrInterfaceBody/ConstructorDeclaration/ModifierList/Annotation[pmd-java:typeIs($x)]))
not(ClassBody/ConstructorDeclaration/ModifierList/Annotation[pmd-java:typeIs($x)]))
)
]
[
(: With no visible static methods … :)
not(ClassOrInterfaceBody/MethodDeclaration[($isLombokUtility or pmd-java:modifiers() = "static") and @Visibility != "private"]) and
not(ClassBody/MethodDeclaration[($isLombokUtility or pmd-java:modifiers() = "static") and @Visibility != "private"]) and
(: … nor fields … :)
not(ClassOrInterfaceBody/FieldDeclaration[($isLombokUtility or pmd-java:modifiers() = "static") and @Visibility != "private"]) and
not(ClassBody/FieldDeclaration[($isLombokUtility or pmd-java:modifiers() = "static") and @Visibility != "private"]) and
(: … no nested classes, that are non-private and static … :)
not(ClassOrInterfaceBody/ClassDeclaration
not(ClassBody/ClassDeclaration
[pmd-java:modifiers() = "static" and @Visibility != "private"]
(: … with a default or non-private constructor … :)
[not(ClassOrInterfaceBody/ConstructorDeclaration) or ClassOrInterfaceBody/ConstructorDeclaration[@Visibility != "private"]]
[not(ClassBody/ConstructorDeclaration) or ClassBody/ConstructorDeclaration[@Visibility != "private"]]
(: … and a non-private method returning the outer class type … :)
[(ClassOrInterfaceBody/MethodDeclaration
[(ClassBody/MethodDeclaration
[@Visibility != "private"]
[descendant::ReturnStatement/*[1][pmd-java:typeIs(ancestor::ClassDeclaration[@Nested = false()]/@BinaryName)]]
) or (
@ -2428,7 +2428,7 @@ log4j2 (since 6.19.0).
<value><![CDATA[
//ClassDeclaration[
count(
ClassOrInterfaceBody/FieldDeclaration/ClassType[
ClassBody/FieldDeclaration/ClassType[
pmd-java:typeIs("org.apache.log4j.Logger") or
pmd-java:typeIs("org.apache.logging.log4j.Logger") or
pmd-java:typeIs("java.util.logging.Logger") or
@ -2675,7 +2675,7 @@ with the restriction that the logger needs to be passed into the constructor.
(: special case - final logger initialized inside constructor :)
or (VariableDeclarator/@Initializer = false()
and not(pmd-java:modifiers() = 'static')
and not(ancestor::ClassOrInterfaceBody/ConstructorDeclaration
and not(ancestor::ClassBody/ConstructorDeclaration
//AssignmentExpression[@Operator = '=']
[FieldAccess[1]/@Name = $loggerName or VariableAccess[1]/@Name = $loggerName]
[*[2][@Name = ancestor::ConstructorDeclaration//FormalParameter/VariableId/@Name]])
@ -2895,7 +2895,7 @@ behavior especially when instances are distributed by the container on several J
or pmd-java:typeIs('javax.ejb.EJBLocalHome')
or pmd-java:typeIs('javax.ejb.EJBObject')
]]
/ClassOrInterfaceBody/FieldDeclaration
/ClassBody/FieldDeclaration
[pmd-java:modifiers() = 'static']
[not(pmd-java:modifiers() = 'final')]
]]>

View File

@ -39,7 +39,7 @@ class GetModifiersFunctionsTest extends BaseXPathFunctionTest {
@Test
void testNotModifierOwnerReturnsEmptySequence() {
Rule rule = makeXpathRuleFromXPath("//ClassOrInterfaceBody[pmd-java:modifiers()]");
Rule rule = makeXpathRuleFromXPath("//ClassBody[pmd-java:modifiers()]");
String code = "interface O { class Foo { } }";
assertFinds(rule, 0, code);

View File

@ -35,7 +35,7 @@ class HasAnnotationXPathTest extends BaseXPathFunctionTest {
@Test
void testWrongTypeReturnsFalse() {
Rule rule = makeXpathRuleFromXPath("//ClassOrInterfaceBody[pmd-java:hasAnnotation('java.lang.Override')]");
Rule rule = makeXpathRuleFromXPath("//ClassBody[pmd-java:hasAnnotation('java.lang.Override')]");
String code = "interface O { @Override void foo(); }";
assertFinds(rule, 0, code);

View File

@ -40,7 +40,7 @@ class TypeIsFunctionTest extends BaseXPathFunctionTest {
@Test
void testWrongTypeReturnsFalse() {
Rule rule = makeXpathRuleFromXPath("//ClassOrInterfaceBody[pmd-java:typeIs('java.lang.Override')]");
Rule rule = makeXpathRuleFromXPath("//ClassBody[pmd-java:typeIs('java.lang.Override')]");
assertFinds(rule, 0, "interface O { @Override void foo(); }");
}

View File

@ -45,7 +45,7 @@ class ASTAnonymousClassTest : ParserTestSpec({
val anon = it
child<ASTClassOrInterfaceBody> {
child<ASTClassBody> {
child<ASTMethodDeclaration>(ignoreChildren = true) {
it::getEnclosingType shouldBe anon
}

View File

@ -265,7 +265,7 @@ class MemberInheritanceTest : ParserTestSpec({
acu.descendants(ASTClassDeclaration::class.java).toList { it.typeMirror }
val insideFoo =
acu.descendants(ASTClassOrInterfaceBody::class.java)
acu.descendants(ASTClassBody::class.java)
.crossFindBoundaries().get(2)!!
val `t_Scratch{String}Inner` = with (acu.typeDsl) {

View File

@ -1,7 +1,7 @@
+- CompilationUnit[@PackageName = ""]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Bug1429", @CanonicalName = "Bug1429", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Bug1429", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 1]
+- ClassBody[@Empty = false, @Size = 1]
+- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "getAttributeTuples", @Name = "getAttributeTuples", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassType[@FullyQualified = false, @SimpleName = "Set"]
@ -41,7 +41,7 @@
+- ArgumentList[@Empty = true, @Size = 0]
+- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "Bug1429$1", @CanonicalName = null, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "", @Static = false, @TopLevel = false, @Visibility = Visibility.V_ANONYMOUS]
+- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 1]
+- ClassBody[@Empty = false, @Size = 1]
+- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Image = "transform", @Name = "transform", @Overridden = true, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
| +- Annotation[@SimpleName = "Override"]

View File

@ -1,7 +1,7 @@
+- CompilationUnit[@PackageName = ""]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Bug1530", @CanonicalName = "Bug1530", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Bug1530", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 1]
+- ClassBody[@Empty = false, @Size = 1]
+- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "incChild", @Name = "incChild", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- VoidType[]

View File

@ -4,4 +4,4 @@
+- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "b", @ImportedSimpleName = "b", @PackageName = "", @Static = false]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Foo", @CanonicalName = "Foo", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Foo", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Empty = true, @Size = 0]
+- ClassBody[@Empty = true, @Size = 0]

View File

@ -4,6 +4,6 @@
+- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "a", @ImportedSimpleName = "a", @PackageName = "", @Static = false]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "c.Foo", @CanonicalName = "c.Foo", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "c", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Foo", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
| +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
| +- ClassOrInterfaceBody[@Empty = true, @Size = 0]
| +- ClassBody[@Empty = true, @Size = 0]
+- EmptyDeclaration[]
+- EmptyDeclaration[]

View File

@ -1,7 +1,7 @@
+- CompilationUnit[@PackageName = ""]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug207", @CanonicalName = "GitHubBug207", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug207", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 1]
+- ClassBody[@Empty = false, @Size = 1]
+- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Image = "resourceHttpMessageWriter", @Name = "resourceHttpMessageWriter", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false]
+- ModifierList[@EffectiveModifiers = "{private, static}", @ExplicitModifiers = "{private, static}"]
+- ClassType[@FullyQualified = false, @SimpleName = "HttpMessageWriter"]

View File

@ -1,7 +1,7 @@
+- CompilationUnit[@PackageName = ""]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug208", @CanonicalName = "GitHubBug208", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug208", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 1]
+- ClassBody[@Empty = false, @Size = 1]
+- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "testMethod", @Name = "testMethod", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- VoidType[]
@ -14,7 +14,7 @@
| | +- ClassType[@FullyQualified = false, @SimpleName = "Lazy"]
| +- Annotation[@SimpleName = "Configuration"]
| +- ClassType[@FullyQualified = false, @SimpleName = "Configuration"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 1]
+- ClassBody[@Empty = false, @Size = 1]
+- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Image = "foo", @Name = "foo", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false]
+- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
| +- Annotation[@SimpleName = "Bean"]

View File

@ -2,7 +2,7 @@
+- ImportDeclaration[@ImportOnDemand = true, @ImportedName = "java.util", @ImportedSimpleName = null, @PackageName = "java.util", @Static = false]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug309", @CanonicalName = "GitHubBug309", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug309", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 1]
+- ClassBody[@Empty = false, @Size = 1]
+- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "main", @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true]
+- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"]
+- VoidType[]

View File

@ -1,7 +1,7 @@
+- CompilationUnit[@PackageName = ""]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug3642", @CanonicalName = "GitHubBug3642", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug3642", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 1]
+- ClassBody[@Empty = false, @Size = 1]
+- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "GitHubBug3642$Foo", @CanonicalName = "GitHubBug3642.Foo", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Foo", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE]
+- ModifierList[@EffectiveModifiers = "{abstract, static}", @ExplicitModifiers = "{}"]
+- AnnotationTypeBody[@Empty = false, @Size = 1]

View File

@ -1,7 +1,7 @@
+- CompilationUnit[@PackageName = ""]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Bug1333", @CanonicalName = "Bug1333", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Bug1333", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE]
+- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 4]
+- ClassBody[@Empty = false, @Size = 4]
+- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE]
| +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"]
| +- ClassType[@FullyQualified = false, @SimpleName = "Logger"]

View File

@ -5,7 +5,7 @@
+- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "rx.Subscriber", @ImportedSimpleName = "Subscriber", @PackageName = "rx", @Static = false]
+- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.sample.test.pmdTest", @CanonicalName = "com.sample.test.pmdTest", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "com.sample.test", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "pmdTest", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Empty = false, @Size = 3]
+- ClassBody[@Empty = false, @Size = 3]
+- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = false, @Visibility = Visibility.V_PRIVATE]
| +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"]
| +- PrimitiveType[@Kind = PrimitiveTypeKind.BOOLEAN]

Some files were not shown because too many files have changed in this diff Show More