From 53246d584ecf3cf59b1916514984065511a37d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 12 Apr 2024 20:21:32 -0300 Subject: [PATCH 01/56] Support sequences in XPath Attributes --- .../pmd/lang/rule/xpath/impl/AttributeAxisIterator.java | 4 +++- .../pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java index 46b0dd9f45..83ed8c471f 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java @@ -14,6 +14,7 @@ import java.lang.invoke.MethodType; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.Arrays; +import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Set; @@ -119,7 +120,8 @@ public class AttributeAxisIterator implements Iterator { private boolean isConsideredReturnType(Method method) { Class klass = method.getReturnType(); - return CONSIDERED_RETURN_TYPES.contains(klass) || klass.isEnum(); + return CONSIDERED_RETURN_TYPES.contains(klass) || klass.isEnum() + || Collection.class.isAssignableFrom(klass); } private boolean isIgnored(Class nodeClass, Method method) { diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java index 448791c574..d854f4e9d6 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java @@ -258,13 +258,13 @@ public class SaxonXPathRuleQuery { return NAME_POOL; } - final class StaticContextWithProperties extends IndependentContext { private final Map> propertiesByName = new HashMap<>(); StaticContextWithProperties(Configuration config) { super(config); + getPackageData().setSchemaAware(true); } public void declareProperty(PropertyDescriptor prop) { From a01481a4f33273a992fcd5a1e7d80c2ebc4c3d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Thu, 18 Apr 2024 23:29:37 -0300 Subject: [PATCH 02/56] Add test for collection attributes --- .../java/net/sourceforge/pmd/lang/ast/DummyNode.java | 6 ++++++ .../rule/xpath/internal/SaxonXPathRuleQueryTest.java | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/lang/ast/DummyNode.java b/pmd-core/src/test/java/net/sourceforge/pmd/lang/ast/DummyNode.java index a67ac6f386..eb4d5b5c96 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/lang/ast/DummyNode.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/lang/ast/DummyNode.java @@ -5,6 +5,7 @@ package net.sourceforge.pmd.lang.ast; import java.util.ArrayList; +import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -125,6 +126,11 @@ public class DummyNode extends AbstractNode { return attributes.iterator(); } + // phony attribute that repeats the image 3 times + public List getLines() { + return Arrays.asList(getImage(), getImage(), getImage()); + } + public static class DummyRootNode extends DummyNode implements RootNode, GenericNode { // FIXME remove this diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQueryTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQueryTest.java index 42829bbe48..6e91ae77eb 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQueryTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQueryTest.java @@ -134,6 +134,15 @@ class SaxonXPathRuleQueryTest { assertQuery(0, "(/)[self::document-node(element(DummyNodeX))]", dummy); } + @Test + void testListAttributes() { + DummyRootNode dummy = helper.parse("(a(b))"); + List result = assertQuery(1, + "//dummyNode[count(distinct-values(@Lines)) > 0 and not(empty(index-of(@Lines, 'a')))]", dummy); + + assertEquals(dummy.getChild(0), result.get(0)); + } + @Test void ruleChainVisits() { SaxonXPathRuleQuery query = createQuery("//dummyNode[@Image='baz']/foo | //bar[@Public = 'true'] | //dummyNode[@Public = false()] | //dummyNode"); From f307e6e6cb0544a5a8a20b427f946df23bd9a581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Thu, 18 Apr 2024 23:49:35 -0300 Subject: [PATCH 03/56] Update changelog --- docs/pages/release_notes.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index befb4c1200..ab2d0ab991 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -14,6 +14,16 @@ This is a {{ site.pmd.release_type }} release. ### 🚀 New and noteworthy +#### Collections exposed as XPath attributes + +Up to now, all AST node getters would be exposed to XPath, as long as the return type was a primitive (boxed or unboxed), String or Enum. That meant that collections, even of these basic types, were not exposed, so for instance accessing Apex's `ASTUserClass.getInterfaceNames()` to list the interfaces implemented by a class was impossible from XPath, and would require writing a Java rule to check it. + +Since this release, PMD will also expose any getter returning a collection of any supported type as a sequence through an XPath attribute. They would require to use apropriate XQuery functions to manipulate the sequence. So for instance, to detect any given `ASTUserClass` that implements `Queueable`, it is now possible to write: + +```xml +/UserClass[not(empty(index-of(@InterfaceNames, 'Queueable')))] +``` + ### ✨ New rules - The new Java rule {%rule java/bestpractices/UnnecessaryVarargsArrayCreation %} reports explicit array creation From 8db0c80f24c3b1cefd1a146a143ec5fd76df19a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 00:14:11 -0300 Subject: [PATCH 04/56] Restrict exposed attributes based on element types --- .../xpath/impl/AttributeAxisIterator.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java index 83ed8c471f..4337f25a13 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java @@ -13,6 +13,8 @@ import java.lang.invoke.MethodHandles.Lookup; import java.lang.invoke.MethodType; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; @@ -120,8 +122,23 @@ public class AttributeAxisIterator implements Iterator { private boolean isConsideredReturnType(Method method) { Class klass = method.getReturnType(); - return CONSIDERED_RETURN_TYPES.contains(klass) || klass.isEnum() - || Collection.class.isAssignableFrom(klass); + if (CONSIDERED_RETURN_TYPES.contains(klass) || klass.isEnum()) { + return true; + } + + if (Collection.class.isAssignableFrom(klass)) { + Type t = method.getGenericReturnType(); + if (t instanceof ParameterizedType) { + try { + Class elementKlass = Class.forName(((ParameterizedType) t).getActualTypeArguments()[0].getTypeName()); + return CONSIDERED_RETURN_TYPES.contains(elementKlass) || elementKlass.isEnum(); + } catch (ClassNotFoundException ignored) { + // should never happen + } + } + } + + return false; } private boolean isIgnored(Class nodeClass, Method method) { From ce5e229c61f13e12337c7c4521847f22a4551c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 00:28:28 -0300 Subject: [PATCH 05/56] Produce deprecation warnings when atomize is used - When Saxon determines that it needs to atomize an attribute rather than getStringValue() we were not producing deprecation warnings. --- .../pmd/lang/rule/xpath/internal/AstAttributeNode.java | 1 + 1 file changed, 1 insertion(+) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java index 9cbb199a62..4b6f7f077f 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java @@ -68,6 +68,7 @@ class AstAttributeNode extends BaseNodeInfo implements SiblingCountingNode { @Override public AtomicSequence atomize() { + getTreeInfo().getLogger().recordUsageOf(attribute); if (value == null) { value = DomainConversion.convert(attribute.getValue()); } From 8d51a2f2a034d7eec4db4cf8855187b95c969c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 00:31:37 -0300 Subject: [PATCH 06/56] Just do it once per attribute --- .../pmd/lang/rule/xpath/internal/AstAttributeNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java index 4b6f7f077f..7bddc4f9ea 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java @@ -68,8 +68,8 @@ class AstAttributeNode extends BaseNodeInfo implements SiblingCountingNode { @Override public AtomicSequence atomize() { - getTreeInfo().getLogger().recordUsageOf(attribute); if (value == null) { + getTreeInfo().getLogger().recordUsageOf(attribute); value = DomainConversion.convert(attribute.getValue()); } return value; From b74b6e5a666375e16920e3bafb59783d7c662272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 00:46:58 -0300 Subject: [PATCH 07/56] Revert. Different rules on the same node report separately --- .../pmd/lang/rule/xpath/internal/AstAttributeNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java index 7bddc4f9ea..4b6f7f077f 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java @@ -68,8 +68,8 @@ class AstAttributeNode extends BaseNodeInfo implements SiblingCountingNode { @Override public AtomicSequence atomize() { + getTreeInfo().getLogger().recordUsageOf(attribute); if (value == null) { - getTreeInfo().getLogger().recordUsageOf(attribute); value = DomainConversion.convert(attribute.getValue()); } return value; From 0d6f196c6dbeca13b22d844cb978e658253f8f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 01:13:21 -0300 Subject: [PATCH 08/56] Fix broken tests --- .../rule/xpath/impl/AttributeAxisIteratorTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIteratorTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIteratorTest.java index 906b0128de..e674bbe56c 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIteratorTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIteratorTest.java @@ -41,7 +41,9 @@ class AttributeAxisIteratorTest { AttributeAxisIterator it = new AttributeAxisIterator(dummyNode); - assertEquals(DEFAULT_ATTRS, toMap(it).keySet()); + Set expected = CollectionUtil.setUnion(DEFAULT_ATTRS, "Lines"); + + assertEquals(expected, toMap(it).keySet()); } @Test @@ -50,7 +52,7 @@ class AttributeAxisIteratorTest { AttributeAxisIterator it = new AttributeAxisIterator(dummyNode); - Set expected = CollectionUtil.setUnion(DEFAULT_ATTRS, "Enum"); + Set expected = CollectionUtil.setUnion(DEFAULT_ATTRS, "Enum", "Lines"); assertEquals(expected, toMap(it).keySet()); } @@ -62,7 +64,9 @@ class AttributeAxisIteratorTest { AttributeAxisIterator it = new AttributeAxisIterator(dummyNode); - assertEquals(DEFAULT_ATTRS, toMap(it).keySet()); + Set expected = CollectionUtil.setUnion(DEFAULT_ATTRS, "List", "Lines"); + + assertEquals(expected, toMap(it).keySet()); } /** From 3a4abd720e6f4a18972e14abce61e138c822aa5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 01:13:37 -0300 Subject: [PATCH 09/56] Schema awareness changes the produced queries --- .../internal/SaxonXPathRuleQueryTest.java | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQueryTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQueryTest.java index 6e91ae77eb..a53ffe4b91 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQueryTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQueryTest.java @@ -152,11 +152,11 @@ class SaxonXPathRuleQueryTest { assertTrue(ruleChainVisits.contains("bar")); assertEquals(3, query.nodeNameToXPaths.size()); - assertExpression("(self::node()[(string(data(@Image))) eq baz])/child::element(foo)", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); - assertExpression("self::node()[(boolean(data(@Public))) eq false]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(1)); + assertExpression("(self::node()[(data(attribute::attribute(Image))) = baz])/child::element(foo)", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); + assertExpression("self::node()[(data(attribute::attribute(Public))) = false]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(1)); assertExpression("self::node()", query.getExpressionsForLocalNameOrDefault("dummyNode").get(2)); - assertExpression("self::node()[(string(data(@Public))) eq true]", query.getExpressionsForLocalNameOrDefault("bar").get(0)); - assertExpression("(((docOrder((((/)/descendant::element(dummyNode))[(string(data(@Image))) eq baz])/child::element(foo))) | (((/)/descendant::element(bar))[(string(data(@Public))) eq true])) | (((/)/descendant::element(dummyNode))[(boolean(data(@Public))) eq false])) | ((/)/descendant::element(dummyNode))", query.getFallbackExpr()); + assertExpression("self::node()[(data(attribute::attribute(Public))) = true]", query.getExpressionsForLocalNameOrDefault("bar").get(0)); + assertExpression("(((docOrder((((/)/descendant::element(dummyNode))[(data(attribute::attribute(Image))) = baz])/child::element(foo))) | (((/)/descendant::element(bar))[(data(attribute::attribute(Public))) = true])) | (((/)/descendant::element(dummyNode))[(data(attribute::attribute(Public))) = false])) | ((/)/descendant::element(dummyNode))", query.getFallbackExpr()); } @Test @@ -166,8 +166,8 @@ class SaxonXPathRuleQueryTest { assertEquals(1, ruleChainVisits.size()); assertTrue(ruleChainVisits.contains("dummyNode")); assertEquals(2, query.nodeNameToXPaths.size()); - assertExpression("(self::node()[(boolean(data(@Test1))) eq false])[(boolean(data(@Test2))) eq true]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); - assertExpression("(((/)/descendant::element(dummyNode))[(boolean(data(@Test1))) eq false])[(boolean(data(@Test2))) eq true]", query.getFallbackExpr()); + assertExpression("(self::node()[(data(attribute::attribute(Test1))) = false])[(data(attribute::attribute(Test2))) = true]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); + assertExpression("(((/)/descendant::element(dummyNode))[(data(attribute::attribute(Test1))) = false])[(data(attribute::attribute(Test2))) = true]", query.getFallbackExpr()); } @Test @@ -177,8 +177,8 @@ class SaxonXPathRuleQueryTest { assertEquals(1, ruleChainVisits.size()); assertTrue(ruleChainVisits.contains("dummyNode")); assertEquals(2, query.nodeNameToXPaths.size()); - assertExpression("self::node()[Q{http://pmd.sourceforge.net/pmd-dummy}imageIs(exactly-one(convertTo_xs:string(data(@Image))))]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); - assertExpression("((/)/descendant::element(Q{}dummyNode))[Q{http://pmd.sourceforge.net/pmd-dummy}imageIs(exactly-one(convertTo_xs:string(data(@Image))))]", query.getFallbackExpr()); + assertExpression("self::node()[Q{http://pmd.sourceforge.net/pmd-dummy}imageIs(exactly-one(convertTo_xs:string(data(attribute::attribute(Image)))))]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); + assertExpression("((/)/descendant::element(Q{}dummyNode))[Q{http://pmd.sourceforge.net/pmd-dummy}imageIs(exactly-one(convertTo_xs:string(data(attribute::attribute(Image)))))]", query.getFallbackExpr()); } /** @@ -215,8 +215,8 @@ class SaxonXPathRuleQueryTest { assertEquals(1, ruleChainVisits.size()); assertTrue(ruleChainVisits.contains("dummyNode")); assertEquals(2, query.nodeNameToXPaths.size()); - assertExpression("(((self::node()/child::element(foo))/child::element())/child::element(bar))[(string(data(@Test))) eq false]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); - assertExpression("docOrder(((docOrder((((/)/descendant::element(dummyNode))/child::element(foo))/child::element()))/child::element(bar))[(string(data(@Test))) eq false])", query.getFallbackExpr()); + assertExpression("(((self::node()/child::element(foo))/child::element())/child::element(bar))[(data(attribute::attribute(Test))) = false]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); + assertExpression("docOrder(((docOrder((((/)/descendant::element(dummyNode))/child::element(foo))/child::element()))/child::element(bar))[(data(attribute::attribute(Test))) = false])", query.getFallbackExpr()); } @Test @@ -226,8 +226,8 @@ class SaxonXPathRuleQueryTest { assertEquals(1, ruleChainVisits.size()); assertTrue(ruleChainVisits.contains("dummyNode")); assertEquals(2, query.nodeNameToXPaths.size()); - assertExpression("((((self::node()/child::element(foo))[(string(data(@Baz))) eq a])/child::element())/child::element(bar))[(string(data(@Test))) eq false]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); - assertExpression("docOrder(((docOrder(((((/)/descendant::element(dummyNode))/child::element(foo))[(string(data(@Baz))) eq a])/child::element()))/child::element(bar))[(string(data(@Test))) eq false])", query.getFallbackExpr()); + assertExpression("((((self::node()/child::element(foo))[(data(attribute::attribute(Baz))) = a])/child::element())/child::element(bar))[(data(attribute::attribute(Test))) = false]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); + assertExpression("docOrder(((docOrder(((((/)/descendant::element(dummyNode))/child::element(foo))[(data(attribute::attribute(Baz))) = a])/child::element()))/child::element(bar))[(data(attribute::attribute(Test))) = false])", query.getFallbackExpr()); } @Test @@ -249,7 +249,7 @@ class SaxonXPathRuleQueryTest { assertEquals(followPath(tree, "10"), results.get(0)); }); - assertExpression("docOrder((((/)/descendant::(element(dummyNode) | element(dummyNodeB)))/child::element(dummyNode))[(string(data(@Image))) eq 10])", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); + assertExpression("docOrder((((/)/descendant::(element(dummyNode) | element(dummyNodeB)))/child::element(dummyNode))[(data(attribute::attribute(Image))) = 10])", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); } @Test @@ -266,7 +266,7 @@ class SaxonXPathRuleQueryTest { )); assertEquals(0, query.getRuleChainVisits().size()); - assertExpression("docOrder((((((/)/descendant::element(dummyNode))[(string(data(@Image))) eq 0]) | (((/)/descendant::element(dummyNodeB))[(string(data(@Image))) eq 1]))/child::element(dummyNode))[(string(data(@Image))) eq 10])", query.getFallbackExpr()); + assertExpression("docOrder((((((/)/descendant::element(dummyNode))[(data(attribute::attribute(Image))) = 0]) | (((/)/descendant::element(dummyNodeB))[(data(attribute::attribute(Image))) = 1]))/child::element(dummyNode))[(data(attribute::attribute(Image))) = 10])", query.getFallbackExpr()); tree.descendantsOrSelf().forEach(n -> { List results = query.evaluate(n); @@ -308,8 +308,8 @@ class SaxonXPathRuleQueryTest { assertEquals(1, ruleChainVisits.size()); assertTrue(ruleChainVisits.contains("dummyNode")); assertEquals(2, query.nodeNameToXPaths.size()); - assertExpression("self::node()[matches(convertTo_xs:string(data(@SimpleName)), a, )]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); - assertExpression("((/)/descendant::element(Q{}dummyNode))[matches(convertTo_xs:string(data(@SimpleName)), a, )]", query.getFallbackExpr()); + assertExpression("self::node()[matches(zero-or-one(convertTo_xs:string(data(attribute::attribute(SimpleName)))), a, )]", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); + assertExpression("((/)/descendant::element(Q{}dummyNode))[matches(zero-or-one(convertTo_xs:string(data(attribute::attribute(SimpleName)))), a, )]", query.getFallbackExpr()); } @Test @@ -320,8 +320,8 @@ class SaxonXPathRuleQueryTest { assertEquals(1, ruleChainVisits.size()); assertTrue(ruleChainVisits.contains("dummyNode")); assertEquals(2, query.nodeNameToXPaths.size()); - assertExpression("(self::node()[matches(convertTo_xs:string(data(@SimpleName)), a, )])/child::element(Q{}foo)", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); - assertExpression("docOrder((((/)/descendant::element(Q{}dummyNode))[matches(convertTo_xs:string(data(@SimpleName)), a, )])/child::element(Q{}foo))", query.getFallbackExpr()); + assertExpression("(self::node()[matches(zero-or-one(convertTo_xs:string(data(attribute::attribute(SimpleName)))), a, )])/child::element(Q{}foo)", query.getExpressionsForLocalNameOrDefault("dummyNode").get(0)); + assertExpression("docOrder((((/)/descendant::element(Q{}dummyNode))[matches(zero-or-one(convertTo_xs:string(data(attribute::attribute(SimpleName)))), a, )])/child::element(Q{}foo))", query.getFallbackExpr()); } @Test @@ -331,7 +331,7 @@ class SaxonXPathRuleQueryTest { assertEquals(1, ruleChainVisits.size()); assertTrue(ruleChainVisits.contains("dummyNode")); assertEquals(2, query.nodeNameToXPaths.size()); - assertExpression("let $v0 := imageIs(bar) return ((self::node()[ends-with(convertTo_xs:string(data(@Image)), foo)])[$v0])", query.nodeNameToXPaths.get("dummyNode").get(0)); + assertExpression("let $v0 := imageIs(bar) return ((self::node()[ends-with(zero-or-one(convertTo_xs:string(data(attribute::attribute(Image)))), foo)])[$v0])", query.nodeNameToXPaths.get("dummyNode").get(0)); } @Test @@ -373,7 +373,7 @@ class SaxonXPathRuleQueryTest { assertTrue(ruleChainVisits.contains("WhileStatement")); assertTrue(ruleChainVisits.contains("DoStatement")); - final String expectedSubexpression = "(self::node()/descendant::element(dummyNode))[imageIs(exactly-one(convertTo_xs:string(data(@Image))))]"; + final String expectedSubexpression = "(self::node()/descendant::element(dummyNode))[imageIs(exactly-one(convertTo_xs:string(data(attribute::attribute(Image)))))]"; assertExpression(expectedSubexpression, query.nodeNameToXPaths.get("ForStatement").get(0)); assertExpression(expectedSubexpression, query.nodeNameToXPaths.get("WhileStatement").get(0)); assertExpression(expectedSubexpression, query.nodeNameToXPaths.get("DoStatement").get(0)); From 02e7a713fa2f76f71ccb5a783a112c4bf37d3aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 01:17:28 -0300 Subject: [PATCH 10/56] Update Apex tree dumps with the new attributes --- .../pmd/lang/apex/ast/InnerClassLocations.txt | 14 ++++---- .../lang/apex/ast/NullCoalescingOperator.txt | 2 +- .../lang/apex/ast/SafeNavigationOperator.txt | 32 +++++++++---------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt index 23e291e650..d75cb639d9 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt @@ -1,29 +1,29 @@ +- ApexFile[@DefiningType = "InnerClassLocations", @RealLoc = true] - +- UserClass[@DefiningType = "InnerClassLocations", @Image = "InnerClassLocations", @RealLoc = true, @SimpleName = "InnerClassLocations", @SuperClassName = ""] + +- UserClass[@DefiningType = "InnerClassLocations", @Image = "InnerClassLocations", @InterfaceNames = null, @RealLoc = true, @SimpleName = "InnerClassLocations", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] - +- UserClass[@DefiningType = "InnerClassLocations.bar1", @Image = "bar1", @RealLoc = true, @SimpleName = "bar1", @SuperClassName = ""] + +- UserClass[@DefiningType = "InnerClassLocations.bar1", @Image = "bar1", @InterfaceNames = null, @RealLoc = true, @SimpleName = "bar1", @SuperClassName = ""] | +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar1", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- Method[@Arity = 0, @CanonicalName = "m", @Constructor = false, @DefiningType = "InnerClassLocations.bar1", @Image = "m", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] | +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar1", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- BlockStatement[@CurlyBrace = true, @DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar1", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar1", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar1", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar1", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] - +- UserClass[@DefiningType = "InnerClassLocations.bar2", @Image = "bar2", @RealLoc = true, @SimpleName = "bar2", @SuperClassName = ""] + +- UserClass[@DefiningType = "InnerClassLocations.bar2", @Image = "bar2", @InterfaceNames = null, @RealLoc = true, @SimpleName = "bar2", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar2", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Method[@Arity = 0, @CanonicalName = "m", @Constructor = false, @DefiningType = "InnerClassLocations.bar2", @Image = "m", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar2", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- BlockStatement[@CurlyBrace = true, @DefiningType = "InnerClassLocations.bar2", @RealLoc = true] +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar2", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar2", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar2", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar2", @RealLoc = true] +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar2", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar2", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt index 0714250b3b..c064bf5032 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt @@ -1,5 +1,5 @@ +- ApexFile[@DefiningType = "NullCoalescingOperator", @RealLoc = true] - +- UserClass[@DefiningType = "NullCoalescingOperator", @Image = "NullCoalescingOperator", @RealLoc = true, @SimpleName = "NullCoalescingOperator", @SuperClassName = ""] + +- UserClass[@DefiningType = "NullCoalescingOperator", @Image = "NullCoalescingOperator", @InterfaceNames = null, @RealLoc = true, @SimpleName = "NullCoalescingOperator", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "NullCoalescingOperator", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Method[@Arity = 2, @CanonicalName = "leftOrRight", @Constructor = false, @DefiningType = "NullCoalescingOperator", @Image = "leftOrRight", @RealLoc = true, @ReturnType = "String", @StaticInitializer = false] +- ModifierNode[@Abstract = false, @DefiningType = "NullCoalescingOperator", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt index 1ab6ad30a7..a31ee20f8e 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt @@ -1,26 +1,26 @@ +- ApexFile[@DefiningType = "Foo", @RealLoc = true] - +- UserClass[@DefiningType = "Foo", @Image = "Foo", @RealLoc = true, @SimpleName = "Foo", @SuperClassName = ""] + +- UserClass[@DefiningType = "Foo", @Image = "Foo", @InterfaceNames = null, @RealLoc = true, @SimpleName = "Foo", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Field[@DefiningType = "Foo", @Image = "x", @Name = "x", @RealLoc = true, @Type = "Integer", @Value = null] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Field[@DefiningType = "Foo", @Image = "profileUrl", @Name = "profileUrl", @RealLoc = true, @Type = "String", @Value = null] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] - +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeName = "Integer"] + +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeArguments = null, @TypeName = "Integer"] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- FieldDeclaration[@DefiningType = "Foo", @Image = "x", @Name = "x", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "anIntegerField", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "anObject", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "x", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] - +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeName = "String"] + +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeArguments = null, @TypeName = "String"] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- FieldDeclaration[@DefiningType = "Foo", @Image = "profileUrl", @Name = "profileUrl", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "toExternalForm", @InputParametersSize = 0, @MethodName = "toExternalForm", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "user.getProfileUrl", @InputParametersSize = 0, @MethodName = "getProfileUrl", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "user", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "user", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "profileUrl", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- Method[@Arity = 1, @CanonicalName = "bar1", @Constructor = false, @DefiningType = "Foo", @Image = "bar1", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] @@ -30,15 +30,15 @@ | +- BlockStatement[@CurlyBrace = true, @DefiningType = "Foo", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "b", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "c1", @InputParametersSize = 0, @MethodName = "c1", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | +- CastExpression[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "b1", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "a1", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- Method[@Arity = 2, @CanonicalName = "bar2", @Constructor = false, @DefiningType = "Foo", @Image = "bar2", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] @@ -50,9 +50,9 @@ | +- BlockStatement[@CurlyBrace = true, @DefiningType = "Foo", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "aField", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] | | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "aMethod", @InputParametersSize = 0, @MethodName = "aMethod", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | | +- ArrayLoadExpression[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] @@ -60,9 +60,9 @@ | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "aField", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "aMethod", @InputParametersSize = 0, @MethodName = "aMethod", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- ArrayLoadExpression[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] @@ -77,14 +77,14 @@ | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- VariableDeclaration[@DefiningType = "Foo", @Image = "s", @RealLoc = true, @Type = "String"] | +- VariableExpression[@DefiningType = "Foo", @Image = "BillingCity", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "Account", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "contact", @RealLoc = true, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "contact", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "s", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- ReturnStatement[@DefiningType = "Foo", @RealLoc = true] +- VariableExpression[@DefiningType = "Foo", @Image = "Name", @RealLoc = true] - +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] +- SoqlExpression[@CanonicalQuery = "SELECT Name FROM Account WHERE Id = :tmpVar1", @DefiningType = "Foo", @Query = "SELECT Name FROM Account WHERE Id = :accId", @RealLoc = true] +- BindExpressions[@DefiningType = "Foo", @RealLoc = true] +- VariableExpression[@DefiningType = "Foo", @Image = "accId", @RealLoc = true] From d7693369ab3eb69833e64d739425ed0de947cb80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 01:51:21 -0300 Subject: [PATCH 11/56] Have the NodePrinter show collections as sequences --- .../kotlin/net/sourceforge/pmd/lang/test/ast/NodePrinters.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/test/ast/NodePrinters.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/test/ast/NodePrinters.kt index 4d7d47fec7..608f742b21 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/test/ast/NodePrinters.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/test/ast/NodePrinters.kt @@ -93,6 +93,9 @@ open class BaseNodeAttributePrinter : TextTreeRenderer(true, -1) { is Enum<*> -> value.enumDeclaringClass.simpleName + "." + value.name is Class<*> -> value.canonicalName?.let { "$it.class" } is Number, is Boolean -> value.toString() + is Collection<*> -> value.joinToString(prefix = "(", postfix = ")", separator = ", ") { + "${valueToString(it)}" + } null -> "null" else -> null } From d9e146da7eb50f84db75379d20bd2b1a6f67beac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 01:51:42 -0300 Subject: [PATCH 12/56] Update Java parser test to show modifiers properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - no longer need to manually add the attributes… - …but the format is slightly different --- .../pmd/lang/java/JavaAttributesPrinter.java | 13 - .../sourceforge/pmd/lang/java/ast/Bug1429.txt | 16 +- .../sourceforge/pmd/lang/java/ast/Bug1530.txt | 4 +- .../pmd/lang/java/ast/EmptyStmts1.txt | 2 +- .../pmd/lang/java/ast/EmptyStmts2.txt | 2 +- .../pmd/lang/java/ast/EmptyStmts3.txt | 4 +- .../lang/java/ast/GitHubBug1780OuterClass.txt | 18 +- .../pmd/lang/java/ast/GitHubBug207.txt | 6 +- .../pmd/lang/java/ast/GitHubBug208.txt | 8 +- .../pmd/lang/java/ast/GitHubBug309.txt | 10 +- .../pmd/lang/java/ast/GitHubBug3642.txt | 6 +- .../pmd/lang/java/ast/LambdaBug1333.txt | 16 +- .../pmd/lang/java/ast/LambdaBug1470.txt | 18 +- .../pmd/lang/java/ast/LambdaBug206.txt | 4 +- .../pmd/lang/java/ast/ParserCornerCases.txt | 146 +++++------ .../pmd/lang/java/ast/ParserCornerCases17.txt | 112 ++++---- .../pmd/lang/java/ast/ParserCornerCases18.txt | 242 +++++++++--------- .../pmd/lang/java/ast/SwitchStatements.txt | 6 +- .../lang/java/ast/SwitchWithFallthrough.txt | 6 +- .../pmd/lang/java/ast/SynchronizedStmts.txt | 4 +- 20 files changed, 315 insertions(+), 328 deletions(-) diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/JavaAttributesPrinter.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/JavaAttributesPrinter.java index 8a7466118b..9353eb5336 100644 --- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/JavaAttributesPrinter.java +++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/JavaAttributesPrinter.java @@ -27,15 +27,6 @@ import net.sourceforge.pmd.lang.test.ast.RelevantAttributePrinter; */ public class JavaAttributesPrinter extends RelevantAttributePrinter { - @Override - protected void fillAttributes(@NonNull Node node, @NonNull List result) { - super.fillAttributes(node, result); - if (node instanceof ASTModifierList) { - result.add(getModifierAttr("EffectiveModifiers", ((ASTModifierList) node).getEffectiveModifiers())); - result.add(getModifierAttr("ExplicitModifiers", ((ASTModifierList) node).getExplicitModifiers())); - } - } - @Override protected boolean ignoreAttribute(@NonNull Node node, @NonNull Attribute attribute) { return super.ignoreAttribute(node, attribute) @@ -53,8 +44,4 @@ public class JavaAttributesPrinter extends RelevantAttributePrinter { // for some reason Boolean::new is called somewhere in the reflection layer return o instanceof Boolean && (Boolean) o; } - - private AttributeInfo getModifierAttr(String name, Set mods) { - return new AttributeInfo(name, mods.stream().map(JModifier::getToken).collect(Collectors.joining(", ", "{", "}"))); - } } diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt index 01258c40d0..608f1370dd 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt @@ -1,9 +1,9 @@ +- 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}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "getAttributeTuples", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassType[@FullyQualified = false, @SimpleName = "Set"] | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -40,21 +40,21 @@ +- ClassType[@FullyQualified = false, @SimpleName = "Transformer"] +- 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 = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "transform", @Overridden = true, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- Annotation[@SimpleName = "Override"] | +- ClassType[@FullyQualified = false, @SimpleName = "Override"] +- ClassType[@FullyQualified = false, @SimpleName = "Object"] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 5, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "key"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "key", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -62,7 +62,7 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "value"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "value", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -73,7 +73,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "key", @Name = "key", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "result"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1530.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1530.txt index a885099348..44e828f3a0 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1530.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1530.txt @@ -1,9 +1,9 @@ +- 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}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "incChild", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts1.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts1.txt index be73ae62df..1b135c3e52 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts1.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts1.txt @@ -3,5 +3,5 @@ +- EmptyDeclaration[] +- 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}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = true, @Size = 0] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts2.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts2.txt index 1285668cf4..69a2eca9a9 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts2.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts2.txt @@ -1,6 +1,6 @@ +- CompilationUnit[@PackageName = "c"] +- PackageDeclaration[@Name = "c"] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- EmptyDeclaration[] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "a", @ImportedSimpleName = "a", @PackageName = "", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "b", @ImportedSimpleName = "b", @PackageName = "", @Static = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts3.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts3.txt index eafa99ad6e..039439d9c1 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts3.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/EmptyStmts3.txt @@ -1,9 +1,9 @@ +- CompilationUnit[@PackageName = "c"] +- PackageDeclaration[@Name = "c"] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- 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}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassBody[@Empty = true, @Size = 0] +- EmptyDeclaration[] +- EmptyDeclaration[] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug1780OuterClass.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug1780OuterClass.txt index aff30eada1..142013490b 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug1780OuterClass.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug1780OuterClass.txt @@ -1,11 +1,11 @@ +- CompilationUnit[@PackageName = "com.pmd.test"] +- PackageDeclaration[@Name = "com.pmd.test"] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.pmd.test.GitHubBug1780OuterClass", @CanonicalName = "com.pmd.test.GitHubBug1780OuterClass", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "com.pmd.test", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug1780OuterClass", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 4] +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "GitHubBug1780OuterClass", @Name = "GitHubBug1780OuterClass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] @@ -16,10 +16,10 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Inner Class AdapterClass", @Empty = false, @Image = "\"Inner Class AdapterClass\"", @Length = 24, @LiteralText = "\"Inner Class AdapterClass\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.pmd.test.GitHubBug1780OuterClass$InnerClass", @CanonicalName = "com.pmd.test.GitHubBug1780OuterClass.InnerClass", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "com.pmd.test", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "InnerClass", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "InnerClass", @Name = "InnerClass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] @@ -30,12 +30,12 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Inner Class Constructor", @Empty = false, @Image = "\"Inner Class Constructor\"", @Length = 23, @LiteralText = "\"Inner Class Constructor\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.pmd.test.GitHubBug1780OuterClass$StaticInnerClass", @CanonicalName = "com.pmd.test.GitHubBug1780OuterClass.StaticInnerClass", @EffectiveVisibility = Visibility.V_PRIVATE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "com.pmd.test", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "StaticInnerClass", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static}", @ExplicitModifiers = "{private, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "InnerClass"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Image = "StaticInnerClass", @Name = "StaticInnerClass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = true, @Super = true, @This = false] @@ -51,11 +51,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "StaticInnerClass Constructor", @Empty = false, @Image = "\"StaticInnerClass Constructor\"", @Length = 28, @LiteralText = "\"StaticInnerClass Constructor\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- ArrayDimensions[@Empty = false, @Size = 1] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug207.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug207.txt index 003832ccac..ca175c431d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug207.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug207.txt @@ -1,15 +1,15 @@ +- 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}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "resourceHttpMessageWriter", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] - +- ModifierList[@EffectiveModifiers = "{private, static}", @ExplicitModifiers = "{private, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] +- ClassType[@FullyQualified = false, @SimpleName = "HttpMessageWriter"] | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | +- ClassType[@FullyQualified = false, @SimpleName = "Resource"] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = true, @SimpleName = "Context"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "context", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug208.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug208.txt index 8f6325ca3f..0f682c9800 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug208.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug208.txt @@ -1,22 +1,22 @@ +- 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}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testMethod", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] +- LocalClassStatement[] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug208$1LocalClass", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = false, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "LocalClass", @Static = false, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- Annotation[@SimpleName = "Lazy"] | | +- ClassType[@FullyQualified = false, @SimpleName = "Lazy"] | +- Annotation[@SimpleName = "Configuration"] | +- ClassType[@FullyQualified = false, @SimpleName = "Configuration"] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Name = "foo", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- Annotation[@SimpleName = "Bean"] | +- ClassType[@FullyQualified = false, @SimpleName = "Bean"] +- ClassType[@FullyQualified = false, @SimpleName = "Object"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug309.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug309.txt index 6daf50aaa1..83f0187049 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug309.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug309.txt @@ -1,14 +1,14 @@ +- CompilationUnit[@PackageName = ""] +- 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}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -16,7 +16,7 @@ | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 2, @containsComment = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] | +- VariableDeclarator[@Initializer = true, @Name = "r11"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r11", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -26,7 +26,7 @@ | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassType[@FullyQualified = false, @SimpleName = "IntFunction"] | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | +- ArrayType[@ArrayDepth = 1] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug3642.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug3642.txt index df2fdaa8b0..7dd84d21a6 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug3642.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/GitHubBug3642.txt @@ -1,12 +1,12 @@ +- 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}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- 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 = "{}"] + +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] +- AnnotationTypeBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "v1", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - +- ModifierList[@EffectiveModifiers = "{public, abstract}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] +- ClassType[@FullyQualified = false, @SimpleName = "String"] +- FormalParameters[@Empty = true, @Size = 0] +- ArrayDimensions[@Empty = false, @Size = 1] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1333.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1333.txt index 1a79f6503f..8ed63303b7 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1333.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1333.txt @@ -1,9 +1,9 @@ +- 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}"] + +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] +- 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}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- ClassType[@FullyQualified = false, @SimpleName = "Logger"] | +- VariableDeclarator[@Initializer = true, @Name = "LOG"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "LOG", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] @@ -13,7 +13,7 @@ | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassType[@FullyQualified = false, @SimpleName = "Foo"] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "deleteDirectoriesByNamePattern", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -23,17 +23,17 @@ | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | +- LambdaParameterList[@Empty = false, @Size = 1] | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "path", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | +- MethodCall[@CompileTimeConstant = false, @Image = "deleteDirectory", @MethodName = "deleteDirectory", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "path", @Name = "path", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "delete", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Consumer"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = true, @UpperBound = false] @@ -48,11 +48,11 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "consumer", @Name = "consumer", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "deleteDirectory", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "path", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1470.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1470.txt index 45a2db1cc1..087f538552 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1470.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug1470.txt @@ -1,18 +1,18 @@ +- CompilationUnit[@PackageName = "com.sample.test"] +- PackageDeclaration[@Name = "com.sample.test"] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "rx.Observable", @ImportedSimpleName = "Observable", @PackageName = "rx", @Static = false] +- 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}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 3] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = false, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.BOOLEAN] | +- VariableDeclarator[@Initializer = false, @Name = "stuff"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "stuff", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testSuper", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "Observable"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Boolean"] @@ -27,7 +27,7 @@ | | +- LambdaExpression[@Arity = 1, @BlockBody = true, @CompileTimeConstant = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Subscriber"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- WildcardType[@LowerBound = true, @UpperBound = false] @@ -42,11 +42,11 @@ | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | +- LambdaParameterList[@Empty = false, @Size = 1] | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "authToken", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | +- BooleanLiteral[@CompileTimeConstant = true, @LiteralText = "false", @ParenthesisDepth = 0, @Parenthesized = false, @True = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testSuper2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassType[@FullyQualified = false, @SimpleName = "Observable"] | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | +- ClassType[@FullyQualified = false, @SimpleName = "Boolean"] @@ -61,7 +61,7 @@ | +- LambdaExpression[@Arity = 1, @BlockBody = true, @CompileTimeConstant = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- LambdaParameterList[@Empty = false, @Size = 1] | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "subscriber", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] @@ -72,6 +72,6 @@ +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] +- LambdaParameterList[@Empty = false, @Size = 1] | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "authToken", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] +- BooleanLiteral[@CompileTimeConstant = true, @LiteralText = "false", @ParenthesisDepth = 0, @Parenthesized = false, @True = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug206.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug206.txt index 8a98bbff93..4d2966d6cd 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug206.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/LambdaBug206.txt @@ -1,9 +1,9 @@ +- CompilationUnit[@PackageName = ""] +- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "Foo", @CanonicalName = "Foo", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Foo", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public, abstract}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = (JModifier.PUBLIC)] +- AnnotationTypeBody[@Empty = false, @Size = 1] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PUBLIC, @Static = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{static, final}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] +- ClassType[@FullyQualified = false, @SimpleName = "ThreadLocal"] | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | +- ClassType[@FullyQualified = false, @SimpleName = "Interner"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt index 9d337871f6..8860f0dbb2 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt @@ -1,41 +1,41 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Superclass", @CanonicalName = "Superclass", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Superclass", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 3] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Superclass", @Name = "Superclass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Superclass", @Name = "Superclass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- TypeParameters[@Empty = false, @Size = 1] | | | +- TypeParameter[@Image = "V", @Name = "V", @TypeBound = false] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Class"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "V"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "clazz", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "doStuff", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Outer", @CanonicalName = "Outer", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Outer", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 2] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Outer", @Name = "Outer", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] @@ -46,10 +46,10 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Outer constructor", @Empty = false, @Image = "\"Outer constructor\"", @Length = 17, @LiteralText = "\"Outer constructor\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Outer$Inner", @CanonicalName = "Outer.Inner", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Inner", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Inner", @Name = "Inner", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] @@ -60,16 +60,16 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Inner constructor", @Empty = false, @Image = "\"Inner constructor\"", @Length = 17, @LiteralText = "\"Inner constructor\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Child", @CanonicalName = "Child", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Child", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Inner"] | | +- ClassType[@FullyQualified = false, @SimpleName = "Outer"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Child", @Name = "Child", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Outer"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] @@ -84,21 +84,21 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Child constructor", @Empty = false, @Image = "\"Child constructor\"", @Length = 17, @LiteralText = "\"Child constructor\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases", @CanonicalName = "ParserCornerCases", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ParserCornerCases", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Superclass"] | +- ClassBody[@Empty = false, @Size = 8] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "ParserCornerCases", @Name = "ParserCornerCases", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "ParserCornerCases", @Name = "ParserCornerCases", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -109,16 +109,16 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | +- ConstructorDeclaration[@Abstract = false, @Arity = 2, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "ParserCornerCases", @Name = "ParserCornerCases", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- TypeParameters[@Empty = false, @Size = 1] | | | +- TypeParameter[@Image = "W", @Name = "W", @TypeBound = false] | | +- FormalParameters[@Empty = false, @Size = 2] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -129,22 +129,22 @@ | | +- ClassLiteral[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "ParserCornerCases", @Name = "ParserCornerCases", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "title", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = false, @This = true] | | +- ArgumentList[@Empty = true, @Size = 0] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testGeneric", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public, strictfp}", @ExplicitModifiers = "{public, strictfp}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STRICTFP), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STRICTFP)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 2, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableDeclarator[@Initializer = true, @Name = "o"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -155,7 +155,7 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "foo", @Empty = false, @Image = "\"foo\"", @Length = 3, @LiteralText = "\"foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "v"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "v", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -166,20 +166,20 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "bar", @Empty = false, @Image = "\"bar\"", @Length = 3, @LiteralText = "\"bar\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "thisGeneric", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- TypeParameters[@Empty = false, @Size = 1] | | | +- TypeParameter[@Image = "X", @Name = "X", @TypeBound = false] | | +- ClassType[@FullyQualified = false, @SimpleName = "X"] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "X"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ReturnStatement[] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "getByteArrayClass", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Class"] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -190,7 +190,7 @@ | | +- ArrayDimensions[@Empty = false, @Size = 1] | | +- ArrayTypeDim[@Varargs = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "bitwiseOperator", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -208,23 +208,23 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "shift ", @Empty = false, @Image = "\"shift \"", @Length = 6, @LiteralText = "\"shift \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PmdTestParent", @CanonicalName = "PmdTestParent", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PmdTestParent", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "PmdTestParent", @Name = "PmdTestParent", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PmdTestChild", @CanonicalName = "PmdTestChild", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PmdTestChild", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "PmdTestParent"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "PmdTestChild", @Name = "PmdTestChild", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] @@ -233,15 +233,15 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | +- ArgumentList[@Empty = true, @Size = 0] | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "PmdTestChild$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 = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "create", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableDeclarator[@Initializer = true, @Name = "memoryMonitor"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "memoryMonitor", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -260,26 +260,26 @@ | +- ReturnStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "memoryMonitor", @Name = "memoryMonitor", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SimpleBean", @CanonicalName = "SimpleBean", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SimpleBean", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = false, @Name = "name"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "name", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SimpleBeanUser", @CanonicalName = "SimpleBeanUser", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SimpleBeanUser", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 2] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "SimpleBeanUser", @Name = "SimpleBeanUser", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "SimpleBean"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "SimpleBeanUser", @Name = "SimpleBeanUser", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = false, @This = true] @@ -288,7 +288,7 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "SimpleBean"] | +- ArgumentList[@Empty = true, @Size = 0] | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "SimpleBeanUser$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 = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- Initializer[@Static = false] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -297,12 +297,12 @@ | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "test", @Empty = false, @Image = "\"test\"", @Length = 4, @LiteralText = "\"test\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SimpleBeanUser2", @CanonicalName = "SimpleBeanUser2", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SimpleBeanUser2", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "SimpleBeanUser"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "SimpleBeanUser2", @Name = "SimpleBeanUser2", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] @@ -311,7 +311,7 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "SimpleBean"] | +- ArgumentList[@Empty = true, @Size = 0] | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "SimpleBeanUser2$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 = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- Initializer[@Static = false] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -320,17 +320,17 @@ | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "test2", @Empty = false, @Image = "\"test2\"", @Length = 5, @LiteralText = "\"test2\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "TestParseAnnototation", @CanonicalName = "TestParseAnnototation", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "TestParseAnnototation", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "parse", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 4, @containsComment = false] | +- ForStatement[] | | +- ForInit[] | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- Annotation[@SimpleName = "SuppressWarnings"] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "SuppressWarnings"] | | | | +- AnnotationMemberList[@Empty = false, @Size = 1] @@ -351,7 +351,7 @@ | +- ForStatement[] | | +- ForInit[] | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- Annotation[@SimpleName = "SuppressWarnings"] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "SuppressWarnings"] | | | | +- AnnotationMemberList[@Empty = false, @Size = 1] @@ -370,7 +370,7 @@ | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "List"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -383,7 +383,7 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- ForeachStatement[] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- Annotation[@SimpleName = "SuppressWarnings"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "SuppressWarnings"] | | | +- AnnotationMemberList[@Empty = false, @Size = 1] @@ -395,26 +395,26 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "l", @Name = "l", @ParenthesisDepth = 0, @Parenthesized = false] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "FooBlock", @CanonicalName = "FooBlock", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "FooBlock", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "MyFoo", @CanonicalName = "MyFoo", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MyFoo", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "MyFoo", @Name = "MyFoo", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "FooBlock"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Foo", @CanonicalName = "Foo", @EffectiveVisibility = Visibility.V_PACKAGE, @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_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "MyFoo"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Foo", @Name = "Foo", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] @@ -423,19 +423,19 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "FooBlock"] | +- ArgumentList[@Empty = true, @Size = 0] | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "Foo$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 = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "valueOf", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "object", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "fish"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "fish", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -443,10 +443,10 @@ | +- ReturnStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "fish", @Name = "fish", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SuperTest", @CanonicalName = "SuperTest", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SuperTest", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "iterator", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "Iterator"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "E"] @@ -467,10 +467,10 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "E"] | | +- ArgumentList[@Empty = true, @Size = 0] | | +- AnonymousClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = true, @BinaryName = "SuperTest$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 = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassBody[@Empty = false, @Size = 4] | | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_ANONYMOUS, @Static = false, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Iterator"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "E"] @@ -481,7 +481,7 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "ImmutableSet"] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "hasNext", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BOOLEAN] | | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -491,7 +491,7 @@ | | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "next", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- ClassType[@FullyQualified = false, @SimpleName = "E"] | | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -501,7 +501,7 @@ | | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_ANONYMOUS, @Final = false, @Name = "remove", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 2, @containsComment = false] @@ -528,15 +528,15 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "UnsupportedOperationException"] | +- ArgumentList[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ClazzPropertyOfPrimitiveTypes", @CanonicalName = "ClazzPropertyOfPrimitiveTypes", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ClazzPropertyOfPrimitiveTypes", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 11, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Class"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- WildcardType[@LowerBound = false, @UpperBound = true] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt index da23efe42b..5f7cfe059b 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt @@ -11,21 +11,21 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Map", @ImportedSimpleName = "Map", @PackageName = "java.util", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.zip.ZipEntry", @ImportedSimpleName = "ZipEntry", @PackageName = "java.util.zip", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases17", @CanonicalName = "ParserCornerCases17", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ParserCornerCases17", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 9] +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "ParserCornerCases17", @Name = "ParserCornerCases17", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "binaryLiterals", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 9, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | +- VariableDeclarator[@Initializer = true, @Name = "aByte"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "aByte", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -33,7 +33,7 @@ | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00100001", @IntLiteral = true, @Integral = true, @LiteralText = "0b00100001", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 33.0, @ValueAsFloat = 33.0, @ValueAsInt = 33, @ValueAsLong = 33] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.SHORT] | | +- VariableDeclarator[@Initializer = true, @Name = "aShort"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "aShort", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -41,31 +41,31 @@ | | +- PrimitiveType[@Kind = PrimitiveTypeKind.SHORT] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b1010000101000101", @IntLiteral = true, @Integral = true, @LiteralText = "0b1010000101000101", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 41285.0, @ValueAsFloat = 41285.0, @ValueAsInt = 41285, @ValueAsLong = 41285] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "anInt1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "anInt1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00000000100000000010100001010001", @IntLiteral = true, @Integral = true, @LiteralText = "0b00000000100000000010100001010001", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8398929.0, @ValueAsFloat = 8398929.0, @ValueAsInt = 8398929, @ValueAsLong = 8398929] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "anInt2"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "anInt2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b101", @IntLiteral = true, @Integral = true, @LiteralText = "0b101", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "anInt3"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "anInt3", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0B101", @IntLiteral = true, @Integral = true, @LiteralText = "0B101", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "aLong"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "aLong", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b0000000000000000000000000000000000000000100010001000010000010000L", @IntLiteral = false, @Integral = true, @LiteralText = "0b0000000000000000000000000000000000000000100010001000010000010000L", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8946704.0, @ValueAsFloat = 8946704.0, @ValueAsInt = 8946704, @ValueAsLong = 8946704] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -82,7 +82,7 @@ | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b01001100", @IntLiteral = true, @Integral = true, @LiteralText = "0b01001100", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 76.0, @ValueAsFloat = 76.0, @ValueAsInt = 76, @ValueAsLong = 76] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b10011000", @IntLiteral = true, @Integral = true, @LiteralText = "0b10011000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 152.0, @ValueAsFloat = 152.0, @ValueAsInt = 152, @ValueAsLong = 152] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "instruction"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "instruction", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -95,7 +95,7 @@ | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00000000", @IntLiteral = true, @Integral = true, @LiteralText = "0b00000000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "register"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "register", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -145,113 +145,113 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "IllegalArgumentException"] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "underscoreInNumericLiterals", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 15, @containsComment = true] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "creditCardNumber"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "creditCardNumber", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1111_2222_3333_4444L", @IntLiteral = false, @Integral = true, @LiteralText = "1111_2222_3333_4444L", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.111222233334444E15, @ValueAsFloat = 1.11122226E15, @ValueAsInt = -1770257748, @ValueAsLong = 1111222233334444] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "socialSecurityNumber"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "socialSecurityNumber", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "999_99_9999L", @IntLiteral = false, @Integral = true, @LiteralText = "999_99_9999L", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 9.99999999E8, @ValueAsFloat = 1.0E9, @ValueAsInt = 999999999, @ValueAsLong = 999999999] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.FLOAT] | | +- VariableDeclarator[@Initializer = true, @Name = "pi"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "pi", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = true, @Image = "3.14_15F", @IntLiteral = false, @Integral = false, @LiteralText = "3.14_15F", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.1415, @ValueAsFloat = 3.1415, @ValueAsInt = 3, @ValueAsLong = 3] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "hexBytes"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "hexBytes", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 16, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0x00_11_22_33", @IntLiteral = true, @Integral = true, @LiteralText = "0x00_11_22_33", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1122867.0, @ValueAsFloat = 1122867.0, @ValueAsInt = 1122867, @ValueAsLong = 1122867] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "hexWords"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "hexWords", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 16, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0x0001_CAFE", @IntLiteral = true, @Integral = true, @LiteralText = "0x0001_CAFE", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 117502.0, @ValueAsFloat = 117502.0, @ValueAsInt = 117502, @ValueAsLong = 117502] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "maxLong"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "maxLong", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 16, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0x7fff_ffff_ffff_ffffL", @IntLiteral = false, @Integral = true, @LiteralText = "0x7fff_ffff_ffff_ffffL", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 9.223372036854776E18, @ValueAsFloat = 9.223372E18, @ValueAsInt = -1, @ValueAsLong = 9223372036854775807] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | +- VariableDeclarator[@Initializer = true, @Name = "nybbles"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "nybbles", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b0010_0101", @IntLiteral = true, @Integral = true, @LiteralText = "0b0010_0101", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 37.0, @ValueAsFloat = 37.0, @ValueAsInt = 37, @ValueAsLong = 37] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableDeclarator[@Initializer = true, @Name = "bytes"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "bytes", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 2, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0b00000000_10001000_10000100_00010000", @IntLiteral = true, @Integral = true, @LiteralText = "0b00000000_10001000_10000100_00010000", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 8946704.0, @ValueAsFloat = 8946704.0, @ValueAsInt = 8946704, @ValueAsLong = 8946704] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "_52"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_52", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "_52", @Name = "_52", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x2"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5_2", @IntLiteral = true, @Integral = true, @LiteralText = "5_2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 52.0, @ValueAsFloat = 52.0, @ValueAsInt = 52, @ValueAsLong = 52] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x4"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x4", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5_______2", @IntLiteral = true, @Integral = true, @LiteralText = "5_______2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 52.0, @ValueAsFloat = 52.0, @ValueAsInt = 52, @ValueAsLong = 52] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x7"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x7", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 16, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0x5_2", @IntLiteral = true, @Integral = true, @LiteralText = "0x5_2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 82.0, @ValueAsFloat = 82.0, @ValueAsInt = 82, @ValueAsLong = 82] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x9"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x9", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 8, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0_52", @IntLiteral = true, @Integral = true, @LiteralText = "0_52", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "x10"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x10", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 8, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "05_2", @IntLiteral = true, @Integral = true, @LiteralText = "05_2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "stringsInSwitchStatements", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 4, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "dayOfWeekArg"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "dayOfWeekArg", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Wednesday", @Empty = false, @Image = "\"Wednesday\"", @Length = 9, @LiteralText = "\"Wednesday\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = false, @Name = "typeOfDay"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "typeOfDay", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -310,27 +310,27 @@ | +- ReturnStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "typeOfDay", @Name = "typeOfDay", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases17$MyClass", @CanonicalName = "ParserCornerCases17.MyClass", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MyClass", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "X", @Name = "X", @TypeBound = false] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "MyClass", @Name = "MyClass", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "typeInferenceForGenericInstanceCreation", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 6, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Map"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 2] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -344,7 +344,7 @@ | | | +- TypeArguments[@Diamond = true, @Empty = true, @Size = 0] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "List"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -360,7 +360,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A", @Empty = false, @Image = "\"A\"", @Length = 1, @LiteralText = "\"A\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "List"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] @@ -377,7 +377,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "list2", @Name = "list2", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "MyClass"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] @@ -389,14 +389,14 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "", @Empty = true, @Image = "\"\"", @Length = 0, @LiteralText = "\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "theTryWithResourcesStatement", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- ThrowsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "IOException"] | +- Block[@Empty = false, @Size = 7, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "path"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "path", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -405,7 +405,7 @@ | | +- ResourceList[@Empty = false, @Size = 1, @TrailingSemiColon = false] | | | +- Resource[@ConciseResource = false, @StableName = "br"] | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "BufferedReader"] | | | +- VariableDeclarator[@Initializer = true, @Name = "br"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "br", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -418,7 +418,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "path", @Name = "path", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "first"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "first", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -426,19 +426,19 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "br", @Name = "br", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "outputFileName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "outputFileName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "/foo-out", @Empty = false, @Image = "\"/foo-out\"", @Length = 8, @LiteralText = "\"/foo-out\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "zipFileName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "zipFileName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "/foo.zip", @Empty = false, @Image = "\"/foo.zip\"", @Length = 8, @LiteralText = "\"/foo.zip\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = true, @SimpleName = "Charset"] | | +- VariableDeclarator[@Initializer = true, @Name = "charset"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "charset", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -448,7 +448,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "US-ASCII", @Empty = false, @Image = "\"US-ASCII\"", @Length = 8, @LiteralText = "\"US-ASCII\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = true, @SimpleName = "Path"] | | +- VariableDeclarator[@Initializer = true, @Name = "outputFilePath"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "outputFilePath", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -461,7 +461,7 @@ | +- ResourceList[@Empty = false, @Size = 2, @TrailingSemiColon = false] | | +- Resource[@ConciseResource = false, @StableName = "zf"] | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = true, @SimpleName = "ZipFile"] | | | +- VariableDeclarator[@Initializer = true, @Name = "zf"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "zf", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -471,7 +471,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zipFileName", @Name = "zipFileName", @ParenthesisDepth = 0, @Parenthesized = false] | | +- Resource[@ConciseResource = false, @StableName = "writer"] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = true, @SimpleName = "BufferedWriter"] | | +- VariableDeclarator[@Initializer = true, @Name = "writer"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "writer", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -485,7 +485,7 @@ | +- ForStatement[] | +- ForInit[] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Enumeration"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] @@ -500,7 +500,7 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "newLine"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "newLine", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -510,7 +510,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "line.separator", @Empty = false, @Image = "\"line.separator\"", @Length = 14, @LiteralText = "\"line.separator\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "zipEntryName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "zipEntryName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -533,7 +533,7 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "zipEntryName", @Name = "zipEntryName", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "catchingMultipleExceptionTypes", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- ThrowsList[@Empty = false, @Size = 2] @@ -556,7 +556,7 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- CatchClause[] | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = true, @Name = "ex", @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- UnionType[] | | | +- ClassType[@FullyQualified = false, @SimpleName = "IOException"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "SQLException"] @@ -569,12 +569,12 @@ | +- ThrowStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "ex", @Name = "ex", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "expressionInCastExpression", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +- VariableDeclarator[@Initializer = true, @Name = "initialSizeGlobal"] +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "initialSizeGlobal", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt index ea7fbaf5dd..5def9e475a 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt @@ -10,22 +10,22 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.function.Supplier", @ImportedSimpleName = "Supplier", @PackageName = "java.util.function", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.stream.Stream", @ImportedSimpleName = "Stream", @PackageName = "java.util.stream", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases18", @CanonicalName = "ParserCornerCases18", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ParserCornerCases18", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassBody[@Empty = false, @Size = 30] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "lambdas", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 24, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "FileFilter"] | | | +- VariableDeclarator[@Initializer = true, @Name = "java"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "java", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "File"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "endsWith", @MethodName = "endsWith", @ParenthesisDepth = 0, @Parenthesized = false] @@ -35,14 +35,14 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ".java", @Empty = false, @Image = "\".java\"", @Length = 5, @LiteralText = "\".java\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "FileFilter"] | | | +- VariableDeclarator[@Initializer = true, @Name = "java2"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "java2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "endsWith", @MethodName = "endsWith", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] @@ -51,14 +51,14 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ".java", @Empty = false, @Image = "\".java\"", @Length = 5, @LiteralText = "\".java\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "FileFilter"] | | | +- VariableDeclarator[@Initializer = true, @Name = "java3"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "java3", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "endsWith", @MethodName = "endsWith", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] @@ -67,14 +67,14 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ".java", @Empty = false, @Image = "\".java\"", @Length = 5, @LiteralText = "\".java\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "FileFilter"] | | | +- VariableDeclarator[@Initializer = true, @Name = "java4"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "java4", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 1, @Parenthesized = true] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "endsWith", @MethodName = "endsWith", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] @@ -96,7 +96,7 @@ | | | +- LambdaExpression[@Arity = 1, @BlockBody = true, @CompileTimeConstant = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ExpressionStatement[] @@ -109,7 +109,7 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ArrayType[@ArrayDepth = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "FileFilter"] | | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -125,7 +125,7 @@ | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "exists", @MethodName = "exists", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] @@ -133,7 +133,7 @@ | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "canRead", @MethodName = "canRead", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] @@ -141,7 +141,7 @@ | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "startsWith", @MethodName = "startsWith", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] @@ -161,7 +161,7 @@ | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "exists", @MethodName = "exists", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] @@ -169,7 +169,7 @@ | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- MethodCall[@CompileTimeConstant = false, @Image = "canRead", @MethodName = "canRead", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] @@ -177,7 +177,7 @@ | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "startsWith", @MethodName = "startsWith", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] @@ -186,7 +186,7 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "q", @Empty = false, @Image = "\"q\"", @Length = 1, @LiteralText = "\"q\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableDeclarator[@Initializer = true, @Name = "user"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "user", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -200,7 +200,7 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "user.name", @Empty = false, @Image = "\"user.name\"", @Length = 9, @LiteralText = "\"user.name\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Callable"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -210,7 +210,7 @@ | | | +- LambdaParameterList[@Empty = true, @Size = 0] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "done", @Empty = false, @Image = "\"done\"", @Length = 4, @LiteralText = "\"done\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] | | | +- VariableDeclarator[@Initializer = true, @Name = "r"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -225,7 +225,7 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "done", @Empty = false, @Image = "\"done\"", @Length = 4, @LiteralText = "\"done\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Supplier"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] @@ -244,7 +244,7 @@ | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "hi", @Empty = false, @Image = "\"hi\"", @Length = 2, @LiteralText = "\"hi\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BOOLEAN] | | | +- VariableDeclarator[@Initializer = true, @Name = "flag"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "flag", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -252,7 +252,7 @@ | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Callable"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] @@ -267,7 +267,7 @@ | | | +- LambdaParameterList[@Empty = true, @Size = 0] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | | +- VariableDeclarator[@Initializer = true, @Name = "o"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -291,7 +291,7 @@ | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Comparator"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -300,10 +300,10 @@ | | | +- LambdaExpression[@Arity = 2, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 2] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "compareToIgnoreCase", @MethodName = "compareToIgnoreCase", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s1", @Name = "s1", @ParenthesisDepth = 0, @Parenthesized = false] @@ -315,17 +315,17 @@ | | | +- LambdaExpression[@Arity = 2, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 2] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "compareToIgnoreCase", @MethodName = "compareToIgnoreCase", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s1", @Name = "s1", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = false, @Size = 1] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s2", @Name = "s2", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Button"] | | | +- VariableDeclarator[@Initializer = true, @Name = "button"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "button", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -339,7 +339,7 @@ | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "e", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "out", @Name = "out", @ParenthesisDepth = 0, @Parenthesized = false] @@ -350,7 +350,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "e", @Name = "e", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "initialSizeGlobal"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "initialSizeGlobal", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -364,7 +364,7 @@ | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "150.0", @IntLiteral = false, @Integral = false, @LiteralText = "150.0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 150.0, @ValueAsFloat = 150.0, @ValueAsInt = 150, @ValueAsLong = 150] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "0.30", @IntLiteral = false, @Integral = false, @LiteralText = "0.30", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.3, @ValueAsFloat = 0.3, @ValueAsInt = 0, @ValueAsLong = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "BiConsumer"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 2] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -374,11 +374,11 @@ | | | +- LambdaExpression[@Arity = 2, @BlockBody = true, @CompileTimeConstant = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 2] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -386,7 +386,7 @@ | | | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "BiConsumer"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 2] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -396,17 +396,17 @@ | | | +- LambdaExpression[@Arity = 2, @BlockBody = true, @CompileTimeConstant = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 2] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ExpressionStatement[] | | | +- UnaryExpression[@CompileTimeConstant = false, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "TriConsumer"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 3] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -417,15 +417,15 @@ | | | +- LambdaExpression[@Arity = 3, @BlockBody = true, @CompileTimeConstant = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 3] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Double"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "d", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -434,7 +434,7 @@ | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "d", @Name = "d", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "TriConsumer"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 3] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -445,13 +445,13 @@ | | +- LambdaExpression[@Arity = 3, @BlockBody = true, @CompileTimeConstant = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LambdaParameterList[@Empty = false, @Size = 3] | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "d", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ExpressionStatement[] @@ -459,7 +459,7 @@ | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "d", @Name = "d", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases18$TriConsumer", @CanonicalName = "ParserCornerCases18.TriConsumer", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "TriConsumer", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, abstract, static}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- Annotation[@SimpleName = "FunctionalInterface"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "FunctionalInterface"] | | +- TypeParameters[@Empty = false, @Size = 3] @@ -468,23 +468,23 @@ | | | +- TypeParameter[@Image = "C", @Name = "C", @TypeBound = false] | | +- ClassBody[@Empty = false, @Size = 1] | | +- MethodDeclaration[@Abstract = true, @Arity = 3, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "accept", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public, abstract}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] | | +- VoidType[] | | +- FormalParameters[@Empty = false, @Size = 3] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "B"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "C"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] | | +- VariableDeclarator[@Initializer = true, @Name = "r1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "r1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] @@ -499,7 +499,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "toDoLater", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -515,11 +515,11 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "later", @Empty = false, @Image = "\"later\"", @Length = 5, @LiteralText = "\"later\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "doPrivileged", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "PrivilegedAction"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -530,11 +530,11 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "action", @Name = "action", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "filterFiles", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | | +- VoidType[] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ArrayType[@ArrayDepth = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "FileFilter"] | | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -542,7 +542,7 @@ | | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "filters", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "comparingByKey", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- TypeParameters[@Empty = false, @Size = 2] | | | +- TypeParameter[@Image = "K", @Name = "K", @TypeBound = true] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Comparable"] @@ -571,10 +571,10 @@ | | +- LambdaExpression[@Arity = 2, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LambdaParameterList[@Empty = false, @Size = 2] | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "c1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "c2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | +- MethodCall[@CompileTimeConstant = false, @Image = "compareTo", @MethodName = "compareTo", @ParenthesisDepth = 0, @Parenthesized = false] | | +- MethodCall[@CompileTimeConstant = false, @Image = "getKey", @MethodName = "getKey", @ParenthesisDepth = 0, @Parenthesized = false] @@ -585,12 +585,12 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c2", @Name = "c2", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "methodReferences", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 8, @containsComment = true] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] | | | +- VariableDeclarator[@Initializer = true, @Name = "r"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -599,14 +599,14 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "ParserCornerCases18"] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] | | | +- VariableDeclarator[@Initializer = true, @Name = "r1"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = false, @MethodName = "toDoLater", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "ParserCornerCases18"] | | | +- VariableDeclarator[@Initializer = true, @Name = "pc"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "pc", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -614,14 +614,14 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "ParserCornerCases18"] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] | | | +- VariableDeclarator[@Initializer = true, @Name = "r11"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r11", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = false, @MethodName = "toDoLater", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "pc", @Name = "pc", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Supplier"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -630,7 +630,7 @@ | | | +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = false, @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- SuperExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] | | | +- VariableDeclarator[@Initializer = true, @Name = "r2"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -638,7 +638,7 @@ | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ClassType[@FullyQualified = false, @SimpleName = "ParserCornerCases18"] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "IntFunction"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ArrayType[@ArrayDepth = 1] @@ -654,7 +654,7 @@ | | | +- ArrayDimensions[@Empty = false, @Size = 1] | | | +- ArrayTypeDim[@Varargs = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -666,10 +666,10 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LiteralText = "10", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases18$PmdMethodReferenceTest", @CanonicalName = "ParserCornerCases18.PmdMethodReferenceTest", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PmdMethodReferenceTest", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- ClassBody[@Empty = false, @Size = 3] | | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Function"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 2] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] @@ -677,7 +677,7 @@ | | | +- VariableDeclarator[@Initializer = false, @Name = "theFunction"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "theFunction", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "PmdTest", @Name = "PmdTest", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | | +- ExpressionStatement[] @@ -686,18 +686,18 @@ | | | +- MethodReference[@CompileTimeConstant = false, @ConstructorReference = false, @MethodName = "foo", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "foo", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ReturnStatement[] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "staticMethod", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- ClassType[@FullyQualified = false, @SimpleName = "Runnable"] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -711,12 +711,12 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "run", @Empty = false, @Image = "\"run\"", @Length = 3, @LiteralText = "\"run\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "typeAnnotations", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 2, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableDeclarator[@Initializer = true, @Name = "myString"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "myString", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -726,7 +726,7 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "NonNull"] | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "str", @Name = "str", @ParenthesisDepth = 0, @Parenthesized = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableDeclarator[@Initializer = true, @Name = "o"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -736,7 +736,7 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "Interned"] | | +- ArgumentList[@Empty = true, @Size = 0] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases18$UnmodifiableList", @CanonicalName = "ParserCornerCases18.UnmodifiableList", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "UnmodifiableList", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- TypeParameters[@Empty = false, @Size = 1] | | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | | +- ImplementsList[@Empty = false, @Size = 1] @@ -749,7 +749,7 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "Readonly"] | | +- ClassBody[@Empty = true, @Size = 0] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "monitorTemperature", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- ThrowsList[@Empty = false, @Size = 1] @@ -758,10 +758,10 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "Critical"] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases18$X", @CanonicalName = "ParserCornerCases18.X", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "X", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- ClassBody[@Empty = false, @Size = 3] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "lambaWithIf", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- VoidType[] | | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -779,14 +779,14 @@ | | | | +- LambdaExpression[@Arity = 2, @BlockBody = true, @CompileTimeConstant = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 2] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- Block[@Empty = false, @Size = 3, @containsComment = false] | | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -812,7 +812,7 @@ | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "lambaWithIf2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- VoidType[] | | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -830,16 +830,16 @@ | | | | +- LambdaExpression[@Arity = 2, @BlockBody = true, @CompileTimeConstant = false, @ExpressionBody = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 2] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] - | | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | | | +- Block[@Empty = false, @Size = 3, @containsComment = false] | | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -865,7 +865,7 @@ | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "lambdaWithPropertyAssignment", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -877,7 +877,7 @@ | | +- LambdaParameterList[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 2, @containsComment = true] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Request"] | | | +- VariableDeclarator[@Initializer = true, @Name = "request"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "request", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -890,7 +890,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "request", @Name = "request", @ParenthesisDepth = 0, @Parenthesized = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testWildCardWithAnnotation", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- ClassType[@FullyQualified = false, @SimpleName = "List"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] @@ -901,7 +901,7 @@ | | +- ReturnStatement[] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "testAnnotationsToArrayElements", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -913,7 +913,7 @@ | | +- ReturnStatement[] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "getBytes", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | | +- ArrayType[@ArrayDepth = 1] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -925,7 +925,7 @@ | | +- ReturnStatement[] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "getEnum", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- TypeParameters[@Empty = false, @Size = 1] | | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = true] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Enum"] @@ -939,7 +939,7 @@ | | +- ReturnStatement[] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "getNullableEnum", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- TypeParameters[@Empty = false, @Size = 1] | | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] @@ -950,7 +950,7 @@ | | +- ReturnStatement[] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "createNonNullArray", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -967,7 +967,7 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "NonNull"] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "check", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- TypeParameters[@Empty = false, @Size = 1] | | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | | +- ArrayType[@ArrayDepth = 2] @@ -977,7 +977,7 @@ | | | +- ArrayTypeDim[@Varargs = false] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ArrayType[@ArrayDepth = 2] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | | | +- ArrayDimensions[@Empty = false, @Size = 2] @@ -1001,7 +1001,7 @@ | | +- ReturnStatement[] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "arr", @Name = "arr", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "func", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- ClassType[@FullyQualified = false, @SimpleName = "Function"] | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- ReceiverParameter[] @@ -1015,11 +1015,11 @@ | | +- Annotation[@SimpleName = "A"] | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "max", @Overridden = false, @Static = true, @Varargs = true, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @Varargs = true, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | | +- ArrayType[@ArrayDepth = 1] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -1031,7 +1031,7 @@ | | +- ReturnStatement[] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "ParserCornerCases18$Anno", @CanonicalName = "ParserCornerCases18.Anno", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Anno", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{abstract, static}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] | | | +- Annotation[@SimpleName = "Retention"] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Retention"] | | | | +- AnnotationMemberList[@Empty = false, @Size = 1] @@ -1046,12 +1046,12 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "TYPE_USE", @Name = "TYPE_USE", @ParenthesisDepth = 0, @Parenthesized = false] | | +- AnnotationTypeBody[@Empty = true, @Size = 0] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "testMultiDimArrayWithAnnotations", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{private, static}", @ExplicitModifiers = "{private, static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -1072,25 +1072,25 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "NonNull"] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "methodWithReceiverParameter", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | | +- ReceiverParameter[] | | | +- ClassType[@FullyQualified = false, @SimpleName = "ParserCornerCases18"] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "methodWithReceiverAndOtherParameters", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- ReceiverParameter[] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "ParserCornerCases18"] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "other", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "methodWithReceiverParameterWithAnnotation", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- ReceiverParameter[] @@ -1098,12 +1098,12 @@ | | | | +- Annotation[@SimpleName = "AnnotatedUsage"] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "AnnotatedUsage"] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "other", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "ParserCornerCases18$AnnotatedUsage", @CanonicalName = "ParserCornerCases18.AnnotatedUsage", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "AnnotatedUsage", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, abstract, static}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- Annotation[@SimpleName = "Target"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Target"] | | | +- AnnotationMemberList[@Empty = false, @Size = 1] @@ -1112,37 +1112,37 @@ | | | +- AmbiguousName[@CompileTimeConstant = false, @Image = "ElementType", @Name = "ElementType", @ParenthesisDepth = 0, @Parenthesized = false] | | +- AnnotationTypeBody[@Empty = true, @Size = 0] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ParserCornerCases18$Inner", @CanonicalName = "ParserCornerCases18.Inner", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Inner", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Inner", @Name = "Inner", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- FormalParameters[@Empty = true, @Size = 0] | | +- ReceiverParameter[] | | +- ClassType[@FullyQualified = false, @SimpleName = "ParserCornerCases18"] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "DefaultIterator", @CanonicalName = "DefaultIterator", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "DefaultIterator", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{abstract}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT), @ExplicitModifiers = ()] +- TypeParameters[@Empty = false, @Size = 1] | +- TypeParameter[@Image = "E", @Name = "E", @TypeBound = false] +- ClassBody[@Empty = false, @Size = 5] +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "hasNext", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public, abstract}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.BOOLEAN] | +- FormalParameters[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "next", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public, abstract}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "E"] | +- FormalParameters[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "remove", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public, abstract}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "skip", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public, default}", @ExplicitModifiers = "{default}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.DEFAULT), @ExplicitModifiers = (JModifier.DEFAULT)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -1161,7 +1161,7 @@ | +- MethodCall[@CompileTimeConstant = false, @Image = "next", @MethodName = "next", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "staticInterfaceMethods", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt index 81526b0f54..1ee0d5297d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt @@ -1,14 +1,14 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SwitchStatements", @CanonicalName = "SwitchStatements", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SwitchStatements", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "myMethod", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 4, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "a"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchWithFallthrough.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchWithFallthrough.txt index 8bbb9b14a6..610f877edb 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchWithFallthrough.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchWithFallthrough.txt @@ -1,14 +1,14 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SwitchWithFallthrough", @CanonicalName = "SwitchWithFallthrough", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SwitchWithFallthrough", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "myMethod", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 2, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "a"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SynchronizedStmts.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SynchronizedStmts.txt index 0c35bbbbb2..557f881ed2 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SynchronizedStmts.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SynchronizedStmts.txt @@ -1,9 +1,9 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Sync", @CanonicalName = "Sync", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Sync", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "getInstance", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] From ca7e15c114f3b4143ad678bdafa9d18c46bb8e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 01:55:54 -0300 Subject: [PATCH 13/56] update output to sequences --- .../pmd/lang/apex/ast/InnerClassLocations.txt | 14 ++++---- .../lang/apex/ast/NullCoalescingOperator.txt | 2 +- .../lang/apex/ast/SafeNavigationOperator.txt | 32 +++++++++---------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt index d75cb639d9..095e8b8803 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt @@ -1,29 +1,29 @@ +- ApexFile[@DefiningType = "InnerClassLocations", @RealLoc = true] - +- UserClass[@DefiningType = "InnerClassLocations", @Image = "InnerClassLocations", @InterfaceNames = null, @RealLoc = true, @SimpleName = "InnerClassLocations", @SuperClassName = ""] + +- UserClass[@DefiningType = "InnerClassLocations", @Image = "InnerClassLocations", @InterfaceNames = (), @RealLoc = true, @SimpleName = "InnerClassLocations", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] - +- UserClass[@DefiningType = "InnerClassLocations.bar1", @Image = "bar1", @InterfaceNames = null, @RealLoc = true, @SimpleName = "bar1", @SuperClassName = ""] + +- UserClass[@DefiningType = "InnerClassLocations.bar1", @Image = "bar1", @InterfaceNames = (), @RealLoc = true, @SimpleName = "bar1", @SuperClassName = ""] | +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar1", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- Method[@Arity = 0, @CanonicalName = "m", @Constructor = false, @DefiningType = "InnerClassLocations.bar1", @Image = "m", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] | +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar1", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- BlockStatement[@CurlyBrace = true, @DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar1", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @Names = ("System", "out"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar1", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar1", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @Names = ("System", "out"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar1", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] - +- UserClass[@DefiningType = "InnerClassLocations.bar2", @Image = "bar2", @InterfaceNames = null, @RealLoc = true, @SimpleName = "bar2", @SuperClassName = ""] + +- UserClass[@DefiningType = "InnerClassLocations.bar2", @Image = "bar2", @InterfaceNames = (), @RealLoc = true, @SimpleName = "bar2", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar2", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Method[@Arity = 0, @CanonicalName = "m", @Constructor = false, @DefiningType = "InnerClassLocations.bar2", @Image = "m", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar2", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- BlockStatement[@CurlyBrace = true, @DefiningType = "InnerClassLocations.bar2", @RealLoc = true] +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar2", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar2", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @Names = ("System", "out"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar2", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar2", @RealLoc = true] +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar2", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @Names = ("System", "out"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar2", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt index c064bf5032..2d0eca99ed 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/NullCoalescingOperator.txt @@ -1,5 +1,5 @@ +- ApexFile[@DefiningType = "NullCoalescingOperator", @RealLoc = true] - +- UserClass[@DefiningType = "NullCoalescingOperator", @Image = "NullCoalescingOperator", @InterfaceNames = null, @RealLoc = true, @SimpleName = "NullCoalescingOperator", @SuperClassName = ""] + +- UserClass[@DefiningType = "NullCoalescingOperator", @Image = "NullCoalescingOperator", @InterfaceNames = (), @RealLoc = true, @SimpleName = "NullCoalescingOperator", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "NullCoalescingOperator", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Method[@Arity = 2, @CanonicalName = "leftOrRight", @Constructor = false, @DefiningType = "NullCoalescingOperator", @Image = "leftOrRight", @RealLoc = true, @ReturnType = "String", @StaticInitializer = false] +- ModifierNode[@Abstract = false, @DefiningType = "NullCoalescingOperator", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt index a31ee20f8e..226b07f37a 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt @@ -1,26 +1,26 @@ +- ApexFile[@DefiningType = "Foo", @RealLoc = true] - +- UserClass[@DefiningType = "Foo", @Image = "Foo", @InterfaceNames = null, @RealLoc = true, @SimpleName = "Foo", @SuperClassName = ""] + +- UserClass[@DefiningType = "Foo", @Image = "Foo", @InterfaceNames = (), @RealLoc = true, @SimpleName = "Foo", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Field[@DefiningType = "Foo", @Image = "x", @Name = "x", @RealLoc = true, @Type = "Integer", @Value = null] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] +- Field[@DefiningType = "Foo", @Image = "profileUrl", @Name = "profileUrl", @RealLoc = true, @Type = "String", @Value = null] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] - +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeArguments = null, @TypeName = "Integer"] + +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeArguments = (), @TypeName = "Integer"] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- FieldDeclaration[@DefiningType = "Foo", @Image = "x", @Name = "x", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "anIntegerField", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "anObject", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "x", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] - +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeArguments = null, @TypeName = "String"] + +- FieldDeclarationStatements[@DefiningType = "Foo", @RealLoc = true, @TypeArguments = (), @TypeName = "String"] | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- FieldDeclaration[@DefiningType = "Foo", @Image = "profileUrl", @Name = "profileUrl", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "toExternalForm", @InputParametersSize = 0, @MethodName = "toExternalForm", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "user.getProfileUrl", @InputParametersSize = 0, @MethodName = "getProfileUrl", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "user", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "user", @Names = ("user"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "profileUrl", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- Method[@Arity = 1, @CanonicalName = "bar1", @Constructor = false, @DefiningType = "Foo", @Image = "bar1", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] @@ -30,15 +30,15 @@ | +- BlockStatement[@CurlyBrace = true, @DefiningType = "Foo", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "b", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "c1", @InputParametersSize = 0, @MethodName = "c1", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | +- CastExpression[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "b1", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "a1", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- Method[@Arity = 2, @CanonicalName = "bar2", @Constructor = false, @DefiningType = "Foo", @Image = "bar2", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] @@ -50,9 +50,9 @@ | +- BlockStatement[@CurlyBrace = true, @DefiningType = "Foo", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "aField", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] | | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "aMethod", @InputParametersSize = 0, @MethodName = "aMethod", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | | +- ArrayLoadExpression[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] @@ -60,9 +60,9 @@ | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "aField", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "aMethod", @InputParametersSize = 0, @MethodName = "aMethod", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- ArrayLoadExpression[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] @@ -77,14 +77,14 @@ | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- VariableDeclaration[@DefiningType = "Foo", @Image = "s", @RealLoc = true, @Type = "String"] | +- VariableExpression[@DefiningType = "Foo", @Image = "BillingCity", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "Account", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "contact", @Names = null, @RealLoc = true, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "contact", @Names = ("contact"), @RealLoc = true, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "s", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- ReturnStatement[@DefiningType = "Foo", @RealLoc = true] +- VariableExpression[@DefiningType = "Foo", @Image = "Name", @RealLoc = true] - +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = null, @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] +- SoqlExpression[@CanonicalQuery = "SELECT Name FROM Account WHERE Id = :tmpVar1", @DefiningType = "Foo", @Query = "SELECT Name FROM Account WHERE Id = :accId", @RealLoc = true] +- BindExpressions[@DefiningType = "Foo", @RealLoc = true] +- VariableExpression[@DefiningType = "Foo", @Image = "accId", @RealLoc = true] From 0d32ac8aa1196ad602c9aab44760c3ba289316fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 02:02:49 -0300 Subject: [PATCH 14/56] Update more tree dump tests --- .../java14/MultipleCaseLabels.txt | 22 +-- .../java14/SimpleSwitchExpressions.txt | 32 ++-- .../java14/SwitchExpressions.txt | 50 +++---- .../jdkversiontests/java14/SwitchRules.txt | 22 +-- .../java14/YieldStatements.txt | 4 +- .../java15/NonSealedIdentifier.txt | 12 +- .../ast/jdkversiontests/java15/TextBlocks.txt | 42 +++--- .../LocalClassAndInterfaceDeclarations.txt | 16 +- .../jdkversiontests/java16/LocalRecords.txt | 58 ++++---- .../java16/NonSealedIdentifier.txt | 12 +- .../java16/PatternMatchingInstanceof.txt | 34 ++--- .../java/ast/jdkversiontests/java16/Point.txt | 12 +- .../ast/jdkversiontests/java16/Records.txt | 70 ++++----- .../ast/jdkversiontests/java17/LocalVars.txt | 6 +- .../java17/SealedInnerClasses.txt | 10 +- .../java17/expression/Expr.txt | 4 +- .../jdkversiontests/java17/geometry/Shape.txt | 4 +- .../java17/geometry/Square.txt | 4 +- .../java21/AnnotationValueInitializers.txt | 4 +- .../java21/DealingWithNull.txt | 40 ++--- .../java21/EnhancedTypeCheckingSwitch.txt | 34 ++--- .../java21/ExhaustiveSwitch.txt | 62 ++++---- .../java21/GuardedPatterns.txt | 54 +++---- .../java21/Jep440_RecordPatterns.txt | 102 ++++++------- .../Jep441_PatternMatchingForSwitch.txt | 88 +++++------ .../java21/PatternsInSwitchLabels.txt | 18 +-- .../jdkversiontests/java21/RecordPatterns.txt | 140 +++++++++--------- .../java21/RecordPatternsExhaustiveSwitch.txt | 56 +++---- .../java21/RefiningPatternsInSwitch.txt | 46 +++--- .../ScopeOfPatternVariableDeclarations.txt | 28 ++-- .../java21p/Jep430_StringTemplates.txt | 124 ++++++++-------- .../Jep443_UnnamedPatternsAndVariables.txt | 130 ++++++++-------- .../java21p/Jep445_UnnamedClasses1.txt | 2 +- .../java21p/Jep445_UnnamedClasses2.txt | 4 +- .../java21p/Jep445_UnnamedClasses3.txt | 4 +- .../Jep456_UnnamedPatternsAndVariables.txt | 130 ++++++++-------- .../java22p/Jep447_StatementsBeforeSuper.txt | 76 +++++----- .../java22p/Jep459_StringTemplates.txt | 124 ++++++++-------- .../java22p/Jep463_UnnamedClasses1.txt | 2 +- .../java22p/Jep463_UnnamedClasses2.txt | 4 +- .../java22p/Jep463_UnnamedClasses3.txt | 4 +- .../Jep463_UnnamedClasses4WithImports.txt | 4 +- 42 files changed, 847 insertions(+), 847 deletions(-) diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/MultipleCaseLabels.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/MultipleCaseLabels.txt index 4018308d53..918c051e17 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/MultipleCaseLabels.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/MultipleCaseLabels.txt @@ -1,55 +1,55 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "MultipleCaseLabels", @CanonicalName = "MultipleCaseLabels", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MultipleCaseLabels", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 8] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "MONDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "MONDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "TUESDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "TUESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "WEDNESDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "WEDNESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "THURSDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "THURSDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "FRIDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "FRIDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5", @IntLiteral = true, @Integral = true, @LiteralText = "5", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "SATURDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SATURDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "6", @IntLiteral = true, @Integral = true, @LiteralText = "6", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 6.0, @ValueAsFloat = 6.0, @ValueAsInt = 6, @ValueAsLong = 6] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "SUNDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SUNDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -57,7 +57,7 @@ | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 2, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "day"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "day", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SimpleSwitchExpressions.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SimpleSwitchExpressions.txt index cc10dae8d4..e60528906c 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SimpleSwitchExpressions.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SimpleSwitchExpressions.txt @@ -1,55 +1,55 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SimpleSwitchExpressions", @CanonicalName = "SimpleSwitchExpressions", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SimpleSwitchExpressions", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 9] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "MONDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "MONDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "TUESDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "TUESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "WEDNESDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "WEDNESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "THURSDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "THURSDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "FRIDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "FRIDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5", @IntLiteral = true, @Integral = true, @LiteralText = "5", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "SATURDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SATURDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "6", @IntLiteral = true, @Integral = true, @LiteralText = "6", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 6.0, @ValueAsFloat = 6.0, @ValueAsInt = 6, @ValueAsLong = 6] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "SUNDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SUNDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -57,13 +57,13 @@ | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "day"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "day", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = true, @Image = "FRIDAY", @Name = "FRIDAY", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "numLetters"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "numLetters", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -91,7 +91,7 @@ | | +- SwitchLabel[@Default = true] | | +- Block[@Empty = false, @Size = 3, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "k"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -99,7 +99,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "day", @Name = "day", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "result"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -117,11 +117,11 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "NumLetters: %d%n", @Empty = false, @Image = "\"NumLetters: %d%n\"", @Length = 16, @LiteralText = "\"NumLetters: %d%n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "numLetters", @Name = "numLetters", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "f", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] - +- ModifierList[@EffectiveModifiers = "{private, static}", @ExplicitModifiers = "{private, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchExpressions.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchExpressions.txt index 43c635bcd7..408ae2734d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchExpressions.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchExpressions.txt @@ -1,43 +1,43 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SwitchExpressions", @CanonicalName = "SwitchExpressions", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SwitchExpressions", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 6] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SwitchExpressions$Day", @CanonicalName = "SwitchExpressions.Day", @EffectiveVisibility = Visibility.V_PRIVATE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Day", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE)] | +- EnumBody[@Empty = false, @SeparatorSemi = true, @Size = 7, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "MONDAY", @MethodName = "new", @Name = "MONDAY", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "MONDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "TUESDAY", @MethodName = "new", @Name = "TUESDAY", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "TUESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "WEDNESDAY", @MethodName = "new", @Name = "WEDNESDAY", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "WEDNESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "THURSDAY", @MethodName = "new", @Name = "THURSDAY", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "THURSDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "FRIDAY", @MethodName = "new", @Name = "FRIDAY", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "FRIDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "SATURDAY", @MethodName = "new", @Name = "SATURDAY", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SATURDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PRIVATE, @Image = "SUNDAY", @MethodName = "new", @Name = "SUNDAY", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SUNDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PUBLIC, @Static = true, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "BAZ"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PUBLIC, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BAZ", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PUBLIC] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -45,7 +45,7 @@ | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 15, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Day"] | | +- VariableDeclarator[@Initializer = true, @Name = "day"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "day", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -94,7 +94,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "9", @IntLiteral = true, @Integral = true, @LiteralText = "9", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 9.0, @ValueAsFloat = 9.0, @ValueAsInt = 9, @ValueAsLong = 9] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "numLetters"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "numLetters", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -152,7 +152,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "j"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "j", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -170,7 +170,7 @@ | | +- SwitchLabel[@Default = true] | | +- Block[@Empty = false, @Size = 3, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "k"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -180,7 +180,7 @@ | | | | +- ArgumentList[@Empty = true, @Size = 0] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "result"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -198,13 +198,13 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "j=%d%n", @Empty = false, @Image = "\"j=%d%n\"", @Length = 6, @LiteralText = "\"j=%d%n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "j", @Name = "j", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Foo", @Empty = false, @Image = "\"Foo\"", @Length = 3, @LiteralText = "\"Foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "result"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -247,11 +247,11 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "result=%d%n", @Empty = false, @Image = "\"result=%d%n\"", @Length = 11, @LiteralText = "\"result=%d%n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "howMany", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{private, static}", @ExplicitModifiers = "{private, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -284,11 +284,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "many", @Empty = false, @Image = "\"many\"", @Length = 4, @LiteralText = "\"many\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "howManyExpr", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{private, static}", @ExplicitModifiers = "{private, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -312,11 +312,11 @@ | +- SwitchLabel[@Default = true] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "many", @Empty = false, @Image = "\"many\"", @Length = 4, @LiteralText = "\"many\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "f", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] - +- ModifierList[@EffectiveModifiers = "{private, static}", @ExplicitModifiers = "{private, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "k", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchRules.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchRules.txt index 6c25858d7a..f14d4f4dbd 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchRules.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/SwitchRules.txt @@ -1,55 +1,55 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SwitchRules", @CanonicalName = "SwitchRules", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SwitchRules", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 8] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "MONDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "MONDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "TUESDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "TUESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "WEDNESDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "WEDNESDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "THURSDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "THURSDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "4", @IntLiteral = true, @Integral = true, @LiteralText = "4", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 4.0, @ValueAsFloat = 4.0, @ValueAsInt = 4, @ValueAsLong = 4] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "FRIDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "FRIDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "5", @IntLiteral = true, @Integral = true, @LiteralText = "5", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 5.0, @ValueAsFloat = 5.0, @ValueAsInt = 5, @ValueAsLong = 5] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "SATURDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SATURDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "6", @IntLiteral = true, @Integral = true, @LiteralText = "6", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 6.0, @ValueAsFloat = 6.0, @ValueAsInt = 6, @ValueAsLong = 6] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "SUNDAY"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SUNDAY", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "7", @IntLiteral = true, @Integral = true, @LiteralText = "7", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.0, @ValueAsFloat = 7.0, @ValueAsInt = 7, @ValueAsLong = 7] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -57,7 +57,7 @@ | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 2, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "day"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "day", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/YieldStatements.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/YieldStatements.txt index 6d34dc9515..e054f1877b 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/YieldStatements.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java14/YieldStatements.txt @@ -1,11 +1,11 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "YieldStatements", @CanonicalName = "YieldStatements", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "YieldStatements", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- Initializer[@Static = false] +- Block[@Empty = false, @Size = 5, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "yield"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "yield", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/NonSealedIdentifier.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/NonSealedIdentifier.txt index 1abb1176b2..260983fffe 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/NonSealedIdentifier.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/NonSealedIdentifier.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "NonSealedIdentifier", @CanonicalName = "NonSealedIdentifier", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "NonSealedIdentifier", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -15,19 +15,19 @@ | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 5, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "result"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "non"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "non", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "sealed"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sealed", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt index 82ad86c833..d1c329260a 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt @@ -2,14 +2,14 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "javax.script.ScriptEngine", @ImportedSimpleName = "ScriptEngine", @PackageName = "javax.script", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "javax.script.ScriptEngineManager", @ImportedSimpleName = "ScriptEngineManager", @PackageName = "javax.script", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "TextBlocks", @CanonicalName = "TextBlocks", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "TextBlocks", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -19,7 +19,7 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "Exception"] +- Block[@Empty = false, @Size = 25, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "html"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "html", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -32,7 +32,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "html", @Name = "html", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "query"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "query", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -45,7 +45,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "query", @Name = "query", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "ScriptEngine"] | +- VariableDeclarator[@Initializer = true, @Name = "engine"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "engine", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -56,7 +56,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "js", @Empty = false, @Image = "\"js\"", @Length = 2, @LiteralText = "\"js\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | +- VariableDeclarator[@Initializer = true, @Name = "obj"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -65,7 +65,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "function hello() {\n print(\'\"Hello, world\"\');\n}\n\nhello();\n", @Empty = false, @Image = "\"\"\"\n function hello() {\n print(\'\"Hello, world\"\');\n }\n \n hello();\n \"\"\"", @Length = 60, @LiteralText = "\"\"\"\n function hello() {\n print(\'\"Hello, world\"\');\n }\n \n hello();\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "htmlWithEscapes"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "htmlWithEscapes", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -78,61 +78,61 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "htmlWithEscapes", @Name = "htmlWithEscapes", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "season"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "season", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "winter", @Empty = false, @Image = "\"\"\"\n winter\"\"\"", @Length = 6, @LiteralText = "\"\"\"\n winter\"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "period"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "period", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "winter\n", @Empty = false, @Image = "\"\"\"\n winter\n \"\"\"", @Length = 7, @LiteralText = "\"\"\"\n winter\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "greeting"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "greeting", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hi, \"Bob\"\n", @Empty = false, @Image = "\"\"\"\n Hi, \"Bob\"\n \"\"\"", @Length = 10, @LiteralText = "\"\"\"\n Hi, \"Bob\"\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "salutation"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "salutation", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hi,\n \"Bob\"\n", @Empty = false, @Image = "\"\"\"\n Hi,\n \"Bob\"\n \"\"\"", @Length = 11, @LiteralText = "\"\"\"\n Hi,\n \"Bob\"\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "empty"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "empty", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "", @Empty = true, @Image = "\"\"\"\n \"\"\"", @Length = 0, @LiteralText = "\"\"\"\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "quote"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "quote", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "\"\n", @Empty = false, @Image = "\"\"\"\n \"\n \"\"\"", @Length = 2, @LiteralText = "\"\"\"\n \"\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "backslash"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "backslash", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "\\\n", @Empty = false, @Image = "\"\"\"\n \\\\\n \"\"\"", @Length = 2, @LiteralText = "\"\"\"\n \\\\\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "normalStringLiteral"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "normalStringLiteral", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "test", @Empty = false, @Image = "\"test\"", @Length = 4, @LiteralText = "\"test\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "code"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "code", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String text = \"\"\"\n A text block inside a text block\n\"\"\";\n", @Empty = false, @Image = "\"\"\"\n String text = \\\"\"\"\n A text block inside a text block\n \\\"\"\";\n \"\"\"", @Length = 60, @LiteralText = "\"\"\"\n String text = \\\"\"\"\n A text block inside a text block\n \\\"\"\";\n \"\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "text"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "text", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -145,7 +145,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "text", @Name = "text", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "colors"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "colors", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -158,7 +158,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "colors", @Name = "colors", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "emptyLine"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "emptyLine", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -175,7 +175,7 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "\n", @Empty = false, @Image = "\"\\n\"", @Length = 1, @LiteralText = "\"\\n\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "", @Empty = false, @Image = "\"\"", @Length = 4, @LiteralText = "\"\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "bs"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "bs", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalClassAndInterfaceDeclarations.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalClassAndInterfaceDeclarations.txt index c1283873bf..f92cdd9cbf 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalClassAndInterfaceDeclarations.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalClassAndInterfaceDeclarations.txt @@ -1,37 +1,37 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalClassAndInterfaceDeclarations", @CanonicalName = "LocalClassAndInterfaceDeclarations", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "LocalClassAndInterfaceDeclarations", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- Initializer[@Static = false] +- Block[@Empty = false, @Size = 3, @containsComment = true] +- LocalClassStatement[] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalClassAndInterfaceDeclarations$1MyLocalClass", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = false, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MyLocalClass", @Static = false, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 3] | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Static = true, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{static, final}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "constantField"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "constantField", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Static = true, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = false, @Name = "staticField"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "staticField", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Name = "staticMethod", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- LocalClassStatement[] | +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "LocalClassAndInterfaceDeclarations$1MyLocalInterface", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = false, @Interface = true, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "MyLocalInterface", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{abstract, static}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] | +- ClassBody[@Empty = true, @Size = 0] +- LocalClassStatement[] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalClassAndInterfaceDeclarations$1MyLocalEnum", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = true, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyLocalEnum", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 1, @TrailingComma = false] +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_LOCAL, @Image = "A", @MethodName = "new", @Name = "A", @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "A", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalRecords.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalRecords.txt index bcdde4efd6..469d4d8963 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalRecords.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/LocalRecords.txt @@ -2,53 +2,53 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.stream.Collectors", @ImportedSimpleName = "Collectors", @PackageName = "java.util.stream", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.List", @ImportedSimpleName = "List", @PackageName = "java.util", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords", @CanonicalName = "LocalRecords", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "LocalRecords", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 6] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$Merchant", @CanonicalName = "LocalRecords.Merchant", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Merchant", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, abstract, static}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 2, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "computeSales", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | +- FormalParameters[@Empty = false, @Size = 2] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Merchant"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "merchant", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "month", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "month", @Name = "month", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 2, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "findTopMerchants", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "List"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Merchant"] | +- FormalParameters[@Empty = false, @Size = 2] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "List"] | | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Merchant"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "merchants", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "month", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalClassStatement[] | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MerchantSales", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MerchantSales", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Merchant"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "merchant", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "sales", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] @@ -64,7 +64,7 @@ | | | | +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- LambdaParameterList[@Empty = false, @Size = 1] | | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "merchant", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "MerchantSales"] @@ -78,10 +78,10 @@ | | | +- LambdaExpression[@Arity = 2, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- LambdaParameterList[@Empty = false, @Size = 2] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "m1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "m2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "compare", @MethodName = "compare", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] @@ -103,78 +103,78 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Collectors"] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "methodWithLocalRecordAndModifiers", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 4, @containsComment = false] | +- LocalClassStatement[] | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MyRecord1", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyRecord1", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{final}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] | +- LocalClassStatement[] | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MyRecord2", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyRecord2", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{static, final}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] | +- LocalClassStatement[] | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MyRecord3", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyRecord3", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- Annotation[@SimpleName = "Deprecated"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Deprecated"] | | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] | +- LocalClassStatement[] | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MyRecord4", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyRecord4", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | | +- Annotation[@SimpleName = "Deprecated"] | | +- ClassType[@FullyQualified = false, @SimpleName = "Deprecated"] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "methodWithLocalClass", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- LocalClassStatement[] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalRecords$1MyLocalClass", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = false, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "MyLocalClass", @Static = false, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "methodWithLocalVarsNamedSealed", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 5, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "result"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "non"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "non", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "sealed"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sealed", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/NonSealedIdentifier.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/NonSealedIdentifier.txt index 1abb1176b2..260983fffe 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/NonSealedIdentifier.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/NonSealedIdentifier.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "NonSealedIdentifier", @CanonicalName = "NonSealedIdentifier", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "NonSealedIdentifier", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -15,19 +15,19 @@ | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 5, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "result"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "non"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "non", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "sealed"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sealed", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/PatternMatchingInstanceof.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/PatternMatchingInstanceof.txt index 542a7e19ae..8194cb8681 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/PatternMatchingInstanceof.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/PatternMatchingInstanceof.txt @@ -10,21 +10,21 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType", @ImportedSimpleName = "ElementType", @PackageName = "java.lang.annotation", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.Target", @ImportedSimpleName = "Target", @PackageName = "java.lang.annotation", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PatternMatchingInstanceof", @CanonicalName = "PatternMatchingInstanceof", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PatternMatchingInstanceof", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 5] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = false, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "s"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "other string", @Empty = false, @Image = "\"other string\"", @Length = 12, @LiteralText = "\"other string\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "test", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 8, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableDeclarator[@Initializer = true, @Name = "obj"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -34,7 +34,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 3, @containsComment = false] @@ -86,7 +86,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = true] @@ -119,7 +119,7 @@ | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] @@ -145,7 +145,7 @@ | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] @@ -170,7 +170,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = true] @@ -202,7 +202,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- Annotation[@SimpleName = "Deprecated"] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Deprecated"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -236,7 +236,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | | +- Annotation[@SimpleName = "Deprecated"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Deprecated"] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -266,11 +266,11 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -284,18 +284,18 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- ArgumentList[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PatternMatchingInstanceof$Foo", @CanonicalName = "PatternMatchingInstanceof.Foo", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Foo", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = false, @Size = 1] | +- Initializer[@Static = false] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableDeclarator[@Initializer = true, @Name = "f"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | +- VariableDeclarator[@Initializer = true, @Name = "o"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -306,7 +306,7 @@ | +- Annotation[@SimpleName = "Nullable"] | +- ClassType[@FullyQualified = false, @SimpleName = "Nullable"] +- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "PatternMatchingInstanceof$Nullable", @CanonicalName = "PatternMatchingInstanceof.Nullable", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Nullable", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{abstract, static}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] | +- Annotation[@SimpleName = "Target"] | +- ClassType[@FullyQualified = false, @SimpleName = "Target"] | +- AnnotationMemberList[@Empty = false, @Size = 1] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Point.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Point.txt index 9adda51364..f7a424ed09 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Point.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Point.txt @@ -1,22 +1,22 @@ +- CompilationUnit[@PackageName = ""] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Point", @CanonicalName = "Point", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Point", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public, final}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] +- RecordBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -24,7 +24,7 @@ | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 2, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | +- VariableDeclarator[@Initializer = true, @Name = "p"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Records.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Records.txt index 5a8b4f6a10..a06d3dde50 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Records.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java16/Records.txt @@ -4,10 +4,10 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.lang.annotation.ElementType", @ImportedSimpleName = "ElementType", @PackageName = "java.lang.annotation", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Objects", @ImportedSimpleName = "Objects", @PackageName = "java.util", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records", @CanonicalName = "Records", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Records", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 10] +- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "Records$Nullable", @CanonicalName = "Records.Nullable", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Nullable", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{abstract, static}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] | | +- Annotation[@SimpleName = "Target"] | | +- ClassType[@FullyQualified = false, @SimpleName = "Target"] | | +- AnnotationMemberList[@Empty = false, @Size = 1] @@ -17,7 +17,7 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "ElementType"] | +- AnnotationTypeBody[@Empty = true, @Size = 0] +- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "Records$MyAnnotation", @CanonicalName = "Records.MyAnnotation", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyAnnotation", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{abstract, static}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = ()] | | +- Annotation[@SimpleName = "Target"] | | +- ClassType[@FullyQualified = false, @SimpleName = "Target"] | | +- AnnotationMemberList[@Empty = false, @Size = 1] @@ -31,32 +31,32 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "ElementType"] | +- AnnotationTypeBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$MyComplex", @CanonicalName = "Records.MyComplex", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyComplex", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "real", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- Annotation[@SimpleName = "Deprecated"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Deprecated"] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "imaginary", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = false, @Size = 3] | +- ConstructorDeclaration[@Abstract = false, @Arity = 2, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Image = "MyComplex", @Name = "MyComplex", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- Annotation[@SimpleName = "MyAnnotation"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "MyAnnotation"] | | +- FormalParameters[@Empty = false, @Size = 2] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- Annotation[@SimpleName = "MyAnnotation"] | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "MyAnnotation"] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "real", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "imaginary", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 3, @containsComment = false] @@ -80,30 +80,30 @@ | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "imaginary", @Name = "imaginary", @ParenthesisDepth = 0, @Parenthesized = false] | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$MyComplex$Nested", @CanonicalName = "Records.MyComplex.Nested", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Nested", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = true, @Size = 0] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$MyComplex$NestedClass", @CanonicalName = "Records.MyComplex.NestedClass", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "NestedClass", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$Range", @CanonicalName = "Records.Range", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Range", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lo", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "hi", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = false, @Size = 2] | +- CompactConstructorDeclaration[@EffectiveVisibility = Visibility.V_PUBLIC, @Image = "Range", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- Annotation[@SimpleName = "MyAnnotation"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "MyAnnotation"] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -123,20 +123,20 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "foo", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$RecordWithLambdaInCompactConstructor", @CanonicalName = "Records.RecordWithLambdaInCompactConstructor", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "RecordWithLambdaInCompactConstructor", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "foo", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = false, @Size = 1] | +- CompactConstructorDeclaration[@EffectiveVisibility = Visibility.V_PUBLIC, @Image = "RecordWithLambdaInCompactConstructor", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = false, @Image = "requireNonNull", @MethodName = "requireNonNull", @ParenthesisDepth = 0, @Parenthesized = false] @@ -148,10 +148,10 @@ | +- LambdaParameterList[@Empty = true, @Size = 0] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "foo", @Empty = false, @Image = "\"foo\"", @Length = 3, @LiteralText = "\"foo\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$VarRec", @CanonicalName = "Records.VarRec", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "VarRec", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = true] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = true, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- Annotation[@SimpleName = "Nullable"] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Nullable"] | | | +- Annotation[@SimpleName = "Deprecated"] @@ -165,10 +165,10 @@ | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$ArrayRec", @CanonicalName = "Records.ArrayRec", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "ArrayRec", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -176,30 +176,30 @@ | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$EmptyRec", @CanonicalName = "Records.EmptyRec", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "EmptyRec", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "Type", @Name = "Type", @TypeBound = false] | +- RecordComponentList[@Empty = true, @Size = 0, @Varargs = false] | +- RecordBody[@Empty = false, @Size = 3] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "foo", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "bar", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | +- ClassType[@FullyQualified = false, @SimpleName = "Type"] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] | | +- ReturnStatement[] | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "baz", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "EmptyRec"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -217,25 +217,25 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "r", @Name = "r", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "Records$Person", @CanonicalName = "Records.Person", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Person", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, abstract, static}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ClassBody[@Empty = false, @Size = 2] | +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "firstName", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{public, abstract}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- FormalParameters[@Empty = true, @Size = 0] | +- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "lastName", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public, abstract}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.ABSTRACT), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- FormalParameters[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Records$PersonRecord", @CanonicalName = "Records.PersonRecord", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "PersonRecord", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "firstName", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lastName", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] +- ImplementsList[@Empty = false, @Size = 2] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/LocalVars.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/LocalVars.txt index f1dab975b5..55a5d5f606 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/LocalVars.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/LocalVars.txt @@ -1,14 +1,14 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "LocalVars", @CanonicalName = "LocalVars", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "LocalVars", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @Name = "aMethod", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 2, @containsComment = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "sealed"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sealed", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/SealedInnerClasses.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/SealedInnerClasses.txt index 1ca67aec27..03417524db 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/SealedInnerClasses.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/SealedInnerClasses.txt @@ -1,24 +1,24 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses", @CanonicalName = "SealedInnerClasses", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "SealedInnerClasses", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 2] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses$Square", @CanonicalName = "SealedInnerClasses.Square", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Square", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{sealed}", @ExplicitModifiers = "{sealed}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED), @ExplicitModifiers = (JModifier.SEALED)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Squircle"] | +- ClassBody[@Empty = false, @Size = 2] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses$Square$OtherSquare", @CanonicalName = "SealedInnerClasses.Square.OtherSquare", @EffectiveVisibility = Visibility.V_PRIVATE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "OtherSquare", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, non-sealed}", @ExplicitModifiers = "{private, non-sealed}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.NON_SEALED), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.NON_SEALED)] | | +- ExtendsList[@Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Square"] | | +- ClassBody[@Empty = true, @Size = 0] | +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses$Square$StaticClass", @CanonicalName = "SealedInnerClasses.Square.StaticClass", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "StaticClass", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{non-sealed, static}", @ExplicitModifiers = "{non-sealed, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.NON_SEALED, JModifier.STATIC), @ExplicitModifiers = (JModifier.NON_SEALED, JModifier.STATIC)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Squircle"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "SealedInnerClasses$Squircle", @CanonicalName = "SealedInnerClasses.Squircle", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Squircle", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{sealed, abstract, static}", @ExplicitModifiers = "{sealed}"] + +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] +- PermitsList[@Empty = false, @Size = 2] | +- ClassType[@FullyQualified = false, @SimpleName = "Square"] | +- ClassType[@FullyQualified = false, @SimpleName = "StaticClass"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/expression/Expr.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/expression/Expr.txt index 51c3723317..016661bb86 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/expression/Expr.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/expression/Expr.txt @@ -1,8 +1,8 @@ +- CompilationUnit[@PackageName = "com.example.expression"] +- PackageDeclaration[@Name = "com.example.expression"] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "com.example.expression.Expr", @CanonicalName = "com.example.expression.Expr", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = false, @PackageName = "com.example.expression", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Expr", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public, sealed, abstract}", @ExplicitModifiers = "{public, sealed}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.SEALED, JModifier.ABSTRACT), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.SEALED)] +- PermitsList[@Empty = false, @Size = 4] | +- ClassType[@FullyQualified = false, @SimpleName = "ConstantExpr"] | +- ClassType[@FullyQualified = false, @SimpleName = "PlusExpr"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Shape.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Shape.txt index 75e751d3a5..f66d9db66f 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Shape.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Shape.txt @@ -1,8 +1,8 @@ +- CompilationUnit[@PackageName = "com.example.geometry"] +- PackageDeclaration[@Name = "com.example.geometry"] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.example.geometry.Shape", @CanonicalName = "com.example.geometry.Shape", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "com.example.geometry", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Shape", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public, sealed}", @ExplicitModifiers = "{public, sealed}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.SEALED), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.SEALED)] +- PermitsList[@Empty = false, @Size = 3] | +- ClassType[@FullyQualified = false, @SimpleName = "Circle"] | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Square.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Square.txt index 35eac43c54..f5fe375c73 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Square.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java17/geometry/Square.txt @@ -1,8 +1,8 @@ +- CompilationUnit[@PackageName = "com.example.geometry"] +- PackageDeclaration[@Name = "com.example.geometry"] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "com.example.geometry.Square", @CanonicalName = "com.example.geometry.Square", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "com.example.geometry", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Square", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public, non-sealed}", @ExplicitModifiers = "{public, non-sealed}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.NON_SEALED), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.NON_SEALED)] +- ExtendsList[@Empty = false, @Size = 1] | +- ClassType[@FullyQualified = false, @SimpleName = "Shape"] +- ClassBody[@Empty = true, @Size = 0] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/AnnotationValueInitializers.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/AnnotationValueInitializers.txt index c28bf13143..ac3fa81e26 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/AnnotationValueInitializers.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/AnnotationValueInitializers.txt @@ -1,6 +1,6 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "AnnotationValueInitializers", @CanonicalName = "AnnotationValueInitializers", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "AnnotationValueInitializers", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- Annotation[@SimpleName = "MyAnnotation"] | | +- ClassType[@FullyQualified = false, @SimpleName = "MyAnnotation"] | | +- AnnotationMemberList[@Empty = false, @Size = 2] @@ -11,7 +11,7 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "b", @Empty = false, @Image = "\"b\"", @Length = 1, @LiteralText = "\"b\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "AnnotationValueInitializers2", @CanonicalName = "AnnotationValueInitializers2", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "AnnotationValueInitializers2", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- Annotation[@SimpleName = "MyAnnotation"] | +- ClassType[@FullyQualified = false, @SimpleName = "MyAnnotation"] | +- AnnotationMemberList[@Empty = false, @Size = 2] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/DealingWithNull.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/DealingWithNull.txt index 2aeb8ee6fb..09c4c440bc 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/DealingWithNull.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/DealingWithNull.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "DealingWithNull", @CanonicalName = "DealingWithNull", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "DealingWithNull", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 6] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testFooBar", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -41,11 +41,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Ok", @Empty = false, @Image = "\"Ok\"", @Length = 2, @LiteralText = "\"Ok\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testStringOrNull", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -54,7 +54,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -83,11 +83,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "default case", @Empty = false, @Image = "\"default case\"", @Length = 12, @LiteralText = "\"default case\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testStringOrDefaultNull", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -96,7 +96,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -117,11 +117,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null or default case", @Empty = false, @Image = "\"null or default case\"", @Length = 20, @LiteralText = "\"null or default case\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test2", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -137,7 +137,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -151,7 +151,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -169,11 +169,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "default", @Empty = false, @Image = "\"default\"", @Length = 7, @LiteralText = "\"default\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test3", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 4, @containsComment = false] @@ -193,7 +193,7 @@ | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ExpressionStatement[] @@ -228,7 +228,7 @@ | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -271,11 +271,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "The rest (including null)", @Empty = false, @Image = "\"The rest (including null)\"", @Length = 25, @LiteralText = "\"The rest (including null)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -298,7 +298,7 @@ | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- CatchClause[] | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "e", @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "NullPointerException"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "e", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/EnhancedTypeCheckingSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/EnhancedTypeCheckingSwitch.txt index cd6a3c0a40..2bc4a023cf 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/EnhancedTypeCheckingSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/EnhancedTypeCheckingSwitch.txt @@ -1,37 +1,37 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "EnhancedTypeCheckingSwitch", @CanonicalName = "EnhancedTypeCheckingSwitch", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "EnhancedTypeCheckingSwitch", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 4] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "EnhancedTypeCheckingSwitch$Point", @CanonicalName = "EnhancedTypeCheckingSwitch.Point", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Point", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "j", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "EnhancedTypeCheckingSwitch$Color", @CanonicalName = "EnhancedTypeCheckingSwitch.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- EnumBody[@Empty = false, @SeparatorSemi = true, @Size = 3, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "RED", @MethodName = "new", @Name = "RED", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "RED", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "GREEN", @MethodName = "new", @Name = "GREEN", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "GREEN", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "typeTester", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -49,7 +49,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -61,7 +61,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -77,7 +77,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -93,7 +93,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ArrayType[@ArrayDepth = 1] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -117,11 +117,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Something else", @Empty = false, @Image = "\"Something else\"", @Length = 14, @LiteralText = "\"Something else\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -129,7 +129,7 @@ | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 9, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | +- VariableDeclarator[@Initializer = true, @Name = "o"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ExhaustiveSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ExhaustiveSwitch.txt index 87d5c24cf7..5b58423b5a 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ExhaustiveSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ExhaustiveSwitch.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch", @CanonicalName = "ExhaustiveSwitch", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ExhaustiveSwitch", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 13] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "coverage", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -17,7 +17,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "length", @MethodName = "length", @ParenthesisDepth = 0, @Parenthesized = false] @@ -26,7 +26,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] @@ -34,11 +34,11 @@ | +- SwitchLabel[@Default = true] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "coverageStatement", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -47,7 +47,7 @@ | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ExpressionStatement[] @@ -61,7 +61,7 @@ | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ExpressionStatement[] @@ -76,38 +76,38 @@ | +- SwitchLabel[@Default = true] | +- BreakStatement[@Label = null] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$S", @CanonicalName = "ExhaustiveSwitch.S", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "S", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{sealed, abstract, static}", @ExplicitModifiers = "{sealed}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] | +- PermitsList[@Empty = false, @Size = 3] | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | +- ClassType[@FullyQualified = false, @SimpleName = "B"] | | +- ClassType[@FullyQualified = false, @SimpleName = "C"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$A", @CanonicalName = "ExhaustiveSwitch.A", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "A", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "S"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$B", @CanonicalName = "ExhaustiveSwitch.B", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "B", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "S"] | +- ClassBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$C", @CanonicalName = "ExhaustiveSwitch.C", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "C", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "S"] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testSealedExhaustive", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "S"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -117,30 +117,30 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "B"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LiteralText = "2", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "C"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "switchStatementExhaustive", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "S"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] @@ -149,7 +149,7 @@ | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ExpressionStatement[] @@ -163,7 +163,7 @@ | | +- SwitchFallthroughBranch[@Default = false] | | | +- SwitchLabel[@Default = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "C"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- ExpressionStatement[] @@ -186,7 +186,7 @@ | | +- BreakStatement[@Label = null] | +- EmptyStatement[] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$I", @CanonicalName = "ExhaustiveSwitch.I", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "I", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{sealed, abstract, static}", @ExplicitModifiers = "{sealed}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- PermitsList[@Empty = false, @Size = 2] @@ -194,7 +194,7 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "F"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$E", @CanonicalName = "ExhaustiveSwitch.E", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "E", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "X", @Name = "X", @TypeBound = false] | +- ImplementsList[@Empty = false, @Size = 1] @@ -203,7 +203,7 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ExhaustiveSwitch$F", @CanonicalName = "ExhaustiveSwitch.F", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "F", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.STATIC, JModifier.FINAL)] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "Y", @Name = "Y", @TypeBound = false] | +- ImplementsList[@Empty = false, @Size = 1] @@ -212,11 +212,11 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Y"] | +- ClassBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testGenericSealedExhaustive", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] @@ -228,18 +228,18 @@ | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "F"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "bi", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/GuardedPatterns.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/GuardedPatterns.txt index 54d9d2c408..a09c9ddbae 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/GuardedPatterns.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/GuardedPatterns.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GuardedPatterns", @CanonicalName = "GuardedPatterns", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GuardedPatterns", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 8] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -16,7 +16,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -34,7 +34,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -46,7 +46,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -70,11 +70,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "default case", @Empty = false, @Image = "\"default case\"", @Length = 12, @LiteralText = "\"default case\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testIdentifierWhen", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "when", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -86,12 +86,12 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "when", @Name = "when", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testIdentifierWhen", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "when"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "when", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -104,14 +104,14 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "when", @Name = "when", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GuardedPatterns$when", @CanonicalName = "GuardedPatterns.when", @EffectiveVisibility = Visibility.V_PRIVATE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "when", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static}", @ExplicitModifiers = "{private, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC)] | +- ClassBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testWithNull", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -120,7 +120,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -138,7 +138,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -150,7 +150,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -183,11 +183,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "default case", @Empty = false, @Image = "\"default case\"", @Length = 12, @LiteralText = "\"default case\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "instanceOfPattern", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 3, @containsComment = false] @@ -197,7 +197,7 @@ | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] @@ -223,7 +223,7 @@ | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] @@ -245,7 +245,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 1, @Parenthesized = true] @@ -262,11 +262,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A string containing at least four characters", @Empty = false, @Image = "\"A string containing at least four characters\"", @Length = 44, @LiteralText = "\"A string containing at least four characters\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testScopeOfPatternVariableDeclarations", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -276,7 +276,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] @@ -301,11 +301,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Not a string", @Empty = false, @Image = "\"Not a string\"", @Length = 12, @LiteralText = "\"Not a string\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -340,7 +340,7 @@ | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] | +- CatchClause[] | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "e", @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "NullPointerException"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "e", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep440_RecordPatterns.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep440_RecordPatterns.txt index 2e2cb11e5a..6e0d10978e 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep440_RecordPatterns.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep440_RecordPatterns.txt @@ -1,25 +1,25 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns", @CanonicalName = "Jep440_RecordPatterns", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep440_RecordPatterns", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 15] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$Point", @CanonicalName = "Jep440_RecordPatterns.Point", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Point", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printSum", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -31,11 +31,11 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -49,47 +49,47 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$Color", @CanonicalName = "Jep440_RecordPatterns.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 3, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "RED", @MethodName = "new", @Name = "RED", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "RED", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "GREEN", @MethodName = "new", @Name = "GREEN", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "GREEN", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$ColoredPoint", @CanonicalName = "Jep440_RecordPatterns.ColoredPoint", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "ColoredPoint", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$Rectangle", @CanonicalName = "Jep440_RecordPatterns.Rectangle", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Rectangle", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "upperLeft", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lowerRight", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printColorOfUpperLeftPoint", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -104,15 +104,15 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lr", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -124,11 +124,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printXCoordOfUpperLeftPointWithPatterns", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -146,19 +146,19 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | | +- PatternList[@Empty = false, @Size = 2] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lr", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -172,24 +172,24 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Upper-left corner: ", @Empty = false, @Image = "\"Upper-left corner: \"", @Length = 19, @LiteralText = "\"Upper-left corner: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$Pair", @CanonicalName = "Jep440_RecordPatterns.Pair", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Pair", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "patternsCanFailToMatch", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Pair"] | | +- VariableDeclarator[@Initializer = true, @Name = "p"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -206,11 +206,11 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Pair"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -234,27 +234,27 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Not a pair of strings", @Empty = false, @Image = "\"Not a pair of strings\"", @Length = 21, @LiteralText = "\"Not a pair of strings\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$MyPair", @CanonicalName = "Jep440_RecordPatterns.MyPair", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "MyPair", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 2] | | +- TypeParameter[@Image = "S", @Name = "S", @TypeBound = false] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "S"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "fst", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "snd", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- EmptyDeclaration[] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "recordInference", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "MyPair"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 2] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -269,11 +269,11 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "MyPair"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "f", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -283,21 +283,21 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "matched", @Empty = false, @Image = "\"matched\"", @Length = 7, @LiteralText = "\"matched\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep440_RecordPatterns$Box", @CanonicalName = "Jep440_RecordPatterns.Box", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Box", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test1", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] @@ -320,7 +320,7 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | +- PatternList[@Empty = false, @Size = 1] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -334,11 +334,11 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test2", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] @@ -357,7 +357,7 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | +- PatternList[@Empty = false, @Size = 1] | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep441_PatternMatchingForSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep441_PatternMatchingForSwitch.txt index a8536752f3..3e64a5beb7 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep441_PatternMatchingForSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/Jep441_PatternMatchingForSwitch.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch", @CanonicalName = "Jep441_PatternMatchingForSwitch", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep441_PatternMatchingForSwitch", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 13] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "formatterPatternSwitch", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -17,7 +17,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] @@ -29,7 +29,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Long"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "l", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] @@ -41,7 +41,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Double"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] @@ -53,7 +53,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] @@ -68,11 +68,11 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "obj", @Name = "obj", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testFooBarNew", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -106,11 +106,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Ok", @Empty = false, @Image = "\"Ok\"", @Length = 2, @LiteralText = "\"Ok\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testStringNew", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "response", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -123,7 +123,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -142,7 +142,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -161,7 +161,7 @@ | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -173,11 +173,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Sorry?", @Empty = false, @Image = "\"Sorry?\"", @Length = 6, @LiteralText = "\"Sorry?\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testStringEnhanced", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "response", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -214,7 +214,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -233,7 +233,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -252,7 +252,7 @@ | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -264,39 +264,39 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Sorry?", @Empty = false, @Image = "\"Sorry?\"", @Length = 6, @LiteralText = "\"Sorry?\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch$CardClassification", @CanonicalName = "Jep441_PatternMatchingForSwitch.CardClassification", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "CardClassification", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{sealed, abstract, static}", @ExplicitModifiers = "{sealed}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] | +- PermitsList[@Empty = false, @Size = 2] | | +- ClassType[@FullyQualified = false, @SimpleName = "Suit"] | | +- ClassType[@FullyQualified = false, @SimpleName = "Tarot"] | +- ClassBody[@Empty = true, @Size = 0] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch$Suit", @CanonicalName = "Jep441_PatternMatchingForSwitch.Suit", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Suit", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "CardClassification"] | +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 4, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "CLUBS", @MethodName = "new", @Name = "CLUBS", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "CLUBS", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "DIAMONDS", @MethodName = "new", @Name = "DIAMONDS", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "DIAMONDS", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "HEARTS", @MethodName = "new", @Name = "HEARTS", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "HEARTS", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "SPADES", @MethodName = "new", @Name = "SPADES", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "SPADES", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch$Tarot", @CanonicalName = "Jep441_PatternMatchingForSwitch.Tarot", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Tarot", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "CardClassification"] | +- ClassBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "exhaustiveSwitchWithoutEnumSupport", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "CardClassification"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -305,7 +305,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Suit"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -325,7 +325,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Suit"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -345,7 +345,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Suit"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -365,7 +365,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Suit"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -379,7 +379,7 @@ | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Tarot"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -391,11 +391,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s a tarot", @Empty = false, @Image = "\"It\'s a tarot\"", @Length = 12, @LiteralText = "\"It\'s a tarot\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "exhaustiveSwitchWithBetterEnumSupport", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "CardClassification"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -456,7 +456,7 @@ | +- SwitchArrowBranch[@Default = false] | +- SwitchLabel[@Default = false] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Tarot"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -468,27 +468,27 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "It\'s a tarot", @Empty = false, @Image = "\"It\'s a tarot\"", @Length = 12, @LiteralText = "\"It\'s a tarot\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch$Currency", @CanonicalName = "Jep441_PatternMatchingForSwitch.Currency", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "Currency", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{sealed, abstract, static}", @ExplicitModifiers = "{sealed}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] | +- PermitsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Coin"] | +- ClassBody[@Empty = true, @Size = 0] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep441_PatternMatchingForSwitch$Coin", @CanonicalName = "Jep441_PatternMatchingForSwitch.Coin", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Coin", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Currency"] | +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 2, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "HEADS", @MethodName = "new", @Name = "HEADS", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "HEADS", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "TAILS", @MethodName = "new", @Name = "TAILS", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "TAILS", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "goodEnumSwitch1", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Currency"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -521,11 +521,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Tails", @Empty = false, @Image = "\"Tails\"", @Length = 5, @LiteralText = "\"Tails\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "goodEnumSwitch2", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Coin"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/PatternsInSwitchLabels.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/PatternsInSwitchLabels.txt index ae159ed7ae..26347cab9b 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/PatternsInSwitchLabels.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/PatternsInSwitchLabels.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "PatternsInSwitchLabels", @CanonicalName = "PatternsInSwitchLabels", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PatternsInSwitchLabels", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 1] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -15,13 +15,13 @@ | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 3, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | +- VariableDeclarator[@Initializer = true, @Name = "o"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "123L", @IntLiteral = false, @Integral = true, @LiteralText = "123L", @LongLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 123.0, @ValueAsFloat = 123.0, @ValueAsInt = 123, @ValueAsLong = 123] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "formatted"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "formatted", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -30,7 +30,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] @@ -42,7 +42,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Long"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "l", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] @@ -54,7 +54,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Double"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] @@ -66,7 +66,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatterns.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatterns.txt index 7603475c02..bdd1ce8066 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatterns.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatterns.txt @@ -1,61 +1,61 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns", @CanonicalName = "RecordPatterns", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "RecordPatterns", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 18] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns$Point", @CanonicalName = "RecordPatterns.Point", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Point", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns$Color", @CanonicalName = "RecordPatterns.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 3, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "RED", @MethodName = "new", @Name = "RED", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "RED", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "GREEN", @MethodName = "new", @Name = "GREEN", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "GREEN", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns$ColoredPoint", @CanonicalName = "RecordPatterns.ColoredPoint", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "ColoredPoint", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns$Rectangle", @CanonicalName = "RecordPatterns.Rectangle", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Rectangle", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "upperLeft", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lowerRight", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printSum1", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -64,12 +64,12 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "o", @Name = "o", @ParenthesisDepth = 0, @Parenthesized = false] | | +- PatternExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -77,7 +77,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "p", @Name = "p", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "y"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "y", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -94,11 +94,11 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printSum2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -110,11 +110,11 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -128,11 +128,11 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printUpperLeftColoredPoint", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -144,11 +144,11 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "ul", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lr", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -162,11 +162,11 @@ | +- AmbiguousName[@CompileTimeConstant = false, @Image = "ul", @Name = "ul", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printColorOfUpperLeftPoint", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -181,15 +181,15 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lr", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -201,36 +201,36 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "c", @Name = "c", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 6, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "createRectangle", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | +- FormalParameters[@Empty = false, @Size = 6] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "x1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "y1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "x2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "y2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "c2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | +- VariableDeclarator[@Initializer = true, @Name = "r"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -258,11 +258,11 @@ | +- ReturnStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "r", @Name = "r", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "printXCoordOfUpperLeftPointWithPatterns", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -280,19 +280,19 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | | +- PatternList[@Empty = false, @Size = 2] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lr", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -306,24 +306,24 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Upper-left corner: ", @Empty = false, @Image = "\"Upper-left corner: \"", @Length = 19, @LiteralText = "\"Upper-left corner: \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns$Pair", @CanonicalName = "RecordPatterns.Pair", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Pair", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "nestedPatternsCanFailToMatch", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Pair"] | | +- VariableDeclarator[@Initializer = true, @Name = "p"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -340,11 +340,11 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Pair"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -368,21 +368,21 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Not a pair of strings", @Empty = false, @Image = "\"Not a pair of strings\"", @Length = 21, @LiteralText = "\"Not a pair of strings\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatterns$Box", @CanonicalName = "RecordPatterns.Box", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Box", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test1a", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] @@ -398,7 +398,7 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- PatternList[@Empty = false, @Size = 1] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -412,11 +412,11 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test1", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -432,7 +432,7 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- PatternList[@Empty = false, @Size = 1] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -446,11 +446,11 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] @@ -464,7 +464,7 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | +- PatternList[@Empty = false, @Size = 1] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -478,11 +478,11 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test3", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] @@ -505,7 +505,7 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | +- PatternList[@Empty = false, @Size = 1] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -519,11 +519,11 @@ | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "String ", @Empty = false, @Image = "\"String \"", @Length = 7, @LiteralText = "\"String \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test4", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] @@ -542,7 +542,7 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | +- PatternList[@Empty = false, @Size = 1] | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "var"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatternsExhaustiveSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatternsExhaustiveSwitch.txt index 8f22b50ebf..1d0d121f32 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatternsExhaustiveSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RecordPatternsExhaustiveSwitch.txt @@ -1,52 +1,52 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch", @CanonicalName = "RecordPatternsExhaustiveSwitch", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "RecordPatternsExhaustiveSwitch", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 7] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$A", @CanonicalName = "RecordPatternsExhaustiveSwitch.A", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "A", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$B", @CanonicalName = "RecordPatternsExhaustiveSwitch.B", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "B", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$I", @CanonicalName = "RecordPatternsExhaustiveSwitch.I", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = true, @SimpleName = "I", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{sealed, abstract, static}", @ExplicitModifiers = "{sealed}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT, JModifier.STATIC), @ExplicitModifiers = (JModifier.SEALED)] | +- PermitsList[@Empty = false, @Size = 2] | | +- ClassType[@FullyQualified = false, @SimpleName = "C"] | | +- ClassType[@FullyQualified = false, @SimpleName = "D"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$C", @CanonicalName = "RecordPatternsExhaustiveSwitch.C", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "C", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$D", @CanonicalName = "RecordPatternsExhaustiveSwitch.D", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "D", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | +- ClassBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RecordPatternsExhaustiveSwitch$Pair", @CanonicalName = "RecordPatternsExhaustiveSwitch.Pair", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Pair", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = false] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 5, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Pair"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] @@ -54,7 +54,7 @@ | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Pair"] | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] @@ -71,11 +71,11 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "B"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -92,11 +92,11 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "B"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -113,11 +113,11 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a1", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "A"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "a2", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -136,11 +136,11 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "C"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -157,11 +157,11 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "D"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -180,11 +180,11 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "C"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -201,11 +201,11 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | | +- PatternList[@Empty = false, @Size = 2] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "D"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "C"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -222,11 +222,11 @@ | | +- ClassType[@FullyQualified = false, @SimpleName = "I"] | +- PatternList[@Empty = false, @Size = 2] | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "D"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d1", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "D"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "d2", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RefiningPatternsInSwitch.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RefiningPatternsInSwitch.txt index d91c4f8546..058cbaefed 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RefiningPatternsInSwitch.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/RefiningPatternsInSwitch.txt @@ -1,30 +1,30 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RefiningPatternsInSwitch", @CanonicalName = "RefiningPatternsInSwitch", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "RefiningPatternsInSwitch", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 7] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RefiningPatternsInSwitch$Shape", @CanonicalName = "RefiningPatternsInSwitch.Shape", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Shape", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RefiningPatternsInSwitch$Rectangle", @CanonicalName = "RefiningPatternsInSwitch.Rectangle", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Rectangle", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Shape"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "RefiningPatternsInSwitch$Triangle", @CanonicalName = "RefiningPatternsInSwitch.Triangle", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Triangle", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Shape"] | +- ClassBody[@Empty = false, @Size = 3] | +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = false, @Name = "area"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "area", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Triangle", @Name = "Triangle", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- FormalParameters[@Empty = false, @Size = 1] | | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "area", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -34,18 +34,18 @@ | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "area", @Name = "area", @ParenthesisDepth = 0, @Parenthesized = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "calculateArea", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "area", @Name = "area", @ParenthesisDepth = 0, @Parenthesized = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testTriangle", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Shape"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -58,7 +58,7 @@ | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Triangle"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- IfStatement[@Else = false] @@ -86,11 +86,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A shape, possibly a small triangle", @Empty = false, @Image = "\"A shape, possibly a small triangle\"", @Length = 34, @LiteralText = "\"A shape, possibly a small triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testTriangleRefined", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Shape"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -104,7 +104,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Triangle"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -128,11 +128,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "A shape, possibly a small triangle", @Empty = false, @Image = "\"A shape, possibly a small triangle\"", @Length = 34, @LiteralText = "\"A shape, possibly a small triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testTriangleRefined2", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Shape"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -146,7 +146,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Triangle"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -164,7 +164,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Triangle"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "t", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] @@ -182,11 +182,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Non-triangle", @Empty = false, @Image = "\"Non-triangle\"", @Length = 12, @LiteralText = "\"Non-triangle\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -194,7 +194,7 @@ | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] +- Block[@Empty = false, @Size = 12, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Triangle"] | +- VariableDeclarator[@Initializer = true, @Name = "large"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "large", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -203,7 +203,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "200", @IntLiteral = true, @Integral = true, @LiteralText = "200", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 200.0, @ValueAsFloat = 200.0, @ValueAsInt = 200, @ValueAsLong = 200] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Triangle"] | +- VariableDeclarator[@Initializer = true, @Name = "small"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "small", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -212,7 +212,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LiteralText = "10", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | +- VariableDeclarator[@Initializer = true, @Name = "rect"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "rect", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ScopeOfPatternVariableDeclarations.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ScopeOfPatternVariableDeclarations.txt index 3c1ff573aa..bcce204419 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ScopeOfPatternVariableDeclarations.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21/ScopeOfPatternVariableDeclarations.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "ScopeOfPatternVariableDeclarations", @CanonicalName = "ScopeOfPatternVariableDeclarations", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ScopeOfPatternVariableDeclarations", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] +- ClassBody[@Empty = false, @Size = 4] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testSwitchBlock", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "obj", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -16,7 +16,7 @@ | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Character"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -37,11 +37,11 @@ | +- SwitchLabel[@Default = true] | +- BreakStatement[@Label = null] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "testSwitchRule", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -50,7 +50,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Character"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 2, @containsComment = false] @@ -78,7 +78,7 @@ | +- SwitchArrowBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- ThrowStatement[] @@ -95,11 +95,11 @@ | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- BreakStatement[@Label = null] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "test2", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Object"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "o", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -108,7 +108,7 @@ | +- SwitchFallthroughBranch[@Default = false] | | +- SwitchLabel[@Default = false] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Character"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- IfStatement[@Else = false] @@ -156,11 +156,11 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "fall-through", @Empty = false, @Image = "\"fall-through\"", @Length = 12, @LiteralText = "\"fall-through\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PUBLIC, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = false, @Size = 1] | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ArrayType[@ArrayDepth = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -183,7 +183,7 @@ | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "42", @IntLiteral = true, @Integral = true, @LiteralText = "42", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 42.0, @ValueAsFloat = 42.0, @ValueAsInt = 42, @ValueAsLong = 42] | +- CatchClause[] | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "e", @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "IllegalStateException"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "e", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep430_StringTemplates.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep430_StringTemplates.txt index a1124094d6..dff0ab9939 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep430_StringTemplates.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep430_StringTemplates.txt @@ -5,43 +5,43 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.time.format.DateTimeFormatter", @ImportedSimpleName = "DateTimeFormatter", @PackageName = "java.time.format", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.time.LocalTime", @ImportedSimpleName = "LocalTime", @PackageName = "java.time", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep430_StringTemplates", @CanonicalName = "Jep430_StringTemplates", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep430_StringTemplates", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 9] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep430_StringTemplates$Request", @CanonicalName = "Jep430_StringTemplates.Request", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Request", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 3, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "date", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "time", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "ipAddress", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "STRTemplateProcessor", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 19, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "firstName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "firstName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Bill", @Empty = false, @Image = "\"Bill\"", @Length = 4, @LiteralText = "\"Bill\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "lastName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "lastName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Duck", @Empty = false, @Image = "\"Duck\"", @Length = 4, @LiteralText = "\"Duck\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "fullName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "fullName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -54,7 +54,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lastName", @Name = "lastName", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "sortName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sortName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -67,7 +67,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "firstName", @Name = "firstName", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -76,7 +76,7 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "y", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "20", @IntLiteral = true, @Integral = true, @LiteralText = "20", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 20.0, @ValueAsFloat = 20.0, @ValueAsInt = 20, @ValueAsLong = 20] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -93,7 +93,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s2"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -105,7 +105,7 @@ | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- TemplateFragment[@Content = "} waiting for you!\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Request"] | | +- VariableDeclarator[@Initializer = true, @Name = "req"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "req", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -116,7 +116,7 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "15:34", @Empty = false, @Image = "\"15:34\"", @Length = 5, @LiteralText = "\"15:34\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "8.8.8.8", @Empty = false, @Image = "\"8.8.8.8\"", @Length = 7, @LiteralText = "\"8.8.8.8\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "t"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "t", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -134,13 +134,13 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "req", @Name = "req", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "filePath"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "filePath", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "tmp.dat", @Empty = false, @Image = "\"tmp.dat\"", @Length = 7, @LiteralText = "\"tmp.dat\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "File"] | | +- VariableDeclarator[@Initializer = true, @Name = "file"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "file", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -149,7 +149,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "filePath", @Name = "filePath", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "old"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "old", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -168,7 +168,7 @@ | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "does not", @Empty = false, @Image = "\"does not\"", @Length = 8, @LiteralText = "\"does not\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " exist", @Empty = false, @Image = "\" exist\"", @Length = 6, @LiteralText = "\" exist\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "msg"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "msg", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -186,7 +186,7 @@ | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "does not", @Empty = false, @Image = "\"does not\"", @Length = 8, @LiteralText = "\"does not\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- TemplateFragment[@Content = "} exist\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "time"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "time", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -207,13 +207,13 @@ | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- TemplateFragment[@Content = "} right now\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "index"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "index", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "data"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "data", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -234,7 +234,7 @@ | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "index", @Name = "index", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -246,7 +246,7 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "oranges", @Empty = false, @Image = "\"oranges\"", @Length = 7, @LiteralText = "\"oranges\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "peaches", @Empty = false, @Image = "\"peaches\"", @Length = 7, @LiteralText = "\"peaches\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s3"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s3", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -272,7 +272,7 @@ | | | +- TemplateFragment[@Content = "}\""] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "s4"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s4", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -298,31 +298,31 @@ | | +- TemplateFragment[@Content = "}\""] | +- TemplateFragment[@Content = "}\""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "getOfferType", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "_getOfferType_", @Empty = false, @Image = "\"_getOfferType_\"", @Length = 14, @LiteralText = "\"_getOfferType_\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "multilineTemplateExpressions", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 10, @containsComment = true] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "title"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "title", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "My Web Page", @Empty = false, @Image = "\"My Web Page\"", @Length = 11, @LiteralText = "\"My Web Page\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "text"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "text", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, world", @Empty = false, @Image = "\"Hello, world\"", @Length = 12, @LiteralText = "\"Hello, world\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "html"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "html", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -335,25 +335,25 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "text", @Name = "text", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}

\n \n \n \"\"\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "name"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "name", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Joan Smith", @Empty = false, @Image = "\"Joan Smith\"", @Length = 10, @LiteralText = "\"Joan Smith\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "phone"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "phone", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "555-123-4567", @Empty = false, @Image = "\"555-123-4567\"", @Length = 12, @LiteralText = "\"555-123-4567\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "address"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "address", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "1 Maple Drive, Anytown", @Empty = false, @Image = "\"1 Maple Drive, Anytown\"", @Length = 22, @LiteralText = "\"1 Maple Drive, Anytown\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "json"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "json", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -369,23 +369,23 @@ | | +- TemplateFragment[@Content = "}\"\n }\n \"\"\""] | +- LocalClassStatement[] | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep430_StringTemplates$1Rectangle", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Rectangle", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- RecordComponentList[@Empty = false, @Size = 3, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "name", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "width", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "height", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = false, @Size = 1] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Name = "area", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -394,7 +394,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "width", @Name = "width", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "height", @Name = "height", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -426,7 +426,7 @@ | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "7.1", @IntLiteral = false, @Integral = false, @LiteralText = "7.1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.1, @ValueAsFloat = 7.1, @ValueAsInt = 7, @ValueAsLong = 7] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "11.23", @IntLiteral = false, @Integral = false, @LiteralText = "11.23", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 11.23, @ValueAsFloat = 11.23, @ValueAsInt = 11, @ValueAsLong = 11] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "table"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "table", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -516,29 +516,29 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\n \"\"\""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "FMTTemplateProcessor", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 4, @containsComment = true] | +- LocalClassStatement[] | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep430_StringTemplates$2Rectangle", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Rectangle", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- RecordComponentList[@Empty = false, @Size = 3, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "name", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "width", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "height", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = false, @Size = 1] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Name = "area", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -548,7 +548,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "height", @Name = "height", @ParenthesisDepth = 0, @Parenthesized = false] | +- EmptyStatement[] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -580,7 +580,7 @@ | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "7.1", @IntLiteral = false, @Integral = false, @LiteralText = "7.1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.1, @ValueAsFloat = 7.1, @ValueAsInt = 7, @ValueAsLong = 7] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "11.23", @IntLiteral = false, @Integral = false, @LiteralText = "11.23", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 11.23, @ValueAsFloat = 11.23, @ValueAsInt = 11, @ValueAsLong = 11] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "table"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "table", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -675,18 +675,18 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\n \"\"\""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "ensuringSafety", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "name"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "name", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Joan", @Empty = false, @Image = "\"Joan\"", @Length = 4, @LiteralText = "\"Joan\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "StringTemplate"] | | +- VariableDeclarator[@Initializer = true, @Name = "st"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "st", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -697,7 +697,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "info"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "info", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -706,24 +706,24 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "st", @Name = "st", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep430_StringTemplates$User", @CanonicalName = "Jep430_StringTemplates.User", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "User", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "firstName", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "accountNumber", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "literalsInsideTemplateExpressions", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = true] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -732,7 +732,7 @@ | | +- Template[] | | +- TemplateFragment[@Content = "\"Welcome to your account\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "User"] | | +- VariableDeclarator[@Initializer = true, @Name = "user"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "user", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -742,7 +742,7 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Lisa", @Empty = false, @Image = "\"Lisa\"", @Length = 4, @LiteralText = "\"Lisa\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "12345", @IntLiteral = true, @Integral = true, @LiteralText = "12345", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 12345.0, @ValueAsFloat = 12345.0, @ValueAsInt = 12345, @ValueAsLong = 12345] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "s2"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -759,12 +759,12 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "emptyEmbeddedExpression", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassType[@FullyQualified = false, @SimpleName = "String"] +- VariableDeclarator[@Initializer = true, @Name = "s1"] +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep443_UnnamedPatternsAndVariables.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep443_UnnamedPatternsAndVariables.txt index 6429a5a730..7b39af7263 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep443_UnnamedPatternsAndVariables.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep443_UnnamedPatternsAndVariables.txt @@ -4,51 +4,51 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Queue", @ImportedSimpleName = "Queue", @PackageName = "java.util", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.stream.Collectors", @ImportedSimpleName = "Collectors", @PackageName = "java.util.stream", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables", @CanonicalName = "Jep443_UnamedPatternsAndVariables", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep443_UnamedPatternsAndVariables", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 19] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$Point", @CanonicalName = "Jep443_UnamedPatternsAndVariables.Point", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Point", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$Color", @CanonicalName = "Jep443_UnamedPatternsAndVariables.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 3, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "RED", @MethodName = "new", @Name = "RED", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "RED", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "GREEN", @MethodName = "new", @Name = "GREEN", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "GREEN", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$ColoredPoint", @CanonicalName = "Jep443_UnamedPatternsAndVariables.ColoredPoint", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "ColoredPoint", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unnamedPatterns1", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | +- VariableDeclarator[@Initializer = true, @Name = "r"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -71,11 +71,11 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -105,11 +105,11 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- UnnamedPattern[] @@ -126,45 +126,45 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " ", @Empty = false, @Image = "\" \"", @Length = 1, @LiteralText = "\" \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$Ball", @CanonicalName = "Jep443_UnamedPatternsAndVariables.Ball", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Ball", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{sealed, abstract}", @ExplicitModifiers = "{sealed, abstract}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT), @ExplicitModifiers = (JModifier.SEALED, JModifier.ABSTRACT)] | +- PermitsList[@Empty = false, @Size = 3] | | +- ClassType[@FullyQualified = false, @SimpleName = "RedBall"] | | +- ClassType[@FullyQualified = false, @SimpleName = "BlueBall"] | | +- ClassType[@FullyQualified = false, @SimpleName = "GreenBall"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$RedBall", @CanonicalName = "Jep443_UnamedPatternsAndVariables.RedBall", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "RedBall", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Ball"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$BlueBall", @CanonicalName = "Jep443_UnamedPatternsAndVariables.BlueBall", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "BlueBall", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Ball"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$GreenBall", @CanonicalName = "Jep443_UnamedPatternsAndVariables.GreenBall", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GreenBall", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Ball"] | +- ClassBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$Box", @CanonicalName = "Jep443_UnamedPatternsAndVariables.Box", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Box", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = true] | | +- ClassType[@FullyQualified = false, @SimpleName = "Ball"] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "content", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unnamedPatterns2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 5, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] @@ -186,7 +186,7 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "RedBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "processBox", @MethodName = "processBox", @ParenthesisDepth = 0, @Parenthesized = false] @@ -198,7 +198,7 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "BlueBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "processBox", @MethodName = "processBox", @ParenthesisDepth = 0, @Parenthesized = false] @@ -210,7 +210,7 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- PatternList[@Empty = false, @Size = 1] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "GreenBall"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "stopProcessing", @MethodName = "stopProcessing", @ParenthesisDepth = 0, @Parenthesized = false] @@ -223,14 +223,14 @@ | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | | +- PatternList[@Empty = false, @Size = 1] | | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "RedBall"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | | +- RecordPattern[] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "BlueBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "processBox", @MethodName = "processBox", @ParenthesisDepth = 0, @Parenthesized = false] @@ -242,7 +242,7 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "GreenBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "stopProcessing", @MethodName = "stopProcessing", @ParenthesisDepth = 0, @Parenthesized = false] @@ -256,7 +256,7 @@ | | +- MethodCall[@CompileTimeConstant = false, @Image = "pickAnotherBox", @MethodName = "pickAnotherBox", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -269,14 +269,14 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "RedBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- RecordPattern[] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "BlueBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -295,11 +295,11 @@ | +- MethodCall[@CompileTimeConstant = false, @Image = "pickAnotherBox", @MethodName = "pickAnotherBox", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "processBox", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] @@ -307,51 +307,51 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "stopProcessing", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "pickAnotherBox", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$Order", @CanonicalName = "Jep443_UnamedPatternsAndVariables.Order", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Order", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = true, @Size = 0] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "LIMIT"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "LIMIT", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LiteralText = "10", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "sideEffect", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unnamedVariables", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "List"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Order"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "orders", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 7, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "total"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "total", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- ForeachStatement[] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Order"] | | | +- VariableDeclarator[@Initializer = false, @Name = "_"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = true, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -377,7 +377,7 @@ | +- ForStatement[] | | +- ForInit[] | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "i"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = true, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -402,7 +402,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Queue"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] @@ -420,7 +420,7 @@ | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] | | +- Block[@Empty = false, @Size = 4, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -428,7 +428,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "y"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "y", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -436,7 +436,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -444,7 +444,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | +- VariableDeclarator[@Initializer = true, @Name = "p"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -461,28 +461,28 @@ | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] | +- Block[@Empty = false, @Size = 4, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | +- VariableDeclarator[@Initializer = true, @Name = "p"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -492,19 +492,19 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep443_UnamedPatternsAndVariables$ScopedContext", @CanonicalName = "Jep443_UnamedPatternsAndVariables.ScopedContext", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ScopedContext", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "AutoCloseable"] | +- ClassBody[@Empty = false, @Size = 2] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "close", @Overridden = true, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- Annotation[@SimpleName = "Override"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Override"] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "acquire", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "ScopedContext"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -513,7 +513,7 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "ScopedContext"] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unusedVariables2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 4, @containsComment = false] @@ -521,7 +521,7 @@ | +- ResourceList[@Empty = false, @Size = 1, @TrailingSemiColon = false] | | +- Resource[@ConciseResource = false, @StableName = "_"] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "acquire", @MethodName = "acquire", @ParenthesisDepth = 0, @Parenthesized = false] @@ -530,7 +530,7 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "s"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -538,7 +538,7 @@ +- TryStatement[@TryWithResources = false] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "i"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -556,7 +556,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | +- CatchClause[] | | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "_", @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "NumberFormatException"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -571,7 +571,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- CatchClause[] | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "_", @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Exception"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -603,6 +603,6 @@ +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] +- LambdaParameterList[@Empty = false, @Size = 1] | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "NO_DATA", @Empty = false, @Image = "\"NO_DATA\"", @Length = 7, @LiteralText = "\"NO_DATA\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses1.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses1.txt index 8bafb59ab5..4826a0bcb2 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses1.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses1.txt @@ -1,6 +1,6 @@ +- CompilationUnit[@PackageName = ""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses2.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses2.txt index 200582f309..95f5757567 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses2.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses2.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "greeting", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, World!", @Empty = false, @Image = "\"Hello, World!\"", @Length = 13, @LiteralText = "\"Hello, World!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses3.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses3.txt index aa91140674..66f34f82b4 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses3.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java21p/Jep445_UnnamedClasses3.txt @@ -1,12 +1,12 @@ +- CompilationUnit[@PackageName = ""] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "greeting"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "greeting", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, World!", @Empty = false, @Image = "\"Hello, World!\"", @Length = 13, @LiteralText = "\"Hello, World!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22/Jep456_UnnamedPatternsAndVariables.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22/Jep456_UnnamedPatternsAndVariables.txt index 3de46269b6..da6abec815 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22/Jep456_UnnamedPatternsAndVariables.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22/Jep456_UnnamedPatternsAndVariables.txt @@ -4,51 +4,51 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Queue", @ImportedSimpleName = "Queue", @PackageName = "java.util", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.stream.Collectors", @ImportedSimpleName = "Collectors", @PackageName = "java.util.stream", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables", @CanonicalName = "Jep456_UnamedPatternsAndVariables", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep456_UnamedPatternsAndVariables", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 19] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$Point", @CanonicalName = "Jep456_UnamedPatternsAndVariables.Point", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Point", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$Color", @CanonicalName = "Jep456_UnamedPatternsAndVariables.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- EnumBody[@Empty = false, @SeparatorSemi = false, @Size = 3, @TrailingComma = false] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "RED", @MethodName = "new", @Name = "RED", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "RED", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "GREEN", @MethodName = "new", @Name = "GREEN", @Visibility = Visibility.V_PUBLIC] - | | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "GREEN", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$ColoredPoint", @CanonicalName = "Jep456_UnamedPatternsAndVariables.ColoredPoint", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "ColoredPoint", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "c", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unnamedPatterns1", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | +- VariableDeclarator[@Initializer = true, @Name = "r"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "r", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -71,11 +71,11 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "ColoredPoint"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "p", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Color"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -105,11 +105,11 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | | +- PatternList[@Empty = false, @Size = 2] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "y", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- UnnamedPattern[] @@ -126,45 +126,45 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " ", @Empty = false, @Image = "\" \"", @Length = 1, @LiteralText = "\" \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = true, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$Ball", @CanonicalName = "Jep456_UnamedPatternsAndVariables.Ball", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Ball", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{sealed, abstract}", @ExplicitModifiers = "{sealed, abstract}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.SEALED, JModifier.ABSTRACT), @ExplicitModifiers = (JModifier.SEALED, JModifier.ABSTRACT)] | +- PermitsList[@Empty = false, @Size = 3] | | +- ClassType[@FullyQualified = false, @SimpleName = "RedBall"] | | +- ClassType[@FullyQualified = false, @SimpleName = "BlueBall"] | | +- ClassType[@FullyQualified = false, @SimpleName = "GreenBall"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$RedBall", @CanonicalName = "Jep456_UnamedPatternsAndVariables.RedBall", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "RedBall", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Ball"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$BlueBall", @CanonicalName = "Jep456_UnamedPatternsAndVariables.BlueBall", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "BlueBall", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Ball"] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$GreenBall", @CanonicalName = "Jep456_UnamedPatternsAndVariables.GreenBall", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GreenBall", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Ball"] | +- ClassBody[@Empty = true, @Size = 0] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$Box", @CanonicalName = "Jep456_UnamedPatternsAndVariables.Box", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Box", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- TypeParameters[@Empty = false, @Size = 1] | | +- TypeParameter[@Image = "T", @Name = "T", @TypeBound = true] | | +- ClassType[@FullyQualified = false, @SimpleName = "Ball"] | +- RecordComponentList[@Empty = false, @Size = 1, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "T"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "content", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unnamedPatterns2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 5, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] @@ -186,7 +186,7 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "RedBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "processBox", @MethodName = "processBox", @ParenthesisDepth = 0, @Parenthesized = false] @@ -198,7 +198,7 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "BlueBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "processBox", @MethodName = "processBox", @ParenthesisDepth = 0, @Parenthesized = false] @@ -210,7 +210,7 @@ | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- PatternList[@Empty = false, @Size = 1] | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "GreenBall"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "stopProcessing", @MethodName = "stopProcessing", @ParenthesisDepth = 0, @Parenthesized = false] @@ -223,14 +223,14 @@ | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | | +- PatternList[@Empty = false, @Size = 1] | | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | | +- ClassType[@FullyQualified = false, @SimpleName = "RedBall"] | | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | | +- RecordPattern[] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "BlueBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "processBox", @MethodName = "processBox", @ParenthesisDepth = 0, @Parenthesized = false] @@ -242,7 +242,7 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "GreenBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "stopProcessing", @MethodName = "stopProcessing", @ParenthesisDepth = 0, @Parenthesized = false] @@ -256,7 +256,7 @@ | | +- MethodCall[@CompileTimeConstant = false, @Image = "pickAnotherBox", @MethodName = "pickAnotherBox", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -269,14 +269,14 @@ | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "RedBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- RecordPattern[] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | | +- PatternList[@Empty = false, @Size = 1] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "BlueBall"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- Guard[] @@ -295,11 +295,11 @@ | +- MethodCall[@CompileTimeConstant = false, @Image = "pickAnotherBox", @MethodName = "pickAnotherBox", @ParenthesisDepth = 0, @Parenthesized = false] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "processBox", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Box"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- WildcardType[@LowerBound = false, @UpperBound = true] @@ -307,51 +307,51 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "b", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "stopProcessing", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "pickAnotherBox", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$Order", @CanonicalName = "Jep456_UnamedPatternsAndVariables.Order", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Order", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassBody[@Empty = true, @Size = 0] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PRIVATE, @Static = true, @Visibility = Visibility.V_PRIVATE] - | +- ModifierList[@EffectiveModifiers = "{private, static, final}", @ExplicitModifiers = "{private, static, final}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PRIVATE, JModifier.STATIC, JModifier.FINAL)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- VariableDeclarator[@Initializer = true, @Name = "LIMIT"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "LIMIT", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LiteralText = "10", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Name = "sideEffect", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- MethodDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unnamedVariables", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VoidType[] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "List"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Order"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "orders", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 7, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "total"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "total", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- ForeachStatement[] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Order"] | | | +- VariableDeclarator[@Initializer = false, @Name = "_"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = true, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -377,7 +377,7 @@ | +- ForStatement[] | | +- ForInit[] | | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "i"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = true, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -402,7 +402,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Queue"] | | | +- TypeArguments[@Diamond = false, @Empty = false, @Size = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Integer"] @@ -420,7 +420,7 @@ | | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] | | +- Block[@Empty = false, @Size = 4, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -428,7 +428,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "y"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "y", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -436,7 +436,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -444,7 +444,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | | +- VariableDeclarator[@Initializer = true, @Name = "p"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -461,28 +461,28 @@ | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "3", @IntLiteral = true, @Integral = true, @LiteralText = "3", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 3.0, @ValueAsFloat = 3.0, @ValueAsInt = 3, @ValueAsLong = 3] | +- Block[@Empty = false, @Size = 4, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "q", @Name = "q", @ParenthesisDepth = 0, @Parenthesized = false] | | +- ArgumentList[@Empty = true, @Size = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "Point"] | +- VariableDeclarator[@Initializer = true, @Name = "p"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "p", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -492,19 +492,19 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep456_UnamedPatternsAndVariables$ScopedContext", @CanonicalName = "Jep456_UnamedPatternsAndVariables.ScopedContext", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "ScopedContext", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ImplementsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "AutoCloseable"] | +- ClassBody[@Empty = false, @Size = 2] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "close", @Overridden = true, @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = true] - | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | | | +- Annotation[@SimpleName = "Override"] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Override"] | | +- VoidType[] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = true, @Size = 0, @containsComment = false] | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "acquire", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "ScopedContext"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -513,7 +513,7 @@ | +- ClassType[@FullyQualified = false, @SimpleName = "ScopedContext"] | +- ArgumentList[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "unusedVariables2", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 4, @containsComment = false] @@ -521,7 +521,7 @@ | +- ResourceList[@Empty = false, @Size = 1, @TrailingSemiColon = false] | | +- Resource[@ConciseResource = false, @StableName = "_"] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "_"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "acquire", @MethodName = "acquire", @ParenthesisDepth = 0, @Parenthesized = false] @@ -530,7 +530,7 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = true] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "s"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -538,7 +538,7 @@ +- TryStatement[@TryWithResources = false] | +- Block[@Empty = false, @Size = 2, @containsComment = false] | | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableDeclarator[@Initializer = true, @Name = "i"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -556,7 +556,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "i", @Name = "i", @ParenthesisDepth = 0, @Parenthesized = false] | +- CatchClause[] | | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "_", @Visibility = Visibility.V_PACKAGE] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "NumberFormatException"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -571,7 +571,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "s", @Name = "s", @ParenthesisDepth = 0, @Parenthesized = false] | +- CatchClause[] | +- CatchParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Multicatch = false, @Name = "_", @Visibility = Visibility.V_PACKAGE] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Exception"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = true, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -603,6 +603,6 @@ +- LambdaExpression[@Arity = 1, @BlockBody = false, @CompileTimeConstant = false, @ExpressionBody = true, @ParenthesisDepth = 0, @Parenthesized = false] +- LambdaParameterList[@Empty = false, @Size = 1] | +- LambdaParameter[@EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = true, @LocalVariable = false, @Name = "_", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_PACKAGE] +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "NO_DATA", @Empty = false, @Image = "\"NO_DATA\"", @Length = 7, @LiteralText = "\"NO_DATA\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep447_StatementsBeforeSuper.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep447_StatementsBeforeSuper.txt index aad782bbad..acd50b8006 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep447_StatementsBeforeSuper.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep447_StatementsBeforeSuper.txt @@ -5,27 +5,27 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.security.interfaces.DSAPublicKey", @ImportedSimpleName = "DSAPublicKey", @PackageName = "java.security.interfaces", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.security.interfaces.RSAKey", @ImportedSimpleName = "RSAKey", @PackageName = "java.security.interfaces", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper", @CanonicalName = "Jep447_StatementsBeforeSuper", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep447_StatementsBeforeSuper", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 9] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Old", @CanonicalName = "Jep447_StatementsBeforeSuper.Old", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Old", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Old", @Name = "Old", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = true, @This = false] | +- ArgumentList[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$PositiveBigInteger", @CanonicalName = "Jep447_StatementsBeforeSuper.PositiveBigInteger", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "PositiveBigInteger", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "BigInteger"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "PositiveBigInteger", @Name = "PositiveBigInteger", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.LONG] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "value", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 3, @containsComment = false] @@ -39,7 +39,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "non-positive value", @Empty = false, @Image = "\"non-positive value\"", @Length = 18, @LiteralText = "\"non-positive value\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "valueAsString"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "valueAsString", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -52,13 +52,13 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "valueAsString", @Name = "valueAsString", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Super", @CanonicalName = "Jep447_StatementsBeforeSuper.Super", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Super", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Super", @Name = "Super", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -66,20 +66,20 @@ | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "bytes", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Sub", @CanonicalName = "Jep447_StatementsBeforeSuper.Sub", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Sub", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Super"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Sub", @Name = "Sub", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Certificate"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "certificate", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 4, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "publicKey"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "publicKey", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- MethodCall[@CompileTimeConstant = false, @Image = "getPublicKey", @MethodName = "getPublicKey", @ParenthesisDepth = 0, @Parenthesized = false] @@ -95,7 +95,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "null certificate", @Empty = false, @Image = "\"null certificate\"", @Length = 16, @LiteralText = "\"null certificate\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = true, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] | | +- ArrayType[@ArrayDepth = 1] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -107,7 +107,7 @@ | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "RSAKey"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "rsaKey", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getBytes", @MethodName = "getBytes", @ParenthesisDepth = 0, @Parenthesized = false] @@ -121,7 +121,7 @@ | | +- SwitchArrowBranch[@Default = false] | | | +- SwitchLabel[@Default = false] | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] - | | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "DSAPublicKey"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "dsaKey", @PatternBinding = true, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getBytes", @MethodName = "getBytes", @ParenthesisDepth = 0, @Parenthesized = false] @@ -144,38 +144,38 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "byteArray", @Name = "byteArray", @ParenthesisDepth = 0, @Parenthesized = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$F", @CanonicalName = "Jep447_StatementsBeforeSuper.F", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "F", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = true, @Size = 0] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Super2", @CanonicalName = "Jep447_StatementsBeforeSuper.Super2", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Super2", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static}", @ExplicitModifiers = "{public, static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 2, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Super2", @Name = "Super2", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 2] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "F"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "f1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "F"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "f2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Sub2", @CanonicalName = "Jep447_StatementsBeforeSuper.Sub2", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Sub2", @Static = false, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- ExtendsList[@Empty = false, @Size = 1] | | +- ClassType[@FullyQualified = false, @SimpleName = "Super2"] | +- ClassBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Sub2", @Name = "Sub2", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = true] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "i", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = true] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- VariableDeclarator[@Initializer = true, @Name = "f"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "f", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = true, @Visibility = Visibility.V_LOCAL] | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] @@ -186,30 +186,30 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "f", @Name = "f", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Range", @CanonicalName = "Jep447_StatementsBeforeSuper.Range", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Range", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "lo", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "hi", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = false, @Size = 1] | +- ConstructorDeclaration[@Abstract = false, @Arity = 3, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "Range", @Name = "Range", @Static = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] | +- FormalParameters[@Empty = false, @Size = 3] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "lo", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "hi", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "maxDistance", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 3, @containsComment = false] @@ -251,22 +251,22 @@ | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] +- EnumDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep447_StatementsBeforeSuper$Color", @CanonicalName = "Jep447_StatementsBeforeSuper.Color", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = true, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Color", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] - +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{public}"] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = (JModifier.PUBLIC)] +- EnumBody[@Empty = false, @SeparatorSemi = true, @Size = 4, @TrailingComma = false] +- EnumConstant[@AnonymousClass = false, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "BLUE", @MethodName = "new", @Name = "BLUE", @Visibility = Visibility.V_PUBLIC] - | +- ModifierList[@EffectiveModifiers = "{public, static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = true, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "BLUE", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = true, @TypeInferred = true, @Visibility = Visibility.V_PUBLIC] | +- ArgumentList[@Empty = false, @Size = 1] | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "1", @IntLiteral = true, @Integral = true, @LiteralText = "1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 1.0, @ValueAsFloat = 1.0, @ValueAsInt = 1, @ValueAsLong = 1] +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Image = "Color", @Name = "Color", @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = true, @Size = 0, @containsComment = false] +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PRIVATE, @Final = false, @Image = "Color", @Name = "Color", @Static = false, @Varargs = false, @Visibility = Visibility.V_PRIVATE, @containsComment = false] - | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE), @ExplicitModifiers = (JModifier.PRIVATE)] | +- FormalParameters[@Empty = false, @Size = 1] | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = true, @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | +- Block[@Empty = false, @Size = 2, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep459_StringTemplates.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep459_StringTemplates.txt index c65df30abd..969a8c9b36 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep459_StringTemplates.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep459_StringTemplates.txt @@ -5,43 +5,43 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.time.format.DateTimeFormatter", @ImportedSimpleName = "DateTimeFormatter", @PackageName = "java.time.format", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.time.LocalTime", @ImportedSimpleName = "LocalTime", @PackageName = "java.time", @Static = false] +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep459_StringTemplates", @CanonicalName = "Jep459_StringTemplates", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep459_StringTemplates", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassBody[@Empty = false, @Size = 9] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep459_StringTemplates$Request", @CanonicalName = "Jep459_StringTemplates.Request", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Request", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 3, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "date", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "time", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "ipAddress", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "STRTemplateProcessor", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 19, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "firstName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "firstName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Bill", @Empty = false, @Image = "\"Bill\"", @Length = 4, @LiteralText = "\"Bill\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "lastName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "lastName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Duck", @Empty = false, @Image = "\"Duck\"", @Length = 4, @LiteralText = "\"Duck\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "fullName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "fullName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -54,7 +54,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lastName", @Name = "lastName", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "sortName"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "sortName", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -67,7 +67,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "firstName", @Name = "firstName", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "x"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -76,7 +76,7 @@ | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "y", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "20", @IntLiteral = true, @Integral = true, @LiteralText = "20", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 20.0, @ValueAsFloat = 20.0, @ValueAsInt = 20, @ValueAsLong = 20] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -93,7 +93,7 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "y", @Name = "y", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s2"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -105,7 +105,7 @@ | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- TemplateFragment[@Content = "} waiting for you!\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "Request"] | | +- VariableDeclarator[@Initializer = true, @Name = "req"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "req", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -116,7 +116,7 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "15:34", @Empty = false, @Image = "\"15:34\"", @Length = 5, @LiteralText = "\"15:34\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "8.8.8.8", @Empty = false, @Image = "\"8.8.8.8\"", @Length = 7, @LiteralText = "\"8.8.8.8\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "t"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "t", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -134,13 +134,13 @@ | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "req", @Name = "req", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "filePath"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "filePath", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "tmp.dat", @Empty = false, @Image = "\"tmp.dat\"", @Length = 7, @LiteralText = "\"tmp.dat\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "File"] | | +- VariableDeclarator[@Initializer = true, @Name = "file"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "file", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -149,7 +149,7 @@ | | +- ArgumentList[@Empty = false, @Size = 1] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "filePath", @Name = "filePath", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "old"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "old", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -168,7 +168,7 @@ | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "does not", @Empty = false, @Image = "\"does not\"", @Length = 8, @LiteralText = "\"does not\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = " exist", @Empty = false, @Image = "\" exist\"", @Length = 6, @LiteralText = "\" exist\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "msg"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "msg", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -186,7 +186,7 @@ | | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "does not", @Empty = false, @Image = "\"does not\"", @Length = 8, @LiteralText = "\"does not\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- TemplateFragment[@Content = "} exist\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "time"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "time", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -207,13 +207,13 @@ | | | +- ArgumentList[@Empty = true, @Size = 0] | | +- TemplateFragment[@Content = "} right now\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableDeclarator[@Initializer = true, @Name = "index"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "index", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LiteralText = "0", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "data"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "data", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -234,7 +234,7 @@ | | | +- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "index", @Name = "index", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -246,7 +246,7 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "oranges", @Empty = false, @Image = "\"oranges\"", @Length = 7, @LiteralText = "\"oranges\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "peaches", @Empty = false, @Image = "\"peaches\"", @Length = 7, @LiteralText = "\"peaches\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s3"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s3", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -272,7 +272,7 @@ | | | +- TemplateFragment[@Content = "}\""] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "s4"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s4", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -298,31 +298,31 @@ | | +- TemplateFragment[@Content = "}\""] | +- TemplateFragment[@Content = "}\""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "getOfferType", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "_getOfferType_", @Empty = false, @Image = "\"_getOfferType_\"", @Length = 14, @LiteralText = "\"_getOfferType_\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "multilineTemplateExpressions", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 10, @containsComment = true] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "title"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "title", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "My Web Page", @Empty = false, @Image = "\"My Web Page\"", @Length = 11, @LiteralText = "\"My Web Page\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "text"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "text", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, world", @Empty = false, @Image = "\"Hello, world\"", @Length = 12, @LiteralText = "\"Hello, world\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "html"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "html", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -335,25 +335,25 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "text", @Name = "text", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}

\n \n \n \"\"\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "name"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "name", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Joan Smith", @Empty = false, @Image = "\"Joan Smith\"", @Length = 10, @LiteralText = "\"Joan Smith\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "phone"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "phone", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "555-123-4567", @Empty = false, @Image = "\"555-123-4567\"", @Length = 12, @LiteralText = "\"555-123-4567\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "address"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "address", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "1 Maple Drive, Anytown", @Empty = false, @Image = "\"1 Maple Drive, Anytown\"", @Length = 22, @LiteralText = "\"1 Maple Drive, Anytown\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "json"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "json", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -369,23 +369,23 @@ | | +- TemplateFragment[@Content = "}\"\n }\n \"\"\""] | +- LocalClassStatement[] | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep459_StringTemplates$1Rectangle", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Rectangle", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- RecordComponentList[@Empty = false, @Size = 3, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "name", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "width", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "height", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = false, @Size = 1] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Name = "area", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -394,7 +394,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "width", @Name = "width", @ParenthesisDepth = 0, @Parenthesized = false] | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "height", @Name = "height", @ParenthesisDepth = 0, @Parenthesized = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -426,7 +426,7 @@ | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "7.1", @IntLiteral = false, @Integral = false, @LiteralText = "7.1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.1, @ValueAsFloat = 7.1, @ValueAsInt = 7, @ValueAsLong = 7] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "11.23", @IntLiteral = false, @Integral = false, @LiteralText = "11.23", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 11.23, @ValueAsFloat = 11.23, @ValueAsInt = 11, @ValueAsLong = 11] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "table"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "table", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -516,29 +516,29 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\n \"\"\""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "FMTTemplateProcessor", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 4, @containsComment = true] | +- LocalClassStatement[] | | +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep459_StringTemplates$2Rectangle", @CanonicalName = null, @EffectiveVisibility = Visibility.V_LOCAL, @Enum = false, @Final = true, @Interface = false, @Local = true, @Nested = false, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "Rectangle", @Static = true, @TopLevel = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | | +- RecordComponentList[@Empty = false, @Size = 3, @Varargs = false] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "name", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "width", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | | +- RecordComponent[@EffectiveVisibility = Visibility.V_LOCAL, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "height", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordBody[@Empty = false, @Size = 1] | | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Name = "area", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.DOUBLE] | | +- FormalParameters[@Empty = true, @Size = 0] | | +- Block[@Empty = false, @Size = 1, @containsComment = false] @@ -548,7 +548,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "height", @Name = "height", @ParenthesisDepth = 0, @Parenthesized = false] | +- EmptyStatement[] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ArrayType[@ArrayDepth = 1] | | | +- ClassType[@FullyQualified = false, @SimpleName = "Rectangle"] | | | +- ArrayDimensions[@Empty = false, @Size = 1] @@ -580,7 +580,7 @@ | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "7.1", @IntLiteral = false, @Integral = false, @LiteralText = "7.1", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 7.1, @ValueAsFloat = 7.1, @ValueAsInt = 7, @ValueAsLong = 7] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = true, @FloatLiteral = false, @Image = "11.23", @IntLiteral = false, @Integral = false, @LiteralText = "11.23", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 11.23, @ValueAsFloat = 11.23, @ValueAsInt = 11, @ValueAsLong = 11] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "table"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "table", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -675,18 +675,18 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\n \"\"\""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "ensuringSafety", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "name"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "name", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Joan", @Empty = false, @Image = "\"Joan\"", @Length = 4, @LiteralText = "\"Joan\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "StringTemplate"] | | +- VariableDeclarator[@Initializer = true, @Name = "st"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "st", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -697,7 +697,7 @@ | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "name", @Name = "name", @ParenthesisDepth = 0, @Parenthesized = false] | | +- TemplateFragment[@Content = "}\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "info"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "info", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -706,24 +706,24 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "st", @Name = "st", @ParenthesisDepth = 0, @Parenthesized = false] +- RecordDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep459_StringTemplates$User", @CanonicalName = "Jep459_StringTemplates.User", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = true, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = true, @RegularClass = false, @RegularInterface = false, @SimpleName = "User", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{static, final}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC, JModifier.FINAL), @ExplicitModifiers = ()] | +- RecordComponentList[@Empty = false, @Size = 2, @Varargs = false] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "firstName", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] - | | +- ModifierList[@EffectiveModifiers = "{private, final}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (JModifier.PRIVATE, JModifier.FINAL), @ExplicitModifiers = ()] | | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PRIVATE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "accountNumber", @PatternBinding = false, @RecordComponent = true, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PRIVATE] | +- RecordBody[@Empty = true, @Size = 0] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "literalsInsideTemplateExpressions", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - | +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + | +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] | +- VoidType[] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 3, @containsComment = true] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = true, @Name = "s1"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -732,7 +732,7 @@ | | +- Template[] | | +- TemplateFragment[@Content = "\"Welcome to your account\""] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | | +- ClassType[@FullyQualified = false, @SimpleName = "User"] | | +- VariableDeclarator[@Initializer = true, @Name = "user"] | | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "user", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -742,7 +742,7 @@ | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Lisa", @Empty = false, @Image = "\"Lisa\"", @Length = 4, @LiteralText = "\"Lisa\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] | | +- NumericLiteral[@Base = 10, @CompileTimeConstant = true, @DoubleLiteral = false, @FloatLiteral = false, @Image = "12345", @IntLiteral = true, @Integral = true, @LiteralText = "12345", @LongLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @ValueAsDouble = 12345.0, @ValueAsFloat = 12345.0, @ValueAsInt = 12345, @ValueAsLong = 12345] | +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "s2"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s2", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] @@ -759,12 +759,12 @@ | | +- ArgumentList[@Empty = true, @Size = 0] | +- TemplateFragment[@Content = "}\""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "emptyEmbeddedExpression", @Overridden = false, @Static = true, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{static}", @ExplicitModifiers = "{static}"] + +- ModifierList[@EffectiveModifiers = (JModifier.STATIC), @ExplicitModifiers = (JModifier.STATIC)] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] +- LocalVariableDeclaration[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- ClassType[@FullyQualified = false, @SimpleName = "String"] +- VariableDeclarator[@Initializer = true, @Name = "s1"] +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "s1", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_LOCAL] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses1.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses1.txt index 8bafb59ab5..4826a0bcb2 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses1.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses1.txt @@ -1,6 +1,6 @@ +- CompilationUnit[@PackageName = ""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses2.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses2.txt index 200582f309..95f5757567 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses2.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses2.txt @@ -1,13 +1,13 @@ +- CompilationUnit[@PackageName = ""] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "greeting", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = false] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- FormalParameters[@Empty = true, @Size = 0] | +- Block[@Empty = false, @Size = 1, @containsComment = false] | +- ReturnStatement[] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, World!", @Empty = false, @Image = "\"Hello, World!\"", @Length = 13, @LiteralText = "\"Hello, World!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses3.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses3.txt index aa91140674..66f34f82b4 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses3.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses3.txt @@ -1,12 +1,12 @@ +- CompilationUnit[@PackageName = ""] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "greeting"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "greeting", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "Hello, World!", @Empty = false, @Image = "\"Hello, World!\"", @Length = 13, @LiteralText = "\"Hello, World!\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses4WithImports.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses4WithImports.txt index bca2c8a46c..5b20d948df 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses4WithImports.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java22p/Jep463_UnnamedClasses4WithImports.txt @@ -2,7 +2,7 @@ +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.Arrays", @ImportedSimpleName = "Arrays", @PackageName = "java.util", @Static = false] +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.stream.Collectors", @ImportedSimpleName = "Collectors", @PackageName = "java.util.stream", @Static = false] +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] - | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] | +- ClassType[@FullyQualified = false, @SimpleName = "String"] | +- VariableDeclarator[@Initializer = true, @Name = "greeting"] | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "greeting", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Visibility = Visibility.V_PACKAGE] @@ -22,7 +22,7 @@ | +- ArgumentList[@Empty = false, @Size = 1] | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = ", ", @Empty = false, @Image = "\", \"", @Length = 2, @LiteralText = "\", \"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @MainMethod = true, @Name = "main", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] - +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] +- VoidType[] +- FormalParameters[@Empty = true, @Size = 0] +- Block[@Empty = false, @Size = 1, @containsComment = false] From 62443a4c339eba94adf1d941b4b591e283a61355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 02:12:24 -0300 Subject: [PATCH 15/56] Update tree export test --- .../net/sourceforge/pmd/cli/TreeExportCliTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pmd-cli/src/test/java/net/sourceforge/pmd/cli/TreeExportCliTest.java b/pmd-cli/src/test/java/net/sourceforge/pmd/cli/TreeExportCliTest.java index f446439516..6e7ba26db4 100644 --- a/pmd-cli/src/test/java/net/sourceforge/pmd/cli/TreeExportCliTest.java +++ b/pmd-cli/src/test/java/net/sourceforge/pmd/cli/TreeExportCliTest.java @@ -31,9 +31,9 @@ class TreeExportCliTest extends BaseCliTest { final CliExecutionResult output = runCliSuccessfully("-i", "-f", "xml", "-PlineSeparator=LF"); output.checkStdOut(equalTo("\n" - + "\n" - + " \n" - + " \n" + + "\n" + + " \n" + + " \n" + " \n" + "\n")); }); @@ -44,9 +44,9 @@ class TreeExportCliTest extends BaseCliTest { File file = newFileWithContents("(a(b))"); final CliExecutionResult result = runCliSuccessfully("--file", file.getAbsolutePath(), "-f", "xml", "-PlineSeparator=LF"); result.checkStdOut(equalTo("\n" - + "\n" - + " \n" - + " \n" + + "\n" + + " \n" + + " \n" + " \n" + "\n")); } From 1231a54300c086d65932e7b70540ebe8e38607fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 08:56:48 -0300 Subject: [PATCH 16/56] Remove unsused imports --- .../sourceforge/pmd/lang/java/JavaAttributesPrinter.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/JavaAttributesPrinter.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/JavaAttributesPrinter.java index 9353eb5336..bb93d65c76 100644 --- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/JavaAttributesPrinter.java +++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/JavaAttributesPrinter.java @@ -4,17 +4,11 @@ package net.sourceforge.pmd.lang.java; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - import org.checkerframework.checker.nullness.qual.NonNull; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTExpression; import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration; -import net.sourceforge.pmd.lang.java.ast.ASTModifierList; -import net.sourceforge.pmd.lang.java.ast.JModifier; import net.sourceforge.pmd.lang.java.ast.ModifierOwner; import net.sourceforge.pmd.lang.rule.xpath.Attribute; import net.sourceforge.pmd.lang.test.ast.RelevantAttributePrinter; From 346d7fd0dcde6398e55673bd4abe52c25c1d488b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 09:02:16 -0300 Subject: [PATCH 17/56] Do not warn for List being deprecated by default --- .../net/sourceforge/pmd/lang/rule/xpath/Attribute.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/Attribute.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/Attribute.java index 3b032e558f..54edbcb3d9 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/Attribute.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/Attribute.java @@ -106,16 +106,11 @@ public final class Attribute { return null; } else { DeprecatedAttribute annot = method.getAnnotation(DeprecatedAttribute.class); - String result = annot != null + return annot != null ? annot.replaceWith() : method.isAnnotationPresent(Deprecated.class) ? DeprecatedAttribute.NO_REPLACEMENT : null; - if (result == null && List.class.isAssignableFrom(method.getReturnType())) { - // Lists are generally deprecated, see #2451 - result = DeprecatedAttribute.NO_REPLACEMENT; - } - return result; } } From 3650622645f70b358aecbbb5f8482e232abae4a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 19 Apr 2024 09:08:21 -0300 Subject: [PATCH 18/56] Remove unused imports --- .../main/java/net/sourceforge/pmd/lang/rule/xpath/Attribute.java | 1 - 1 file changed, 1 deletion(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/Attribute.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/Attribute.java index 54edbcb3d9..3bf41f5f4e 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/Attribute.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/Attribute.java @@ -7,7 +7,6 @@ package net.sourceforge.pmd.lang.rule.xpath; import java.lang.invoke.MethodHandle; import java.lang.reflect.Method; import java.lang.reflect.Type; -import java.util.List; import java.util.Objects; import org.checkerframework.checker.nullness.qual.NonNull; From b510f77a7951550de434a26a2230badcd58efaa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sat, 27 Apr 2024 20:47:21 -0300 Subject: [PATCH 19/56] Add failing test for #4980 --- .../pmd/lang/java/types/TypeGenerationUtil.kt | 1 + .../internal/infer/PolyResolutionTest.kt | 28 +++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TypeGenerationUtil.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TypeGenerationUtil.kt index 69260414da..145be6f6b4 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TypeGenerationUtil.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TypeGenerationUtil.kt @@ -145,6 +145,7 @@ class RefTypeConstants(override val ts: TypeSystem) : TypeDslMixin { val `t_Enum{E}`: JClassType get() = java.lang.Enum::class.decl val t_Stream: JClassType get() = java.util.stream.Stream::class.raw + val `t_Stream{Number}`: JClassType get() = java.util.stream.Stream::class[t_Number] val t_Function: JClassType get() = java.util.function.Function::class.raw val t_Map: JClassType get() = java.util.Map::class.raw val t_MapEntry: JClassType get() = java.util.Map.Entry::class.raw diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt index 6405b99afb..99618ae017 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt @@ -5,10 +5,10 @@ package net.sourceforge.pmd.lang.java.types.internal.infer -import net.sourceforge.pmd.lang.test.ast.shouldBe -import net.sourceforge.pmd.lang.test.ast.shouldMatchN import net.sourceforge.pmd.lang.java.ast.* import net.sourceforge.pmd.lang.java.types.* +import net.sourceforge.pmd.lang.test.ast.shouldBe +import net.sourceforge.pmd.lang.test.ast.shouldMatchN import java.io.BufferedOutputStream import java.io.DataOutputStream import java.io.OutputStream @@ -21,7 +21,6 @@ import java.io.OutputStream */ class PolyResolutionTest : ProcessorTestSpec({ - parserTest("Test context passing overcomes null lower bound") { val (acu, spy) = parser.parseWithTypeInferenceSpy(""" @@ -373,4 +372,27 @@ class Scratch { lambda3 shouldHaveType Runnable::class.decl } } + + parserTest("Test inference with varargs - bug #4980") { + + val (acu, spy) = parser.parseWithTypeInferenceSpy(""" + import java.util.stream.Stream; + + class Foo { + public T foo() { + return null; + } + + public Stream bar() { + return Stream.of(foo()); + } + } + """) + + val call = acu.firstMethodCall() + + spy.shouldBeOk { + call shouldHaveType gen.`t_Stream{Number}` + } + } }) From 0a7a52f228a5c8ec95ac3fa4f394d1a518db8a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sat, 27 Apr 2024 20:50:13 -0300 Subject: [PATCH 20/56] Fix issue #4980 - When an applicability test fails (ie: during LUB) we don't want that to bubble up and fail the process, simply to discard the candidate and move forward. If no matching candidate is found, the inference will fail anyway. --- .../pmd/lang/java/types/internal/infer/Infer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java index 595bf77921..0330717e04 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java @@ -577,7 +577,12 @@ public final class Infer { // we only test it can reduce, we don't commit inferred types at this stage InferenceContext ctxCopy = infCtx.copy(); LOG.applicabilityTest(ctxCopy, m); - ctxCopy.solve(/*onlyBoundedVars:*/isPreJava8()); + try { + ctxCopy.solve(/*onlyBoundedVars:*/isPreJava8()); + } catch (ResolutionFailedException | IllegalArgumentException ignored) { + // applicability test failed for this candidate, but continue with others + return null; + } // if unchecked conversion was needed, update the site for invocation pass if (ctxCopy.needsUncheckedConversion()) { From 6ab54e1afb44436c7f21f4333544729f5bf9084a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sat, 27 Apr 2024 20:56:27 -0300 Subject: [PATCH 21/56] Make the code actually valid --- .../pmd/lang/java/types/internal/infer/PolyResolutionTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt index 99618ae017..17d131376a 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt @@ -48,7 +48,7 @@ class PolyResolutionTest : ProcessorTestSpec({ static T id(T t) { return t; } - { + void foo(int x) { id(x > 0 ? Double.POSITIVE_INFINITY : x < 0 ? Double.NEGATIVE_INFINITY : Double.NaN); From d2e0826ed81e4b9eb905d9055ad900564ffb92bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sat, 27 Apr 2024 21:19:57 -0300 Subject: [PATCH 22/56] Improve implementation - throw an apropriate ResolutionFailedException so we don't loose the message - handle any exception so we don't couple tightly into the LUB implementation --- .../pmd/lang/java/types/internal/infer/Infer.java | 4 ++-- .../internal/infer/ResolutionFailedException.java | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java index 0330717e04..763342539d 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java @@ -579,9 +579,9 @@ public final class Infer { LOG.applicabilityTest(ctxCopy, m); try { ctxCopy.solve(/*onlyBoundedVars:*/isPreJava8()); - } catch (ResolutionFailedException | IllegalArgumentException ignored) { + } catch (Throwable e) { // applicability test failed for this candidate, but continue with others - return null; + throw ResolutionFailedException.fromThrowable(LOG, e); } // if unchecked conversion was needed, update the site for invocation pass diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java index b955129c56..0e98d18c74 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java @@ -55,6 +55,17 @@ final class ResolutionFailedException extends RuntimeException { // If the logger is noop we don't even create the failure. // These failures are extremely frequent (and normal), and type pretty-printing is expensive + static ResolutionFailedException fromThrowable(TypeInferenceLogger logger, Throwable t) { + if (t instanceof ResolutionFailedException) { + return (ResolutionFailedException) t; + } + + return getShared(logger.isNoop() ? UNKNOWN : new ResolutionFailure( + null, + t.getMessage() + )); + } + static ResolutionFailedException incompatibleBound(TypeInferenceLogger logger, InferenceVar ivar, BoundKind k1, JTypeMirror b1, BoundKind k2, JTypeMirror b2) { // in javac it's "no instance of type variables exist ..." return getShared(logger.isNoop() ? UNKNOWN : new ResolutionFailure( From a77519399e8286336da439c0bc5efe54e64a4085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sat, 27 Apr 2024 21:23:01 -0300 Subject: [PATCH 23/56] Update changelog, refs #4980 --- docs/pages/release_notes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 2a0c2c81f0..b6d3b0edc1 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -16,6 +16,8 @@ This is a {{ site.pmd.release_type }} release. ### 🐛 Fixed Issues +* java + * [#4980](https://github.com/pmd/pmd/issues/4980): \[java] Bad intersection, unrelated class types java.lang.Object\[] and java.lang.Number * java-bestpractices * [#4278](https://github.com/pmd/pmd/issues/4278): \[java] UnusedPrivateMethod FP with Junit 5 @MethodSource and default factory method name * [#4975](https://github.com/pmd/pmd/issues/4975): \[java] UnusedPrivateMethod false positive when using @MethodSource on a @Nested test From 42cf1b568d18789571e7c40f0f0fd2511d2bca03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sun, 28 Apr 2024 00:17:44 -0300 Subject: [PATCH 24/56] Don't use Throwable --- .../pmd/lang/java/types/internal/infer/Infer.java | 4 ++-- .../types/internal/infer/ResolutionFailedException.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java index 763342539d..6de215c6d2 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java @@ -579,9 +579,9 @@ public final class Infer { LOG.applicabilityTest(ctxCopy, m); try { ctxCopy.solve(/*onlyBoundedVars:*/isPreJava8()); - } catch (Throwable e) { + } catch (Exception e) { // applicability test failed for this candidate, but continue with others - throw ResolutionFailedException.fromThrowable(LOG, e); + throw ResolutionFailedException.fromException(LOG, e); } // if unchecked conversion was needed, update the site for invocation pass diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java index 0e98d18c74..4ea2c0aa97 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java @@ -55,14 +55,14 @@ final class ResolutionFailedException extends RuntimeException { // If the logger is noop we don't even create the failure. // These failures are extremely frequent (and normal), and type pretty-printing is expensive - static ResolutionFailedException fromThrowable(TypeInferenceLogger logger, Throwable t) { - if (t instanceof ResolutionFailedException) { - return (ResolutionFailedException) t; + static ResolutionFailedException fromException(TypeInferenceLogger logger, Exception e) { + if (e instanceof ResolutionFailedException) { + return (ResolutionFailedException) e; } return getShared(logger.isNoop() ? UNKNOWN : new ResolutionFailure( null, - t.getMessage() + e.getMessage() )); } From 28c5cd71146e68518e9f48fb91462659d1b6ae7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sun, 28 Apr 2024 12:18:36 -0300 Subject: [PATCH 25/56] Remove `@Names` attribute from ASTReferenceExpression --- .../lang/apex/ast/ASTReferenceExpression.java | 3 +++ .../pmd/lang/apex/ast/InnerClassLocations.txt | 8 +++--- .../lang/apex/ast/SafeNavigationOperator.txt | 26 +++++++++---------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.java index dbf9e887ec..22378be985 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.java @@ -7,6 +7,8 @@ package net.sourceforge.pmd.lang.apex.ast; import java.util.List; import java.util.stream.Collectors; +import net.sourceforge.pmd.lang.rule.xpath.NoAttribute; + import com.google.summit.ast.Identifier; public final class ASTReferenceExpression extends AbstractApexNode.Many { @@ -38,6 +40,7 @@ public final class ASTReferenceExpression extends AbstractApexNode.Many getNames() { return nodes.stream().map(Identifier::getString).collect(Collectors.toList()); } diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt index 095e8b8803..4f71b48450 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/InnerClassLocations.txt @@ -8,11 +8,11 @@ | +- BlockStatement[@CurlyBrace = true, @DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar1", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @Names = ("System", "out"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar1", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] | +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar1", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar1", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @Names = ("System", "out"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar1", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar1", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +- UserClass[@DefiningType = "InnerClassLocations.bar2", @Image = "bar2", @InterfaceNames = (), @RealLoc = true, @SimpleName = "bar2", @SuperClassName = ""] +- ModifierNode[@Abstract = false, @DefiningType = "InnerClassLocations.bar2", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] @@ -21,9 +21,9 @@ +- BlockStatement[@CurlyBrace = true, @DefiningType = "InnerClassLocations.bar2", @RealLoc = true] +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar2", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar2", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @Names = ("System", "out"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar2", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] +- ExpressionStatement[@DefiningType = "InnerClassLocations.bar2", @RealLoc = true] +- MethodCallExpression[@DefiningType = "InnerClassLocations.bar2", @FullMethodName = "System.out.println", @InputParametersSize = 1, @MethodName = "println", @RealLoc = true] - +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @Names = ("System", "out"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + +- ReferenceExpression[@DefiningType = "InnerClassLocations.bar2", @Image = "System", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] +- LiteralExpression[@Boolean = false, @Decimal = false, @DefiningType = "InnerClassLocations.bar2", @Double = false, @Image = "foo", @Integer = false, @LiteralType = LiteralType.STRING, @Long = false, @Name = null, @Null = false, @RealLoc = true, @String = true] diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt index 226b07f37a..d044128082 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/ast/SafeNavigationOperator.txt @@ -9,7 +9,7 @@ | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- FieldDeclaration[@DefiningType = "Foo", @Image = "x", @Name = "x", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "anIntegerField", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "anObject", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "x", @RealLoc = true] @@ -18,9 +18,9 @@ | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- FieldDeclaration[@DefiningType = "Foo", @Image = "profileUrl", @Name = "profileUrl", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "toExternalForm", @InputParametersSize = 0, @MethodName = "toExternalForm", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "user.getProfileUrl", @InputParametersSize = 0, @MethodName = "getProfileUrl", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "user", @Names = ("user"), @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "user", @RealLoc = true, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "profileUrl", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- Method[@Arity = 1, @CanonicalName = "bar1", @Constructor = false, @DefiningType = "Foo", @Image = "bar1", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] @@ -30,15 +30,15 @@ | +- BlockStatement[@CurlyBrace = true, @DefiningType = "Foo", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "b", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "c1", @InputParametersSize = 0, @MethodName = "c1", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | +- CastExpression[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "b1", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "a1", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- Method[@Arity = 2, @CanonicalName = "bar2", @Constructor = false, @DefiningType = "Foo", @Image = "bar2", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false] @@ -50,9 +50,9 @@ | +- BlockStatement[@CurlyBrace = true, @DefiningType = "Foo", @RealLoc = true] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "aField", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] | | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "aMethod", @InputParametersSize = 0, @MethodName = "aMethod", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = true] | | +- ArrayLoadExpression[@DefiningType = "Foo", @RealLoc = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] @@ -60,9 +60,9 @@ | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] | +- ExpressionStatement[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "aField", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | +- MethodCallExpression[@DefiningType = "Foo", @FullMethodName = "aMethod", @InputParametersSize = 0, @MethodName = "aMethod", @RealLoc = true] - | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] + | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.METHOD, @SObjectType = false, @SafeNav = false] | +- ArrayLoadExpression[@DefiningType = "Foo", @RealLoc = true] | +- VariableExpression[@DefiningType = "Foo", @Image = "a", @RealLoc = true] | | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] @@ -77,14 +77,14 @@ | +- ModifierNode[@Abstract = false, @DefiningType = "Foo", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false] | +- VariableDeclaration[@DefiningType = "Foo", @Image = "s", @RealLoc = true, @Type = "String"] | +- VariableExpression[@DefiningType = "Foo", @Image = "BillingCity", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] | | +- VariableExpression[@DefiningType = "Foo", @Image = "Account", @RealLoc = true] - | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "contact", @Names = ("contact"), @RealLoc = true, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] + | | +- ReferenceExpression[@DefiningType = "Foo", @Image = "contact", @RealLoc = true, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = false] | +- VariableExpression[@DefiningType = "Foo", @Image = "s", @RealLoc = true] | +- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false] +- ReturnStatement[@DefiningType = "Foo", @RealLoc = true] +- VariableExpression[@DefiningType = "Foo", @Image = "Name", @RealLoc = true] - +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @Names = (), @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] + +- ReferenceExpression[@DefiningType = "Foo", @Image = "", @RealLoc = false, @ReferenceType = ReferenceType.LOAD, @SObjectType = false, @SafeNav = true] +- SoqlExpression[@CanonicalQuery = "SELECT Name FROM Account WHERE Id = :tmpVar1", @DefiningType = "Foo", @Query = "SELECT Name FROM Account WHERE Id = :accId", @RealLoc = true] +- BindExpressions[@DefiningType = "Foo", @RealLoc = true] +- VariableExpression[@DefiningType = "Foo", @Image = "accId", @RealLoc = true] From 56f12d41ea2fc86181fa031db7cc400d36efe3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sun, 28 Apr 2024 12:19:32 -0300 Subject: [PATCH 26/56] Update docs/pages/release_notes.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Fournier --- docs/pages/release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index ab2d0ab991..3d9784465e 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -21,7 +21,7 @@ Up to now, all AST node getters would be exposed to XPath, as long as the return Since this release, PMD will also expose any getter returning a collection of any supported type as a sequence through an XPath attribute. They would require to use apropriate XQuery functions to manipulate the sequence. So for instance, to detect any given `ASTUserClass` that implements `Queueable`, it is now possible to write: ```xml -/UserClass[not(empty(index-of(@InterfaceNames, 'Queueable')))] +/UserClass[@InterfaceNames = 'Queueable'] ``` ### ✨ New rules From 11e6cc53c54867329d2a03db66201f14bdfe9984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sun, 28 Apr 2024 12:23:56 -0300 Subject: [PATCH 27/56] Update docs on writing xpath rules --- .../userdocs/extending/writing_xpath_rules.md | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/docs/pages/pmd/userdocs/extending/writing_xpath_rules.md b/docs/pages/pmd/userdocs/extending/writing_xpath_rules.md index 6518dcdcbc..d2d0d1505b 100644 --- a/docs/pages/pmd/userdocs/extending/writing_xpath_rules.md +++ b/docs/pages/pmd/userdocs/extending/writing_xpath_rules.md @@ -49,23 +49,21 @@ To represent attributes, we must map Java values to [XPath Data Model (XDM)](htt values. In the following table we refer to the type conversion function as `conv`, a function from Java types to XDM types. -| Java type `T` | XSD type `conv(T)` | -|---------------|---------------------------------------| -| `int` | `xs:integer` | -| `long` | `xs:integer` | -| `double` | `xs:decimal` | -| `float` | `xs:decimal` | -| `boolean` | `xs:boolean` | -| `String` | `xs:string` | -| `Character` | `xs:string` | -| `Enum` | `xs:string` (uses `Object::toString`) | -| `List` | `conv(E)*` (a sequence type) | +| Java type `T` | XSD type `conv(T)` | +|-------------------|---------------------------------------| +| `int` | `xs:integer` | +| `long` | `xs:integer` | +| `double` | `xs:decimal` | +| `float` | `xs:decimal` | +| `boolean` | `xs:boolean` | +| `String` | `xs:string` | +| `Character` | `xs:string` | +| `Enum` | `xs:string` (uses `Object::toString`) | +| `Collection` | `conv(E)*` (a sequence type) | The same `conv` function is used to translate rule property values to XDM values. -{% include warning.html content="Lists are only supported for rule properties, not attributes." %} - - +Additionaly, PMD's own `net.sourceforge.pmd.lang.document.Chars` is also translated to a `xs:string` ## Rule properties From 124f908ca8dbfc5755943107fe6657a2d0aaed33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sun, 28 Apr 2024 12:36:57 -0300 Subject: [PATCH 28/56] Properly log when the impossible happens --- .../pmd/lang/rule/xpath/impl/AttributeAxisIterator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java index 4337f25a13..01c1642aa7 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java @@ -132,8 +132,8 @@ public class AttributeAxisIterator implements Iterator { try { Class elementKlass = Class.forName(((ParameterizedType) t).getActualTypeArguments()[0].getTypeName()); return CONSIDERED_RETURN_TYPES.contains(elementKlass) || elementKlass.isEnum(); - } catch (ClassNotFoundException ignored) { - // should never happen + } catch (ClassNotFoundException e) { + throw AssertionUtil.shouldNotReachHere("Method '" + method + "' should return a known type, but: " + e, e); } } } From fbb4648efc5340d22a2d080b13694b446ecb9942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sun, 28 Apr 2024 12:37:42 -0300 Subject: [PATCH 29/56] Update pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Fournier --- .../pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java | 1 + 1 file changed, 1 insertion(+) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java index d854f4e9d6..083a2ec9d3 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java @@ -264,6 +264,7 @@ public class SaxonXPathRuleQuery { StaticContextWithProperties(Configuration config) { super(config); + // This statement is necessary for Saxon to support sequence-valued attributes getPackageData().setSchemaAware(true); } From 458405e02d575786cd66fa6c939158c37d48bb09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sun, 28 Apr 2024 12:43:30 -0300 Subject: [PATCH 30/56] Use spaces --- .../pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java index 083a2ec9d3..4ebf18c108 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/SaxonXPathRuleQuery.java @@ -264,7 +264,7 @@ public class SaxonXPathRuleQuery { StaticContextWithProperties(Configuration config) { super(config); - // This statement is necessary for Saxon to support sequence-valued attributes + // This statement is necessary for Saxon to support sequence-valued attributes getPackageData().setSchemaAware(true); } From 4bb533b6254df09c640b8b66e8a34a4b1fbc4655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Sun, 28 Apr 2024 13:13:29 -0300 Subject: [PATCH 31/56] Ignore type variables --- .../pmd/lang/rule/xpath/impl/AttributeAxisIterator.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java index 01c1642aa7..001e32572c 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/impl/AttributeAxisIterator.java @@ -15,6 +15,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; @@ -130,8 +131,12 @@ public class AttributeAxisIterator implements Iterator { Type t = method.getGenericReturnType(); if (t instanceof ParameterizedType) { try { - Class elementKlass = Class.forName(((ParameterizedType) t).getActualTypeArguments()[0].getTypeName()); - return CONSIDERED_RETURN_TYPES.contains(elementKlass) || elementKlass.isEnum(); + // ignore type variables, such as List… we could check all bounds, but probably it's overkill + Type actualTypeArgument = ((ParameterizedType) t).getActualTypeArguments()[0]; + if (!TypeVariable.class.isAssignableFrom(actualTypeArgument.getClass())) { + Class elementKlass = Class.forName(actualTypeArgument.getTypeName()); + return CONSIDERED_RETURN_TYPES.contains(elementKlass) || elementKlass.isEnum(); + } } catch (ClassNotFoundException e) { throw AssertionUtil.shouldNotReachHere("Method '" + method + "' should return a known type, but: " + e, e); } From 8c708b2193b8d34ae09e1d1ddb401d7f7275c2f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 29 Apr 2024 20:35:48 +0200 Subject: [PATCH 32/56] Check upper bound compatibility during incorporation --- .../internal/infer/IncorporationAction.java | 66 ++++++++++++++++++- .../lang/java/types/internal/infer/Infer.java | 7 +- .../internal/infer/InferenceContext.java | 4 ++ .../types/internal/infer/InferenceVar.java | 2 +- .../internal/infer/PolyResolutionTest.kt | 3 - 5 files changed, 70 insertions(+), 12 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java index 1224569c13..ab467fcce5 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java @@ -9,6 +9,8 @@ import static net.sourceforge.pmd.lang.java.types.TypeOps.isConvertible; import java.util.ArrayList; import java.util.Set; +import net.sourceforge.pmd.lang.java.symbols.JClassSymbol; +import net.sourceforge.pmd.lang.java.symbols.JTypeDeclSymbol; import net.sourceforge.pmd.lang.java.types.InternalApiBridge; import net.sourceforge.pmd.lang.java.types.JTypeMirror; import net.sourceforge.pmd.lang.java.types.TypeOps.Convertibility; @@ -36,6 +38,66 @@ abstract class IncorporationAction { abstract void apply(InferenceContext ctx); + /** + * Check that an upper bound with a class (not interface) or array + * is compatible with other upper bounds of class or array type. + * This is necessary to guarantee the existence of a glb for these, + * for {@link ReductionStep#UPPER}. + * + *

If the bound is {@code alpha <: T}, then we must check + * that {@code S <: T} or {@code T <: S} holds for all bounds + * {@code alpha <: S}, where S is a class or array type. Otherwise, + * the GLB does not exist. + */ + static class CheckClassUpperBound extends IncorporationAction { + + private final JTypeMirror myBound; + + CheckClassUpperBound(InferenceVar ivar, JTypeMirror bound) { + super(ivar); + this.myBound = bound; + } + + public static boolean needsCheck(BoundKind kind, JTypeMirror bound) { + if (kind == BoundKind.UPPER) { + JTypeDeclSymbol symbol = bound.getSymbol(); + return symbol instanceof JClassSymbol && !symbol.isInterface(); + } + return false; + } + + + @Override + public void apply(InferenceContext ctx) { + for (BoundKind k : BoundKind.EQ_UPPER) { + for (JTypeMirror b : ivar.getBounds(k)) { + if (!checkBound(b, ctx)) { + throw ResolutionFailedException.incompatibleBound(ctx.logger, ivar, BoundKind.UPPER, myBound, k, b); + } + } + } + } + + private boolean checkBound(JTypeMirror otherBound, InferenceContext ctx) { + + JTypeDeclSymbol sym = otherBound.getSymbol(); + // either the bound is not a concrete class or array type + return !(sym instanceof JClassSymbol) || sym.isInterface() + // or both bounds are related in some way + || CheckBound.checkBound(false, otherBound, myBound, ctx) + || CheckBound.checkBound(false, myBound, otherBound, ctx); + + } + + + @Override + public String toString() { + return "Check class bound " + BoundKind.UPPER.format(ivar, myBound); + } + + + } + /** * Check that a bound is compatible with the other current bounds * of an ivar. @@ -97,13 +159,13 @@ abstract class IncorporationAction { /** * If 'eq', checks that {@code T = S}, else checks that {@code T <: S}. */ - boolean checkBound(boolean eq, JTypeMirror t, JTypeMirror s, InferenceContext ctx) { + static boolean checkBound(boolean eq, JTypeMirror t, JTypeMirror s, InferenceContext ctx) { // eq bounds are so rare we shouldn't care if they're cached return eq ? InternalApiBridge.isSameTypeInInference(t, s) : checkSubtype(t, s, ctx); } - private boolean checkSubtype(JTypeMirror t, JTypeMirror s, InferenceContext ctx) { + private static boolean checkSubtype(JTypeMirror t, JTypeMirror s, InferenceContext ctx) { if (ctx.getSupertypeCheckCache().isCertainlyASubtype(t, s)) { return true; // supertype was already cached } diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java index 6de215c6d2..595bf77921 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/Infer.java @@ -577,12 +577,7 @@ public final class Infer { // we only test it can reduce, we don't commit inferred types at this stage InferenceContext ctxCopy = infCtx.copy(); LOG.applicabilityTest(ctxCopy, m); - try { - ctxCopy.solve(/*onlyBoundedVars:*/isPreJava8()); - } catch (Exception e) { - // applicability test failed for this candidate, but continue with others - throw ResolutionFailedException.fromException(LOG, e); - } + ctxCopy.solve(/*onlyBoundedVars:*/isPreJava8()); // if unchecked conversion was needed, update the site for invocation pass if (ctxCopy.needsUncheckedConversion()) { diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceContext.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceContext.java index 4a979dec0e..12698d1d5c 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceContext.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceContext.java @@ -33,6 +33,7 @@ import net.sourceforge.pmd.lang.java.types.TypeOps; import net.sourceforge.pmd.lang.java.types.TypeSystem; import net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror.InvocationMirror.MethodCtDecl; import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.CheckBound; +import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.CheckClassUpperBound; import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.PropagateAllBounds; import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.PropagateBounds; import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.SubstituteInst; @@ -388,6 +389,9 @@ final class InferenceContext { incorporationActions.add(new CheckBound(ivar, kind, bound)); incorporationActions.add(new PropagateBounds(ivar, kind, bound)); + if (CheckClassUpperBound.needsCheck(kind, bound)) { + incorporationActions.add(new CheckClassUpperBound(ivar, bound)); + } } } diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceVar.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceVar.java index dafbd5f4b1..c36c10a74e 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceVar.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceVar.java @@ -304,7 +304,7 @@ public final class InferenceVar implements JTypeMirror, SubstVar { // These sets are shared because otherwise *literal millions* of enumsets are created, with the same constants static final Set ALL = EnumSet.allOf(BoundKind.class); static final Set EQ_LOWER = EnumSet.of(EQ, LOWER); - private static final Set EQ_UPPER = EnumSet.of(EQ, UPPER); + static final Set EQ_UPPER = EnumSet.of(EQ, UPPER); private static final Set JUST_EQ = Collections.singleton(EQ); private final String sym; diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt index 17d131376a..c8cd940c47 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt @@ -15,9 +15,6 @@ import java.io.OutputStream /** * Expensive test cases for the overload resolution phase. - * - * Edit: So those used to be very expensive (think minutes of execution), - * but optimisations made them very fast. */ class PolyResolutionTest : ProcessorTestSpec({ From 6700b47b12e5e8196f675cd777e17c6cc01a8b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Mon, 29 Apr 2024 16:03:14 -0300 Subject: [PATCH 33/56] Remove unused code --- .../internal/infer/ResolutionFailedException.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java index 4ea2c0aa97..b955129c56 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java @@ -55,17 +55,6 @@ final class ResolutionFailedException extends RuntimeException { // If the logger is noop we don't even create the failure. // These failures are extremely frequent (and normal), and type pretty-printing is expensive - static ResolutionFailedException fromException(TypeInferenceLogger logger, Exception e) { - if (e instanceof ResolutionFailedException) { - return (ResolutionFailedException) e; - } - - return getShared(logger.isNoop() ? UNKNOWN : new ResolutionFailure( - null, - e.getMessage() - )); - } - static ResolutionFailedException incompatibleBound(TypeInferenceLogger logger, InferenceVar ivar, BoundKind k1, JTypeMirror b1, BoundKind k2, JTypeMirror b2) { // in javac it's "no instance of type variables exist ..." return getShared(logger.isNoop() ? UNKNOWN : new ResolutionFailure( From b1aaf5d69bbfe2ee7309f676d2309a6883fda6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Tue, 30 Apr 2024 11:21:15 +0200 Subject: [PATCH 34/56] Fix conc mod exceptions during incorporation --- .../pmd/lang/java/types/TypeOps.java | 84 ++++++++++--------- .../internal/infer/IncorporationAction.java | 84 ++++++------------- .../internal/infer/InferenceContext.java | 4 - .../lang/java/types/TestUtilitiesForTypes.kt | 2 +- .../internal/infer/PolyResolutionTest.kt | 21 +++++ 5 files changed, 91 insertions(+), 104 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java index 56c563ddf0..c0c84e0ca0 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java @@ -398,11 +398,17 @@ public final class TypeOps { public static Convertibility isConvertible(@NonNull JTypeMirror t, @NonNull JTypeMirror s) { - return isConvertible(t, s, true); + return isConvertible(t, s, true, false); } + @Deprecated // unused public static Convertibility isConvertibleNoCapture(@NonNull JTypeMirror t, @NonNull JTypeMirror s) { - return isConvertible(t, s, false); + return isConvertible(t, s, false, false); + } + + // does not perform side effects on inference vars + public static Convertibility isConvertiblePure(JTypeMirror t, JTypeMirror s) { + return isConvertible(t, s, true, true); } /** @@ -414,7 +420,7 @@ public final class TypeOps { * @param t A type T * @param s A type S */ - public static Convertibility isConvertible(@NonNull JTypeMirror t, @NonNull JTypeMirror s, boolean capture) { + public static Convertibility isConvertible(@NonNull JTypeMirror t, @NonNull JTypeMirror s, boolean capture, boolean pure) { // This is commented out as it makes JTypeMirror#isSubtypeOf partial, // which is not nice for the API... But this assert caught a bug and // should probably be enabled. @@ -428,15 +434,17 @@ public final class TypeOps { } else if (s.isVoid() || t.isVoid()) { // t != s return Convertibility.NEVER; } else if (s instanceof InferenceVar) { - // it's possible to add a bound to UNKNOWN or ERROR - ((InferenceVar) s).addBound(BoundKind.LOWER, t); + if (!pure) { + // it's possible to add a bound to UNKNOWN or ERROR + ((InferenceVar) s).addBound(BoundKind.LOWER, t); + } return Convertibility.SUBTYPING; } else if (isTypeRange(s)) { // If s is a type range L..U, // then showing t <: s is the same thing as t <: L JTypeMirror lower = lowerBoundRec(s); if (!lower.isBottom()) { - return isConvertible(t, lower, capture); + return isConvertible(t, lower, capture, pure); } // otherwise fallthrough } else if (isSpecialUnresolved(t)) { @@ -447,7 +455,7 @@ public final class TypeOps { // subtypes of (nearly) anything. This allows them to // pass bound checks on type variables. if (Objects.equals(t.getSymbol(), s.getSymbol())) { - return typeArgsAreContained((JClassType) t, (JClassType) s); + return typeArgsAreContained((JClassType) t, (JClassType) s, pure); } else { return Convertibility.subtypeIf(s instanceof JClassType); // excludes array or so } @@ -455,24 +463,14 @@ public final class TypeOps { // If S is an intersection, then T must conform to *all* bounds of S // Symmetrically, if T is an intersection, T <: S requires only that // at least one bound of T is a subtype of S. - return Convertibility.subtypesAll(t, asList(s)); + return Convertibility.subtypesAll(t, asList(s), pure); } if (capture) { t = capture(t); } - return t.acceptVisitor(SubtypeVisitor.INSTANCE, s); - } - - // does not perform side effects on inference vars - private static Convertibility isSubtypePure(JTypeMirror t, JTypeMirror s) { - if (t instanceof InferenceVar) { - return Convertibility.subtypeIf(((InferenceVar) t).isSubtypeNoSideEffect(s)); - } else if (s instanceof InferenceVar) { - return Convertibility.subtypeIf(((InferenceVar) s).isSupertypeNoSideEffect(t)); - } - - return isConvertible(t, s); + SubtypeVisitor visitor = pure ? SubtypeVisitor.PURE : SubtypeVisitor.INSTANCE; + return t.acceptVisitor(visitor, s); } public static boolean allArgsAreUnboundedWildcards(List sargs) { @@ -601,10 +599,10 @@ public final class TypeOps { return b ? SUBTYPING : NEVER; } - static Convertibility subtypesAll(JTypeMirror t, Iterable supers) { + static Convertibility subtypesAll(JTypeMirror t, Iterable supers, boolean pure) { Convertibility result = SUBTYPING; for (JTypeMirror ui : supers) { - Convertibility sub = isConvertible(t, ui); + Convertibility sub = isConvertible(t, ui, true, pure); if (sub == NEVER) { return NEVER; } @@ -613,10 +611,10 @@ public final class TypeOps { return result; } - static Convertibility anySubTypesAny(Iterable us, Iterable vs) { + static Convertibility anySubTypesAny(Iterable us, Iterable vs, boolean pure) { for (JTypeMirror ui : us) { for (JTypeMirror vi : vs) { - Convertibility sub = isConvertible(ui, vi); + Convertibility sub = isConvertible(ui, vi, true, pure); if (sub != NEVER) { return sub.and(SUBTYPING); // never return identity here } @@ -680,7 +678,7 @@ public final class TypeOps { * *

Defined in JLS§4.5.1 (Type Arguments of Parameterized Types) */ - static Convertibility typeArgContains(JTypeMirror s, JTypeMirror t) { + static Convertibility typeArgContains(JTypeMirror s, JTypeMirror t, boolean pure) { // the contains relation can be understood intuitively if we // represent types as ranges on a line: @@ -698,7 +696,7 @@ public final class TypeOps { // ⊥ -------U(T)-----U(S)------> Object (L(T) = L(S) = ⊥) // ⊥ -------L(S)-----L(T)------> Object (U(T) = U(S) = Object) - if (isSameTypeInInference(s, t)) { + if (isSameType(s, t, !pure, false)) { // S <= S return Convertibility.SUBTYPING; } @@ -714,10 +712,10 @@ public final class TypeOps { if (sw.isUpperBound()) { // Test U(T) <: U(S), we already know L(S) <: L(T), because L(S) is bottom - return isConvertible(wildUpperBound(t), sw.asUpperBound()); + return isConvertible(wildUpperBound(t), sw.asUpperBound(), pure, false); } else { // Test L(S) <: L(T), we already know U(T) <: U(S), because U(S) is top - return isConvertible(sw.asLowerBound(), wildLowerBound(t)); + return isConvertible(sw.asLowerBound(), wildLowerBound(t), pure, false); } } @@ -728,7 +726,7 @@ public final class TypeOps { /** * Generalises containment to check if for each i, {@code Ti <= Si}. */ - static Convertibility typeArgsAreContained(JClassType t, JClassType s) { + static Convertibility typeArgsAreContained(JClassType t, JClassType s, boolean pure) { List targs = t.getTypeArgs(); List sargs = s.getTypeArgs(); @@ -763,7 +761,7 @@ public final class TypeOps { Convertibility result = Convertibility.SUBTYPING; for (int i = 0; i < targs.size(); i++) { - Convertibility sub = typeArgContains(sargs.get(i), targs.get(i)); + Convertibility sub = typeArgContains(sargs.get(i), targs.get(i), pure); if (sub == Convertibility.NEVER) { return Convertibility.NEVER; } @@ -775,7 +773,13 @@ public final class TypeOps { private static final class SubtypeVisitor implements JTypeVisitor { - static final SubtypeVisitor INSTANCE = new SubtypeVisitor(); + static final SubtypeVisitor INSTANCE = new SubtypeVisitor(false); + static final SubtypeVisitor PURE = new SubtypeVisitor(true); + private final boolean pure; + + private SubtypeVisitor(boolean pure) { + this.pure = pure; + } @Override public Convertibility visit(JTypeMirror t, JTypeMirror s) { @@ -788,9 +792,9 @@ public final class TypeOps { return Convertibility.SUBTYPING; } if (isTypeRange(s)) { - return isConvertible(t, lowerBoundRec(s)); + return isConvertible(t, lowerBoundRec(s), true, pure); } - return isConvertible(t.getUpperBound(), s); + return isConvertible(t.getUpperBound(), s, true, pure); } @Override @@ -810,8 +814,10 @@ public final class TypeOps { if (s == t.getTypeSystem().NULL_TYPE || s instanceof JPrimitiveType) { return Convertibility.NEVER; } - // here we add a constraint on the variable - t.addBound(BoundKind.UPPER, s); + if (!pure) { + // here we add a constraint on the variable + t.addBound(BoundKind.UPPER, s); + } return Convertibility.SUBTYPING; } @@ -840,7 +846,7 @@ public final class TypeOps { // a raw type C is a supertype for all the family of parameterized type generated by C return Convertibility.SUBTYPING; } else { - return typeArgsAreContained(superDecl, cs); + return typeArgsAreContained(superDecl, cs, pure); } } @@ -864,7 +870,7 @@ public final class TypeOps { // what we mean is, if S is an intersection, then // "any component of T subtypes any component of S" - return Convertibility.anySubTypesAny(t.getComponents(), asList(s)); + return Convertibility.anySubTypesAny(t.getComponents(), asList(s), pure); } @Override @@ -885,7 +891,7 @@ public final class TypeOps { // arrays of primitive types have no sub-/ supertype return Convertibility.subtypeIf(cs.getComponentType() == t.getComponentType()); } else { - return isConvertible(t.getComponentType(), cs.getComponentType()); + return isConvertible(t.getComponentType(), cs.getComponentType(), true, pure); } } @@ -1739,7 +1745,7 @@ public final class TypeOps { for (JTypeMirror v : set) { for (JTypeMirror w : set) { if (!w.equals(v) && !hasUnresolvedSymbol(w)) { - Convertibility isConvertible = isSubtypePure(w, v); + Convertibility isConvertible = isConvertiblePure(w, v); if (isConvertible.bySubtyping() // This last case covers unchecked conversion. It is made antisymmetric by the // test for a symbol. eg |G| <~> G so it would fail. diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java index ab467fcce5..dfda211282 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java @@ -13,6 +13,7 @@ import net.sourceforge.pmd.lang.java.symbols.JClassSymbol; import net.sourceforge.pmd.lang.java.symbols.JTypeDeclSymbol; import net.sourceforge.pmd.lang.java.types.InternalApiBridge; import net.sourceforge.pmd.lang.java.types.JTypeMirror; +import net.sourceforge.pmd.lang.java.types.TypeOps; import net.sourceforge.pmd.lang.java.types.TypeOps.Convertibility; import net.sourceforge.pmd.lang.java.types.internal.infer.InferenceVar.BoundKind; @@ -38,66 +39,6 @@ abstract class IncorporationAction { abstract void apply(InferenceContext ctx); - /** - * Check that an upper bound with a class (not interface) or array - * is compatible with other upper bounds of class or array type. - * This is necessary to guarantee the existence of a glb for these, - * for {@link ReductionStep#UPPER}. - * - *

If the bound is {@code alpha <: T}, then we must check - * that {@code S <: T} or {@code T <: S} holds for all bounds - * {@code alpha <: S}, where S is a class or array type. Otherwise, - * the GLB does not exist. - */ - static class CheckClassUpperBound extends IncorporationAction { - - private final JTypeMirror myBound; - - CheckClassUpperBound(InferenceVar ivar, JTypeMirror bound) { - super(ivar); - this.myBound = bound; - } - - public static boolean needsCheck(BoundKind kind, JTypeMirror bound) { - if (kind == BoundKind.UPPER) { - JTypeDeclSymbol symbol = bound.getSymbol(); - return symbol instanceof JClassSymbol && !symbol.isInterface(); - } - return false; - } - - - @Override - public void apply(InferenceContext ctx) { - for (BoundKind k : BoundKind.EQ_UPPER) { - for (JTypeMirror b : ivar.getBounds(k)) { - if (!checkBound(b, ctx)) { - throw ResolutionFailedException.incompatibleBound(ctx.logger, ivar, BoundKind.UPPER, myBound, k, b); - } - } - } - } - - private boolean checkBound(JTypeMirror otherBound, InferenceContext ctx) { - - JTypeDeclSymbol sym = otherBound.getSymbol(); - // either the bound is not a concrete class or array type - return !(sym instanceof JClassSymbol) || sym.isInterface() - // or both bounds are related in some way - || CheckBound.checkBound(false, otherBound, myBound, ctx) - || CheckBound.checkBound(false, myBound, otherBound, ctx); - - } - - - @Override - public String toString() { - return "Check class bound " + BoundKind.UPPER.format(ivar, myBound); - } - - - } - /** * Check that a bound is compatible with the other current bounds * of an ivar. @@ -113,6 +54,11 @@ abstract class IncorporationAction { this.myBound = bound; } + public static boolean isClassType(JTypeMirror bound) { + JTypeDeclSymbol symbol = bound.getSymbol(); + return symbol instanceof JClassSymbol && !symbol.isInterface(); + } + /** * The list of bound kinds to be checked. If the new bound is * equality, then all other bounds need to be checked. Otherwise, @@ -132,8 +78,26 @@ abstract class IncorporationAction { } } } + + if (myKind == BoundKind.UPPER && isClassType(myBound)) { + // Check that other upper bounds that are class types are related to this bound. + // Otherwise, GLB does not exist and its construction would fail during ReductionStep#UPPER. + for (JTypeMirror otherBound : ivar.getBounds(BoundKind.UPPER)) { + if (otherBound != myBound && isClassType(otherBound)) { + // Since we are testing both directions we cannot let those tests add bounds on the ivars, + // because they could be contradictory. + boolean areRelated = TypeOps.isConvertiblePure(myBound, otherBound).somehow() + || TypeOps.isConvertiblePure(otherBound, myBound).somehow(); + + if (!areRelated) { + throw ResolutionFailedException.incompatibleBound(ctx.logger, ivar, myKind, myBound, BoundKind.UPPER, otherBound); + } + } + } + } } + /** * Check compatibility between this bound and another. */ diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceContext.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceContext.java index 12698d1d5c..4a979dec0e 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceContext.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceContext.java @@ -33,7 +33,6 @@ import net.sourceforge.pmd.lang.java.types.TypeOps; import net.sourceforge.pmd.lang.java.types.TypeSystem; import net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror.InvocationMirror.MethodCtDecl; import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.CheckBound; -import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.CheckClassUpperBound; import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.PropagateAllBounds; import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.PropagateBounds; import net.sourceforge.pmd.lang.java.types.internal.infer.IncorporationAction.SubstituteInst; @@ -389,9 +388,6 @@ final class InferenceContext { incorporationActions.add(new CheckBound(ivar, kind, bound)); incorporationActions.add(new PropagateBounds(ivar, kind, bound)); - if (CheckClassUpperBound.needsCheck(kind, bound)) { - incorporationActions.add(new CheckClassUpperBound(ivar, bound)); - } } } diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TestUtilitiesForTypes.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TestUtilitiesForTypes.kt index af662f19e1..2cd3888ae8 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TestUtilitiesForTypes.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TestUtilitiesForTypes.kt @@ -168,7 +168,7 @@ fun assertSubtypeOrdering(vararg ts: JTypeMirror) { fun JClassType.parameterize(m1: JTypeMirror, vararg mirror: JTypeMirror): JClassType = withTypeArguments(listOf(m1, *mirror)) fun assertSubtype(t: JTypeMirror, s: JTypeMirror, capture: Boolean = true, passes: Convertibility.() -> Boolean) { - val res = isConvertible(t, s, capture) + val res = isConvertible(t, s, capture, true) assertTrue("$t \n\t\t<: $s") { res.passes() } diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt index c8cd940c47..cfdc9d9f1d 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/internal/infer/PolyResolutionTest.kt @@ -392,4 +392,25 @@ class Scratch { call shouldHaveType gen.`t_Stream{Number}` } } + + parserTest("Test bound checks does not throw concurrent mod exception") { + + val (acu, spy) = parser.parseWithTypeInferenceSpy(""" + import java.util.stream.Stream; + class Enum> {} + class EnumSet> { + public static > EnumSet noneOf(Class elementType) { + Enum[] universe = getUniverse(elementType); + } + private static > U[] getUniverse(Class elementType) {} + } + """) + + val call = acu.firstMethodCall() + val xVar = acu.typeVar("X") + + spy.shouldBeOk { + call shouldHaveType xVar.toArray() + } + } }) From 895cfbf266e11e37d4832f6d80a4f97730f88547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Thu, 2 May 2024 13:05:04 -0300 Subject: [PATCH 35/56] Update docs/pages/release_notes.md Co-authored-by: Andreas Dangel --- docs/pages/release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 31376368ca..48fcdb3745 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -18,7 +18,7 @@ This is a {{ site.pmd.release_type }} release. Up to now, all AST node getters would be exposed to XPath, as long as the return type was a primitive (boxed or unboxed), String or Enum. That meant that collections, even of these basic types, were not exposed, so for instance accessing Apex's `ASTUserClass.getInterfaceNames()` to list the interfaces implemented by a class was impossible from XPath, and would require writing a Java rule to check it. -Since this release, PMD will also expose any getter returning a collection of any supported type as a sequence through an XPath attribute. They would require to use apropriate XQuery functions to manipulate the sequence. So for instance, to detect any given `ASTUserClass` that implements `Queueable`, it is now possible to write: +Since this release, PMD will also expose any getter returning a collection of any supported type as a sequence through an XPath attribute. They would require to use apropriate XQuery functions to manipulate the sequence. So for instance, to detect any given `ASTUserClass` in Apex that implements `Queueable`, it is now possible to write: ```xml /UserClass[@InterfaceNames = 'Queueable'] From 6fd230e7aa69378f7a784d788c0529c683b3c292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Thu, 2 May 2024 13:05:17 -0300 Subject: [PATCH 36/56] Update docs/pages/release_notes.md Co-authored-by: Andreas Dangel --- docs/pages/release_notes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 48fcdb3745..e3a92cbf6b 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -25,7 +25,8 @@ Since this release, PMD will also expose any getter returning a collection of an ``` ### 🐛 Fixed Issues - +* core + * [#4467](https://github.com/pmd/pmd/issues/4467): \[core] Expose collections from getters as XPath sequence attributes * java-bestpractices * [#4278](https://github.com/pmd/pmd/issues/4278): \[java] UnusedPrivateMethod FP with Junit 5 @MethodSource and default factory method name * [#4975](https://github.com/pmd/pmd/issues/4975): \[java] UnusedPrivateMethod false positive when using @MethodSource on a @Nested test From 199591bbd81056d440ade3f5bbbf2e6c8476d4ed Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 3 May 2024 19:47:22 +0200 Subject: [PATCH 37/56] [doc] Update about PMD sections Refs #4842 --- README.md | 22 ++++++++++------------ docs/index.md | 20 +++++++++++++++----- pom.xml | 18 ++++++++++-------- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 43c3df58a1..f0749994fa 100644 --- a/README.md +++ b/README.md @@ -11,22 +11,20 @@ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md) [![Documentation (latest)](https://img.shields.io/badge/docs-latest-green)](https://docs.pmd-code.org/latest/) -**PMD** is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, -unnecessary object creation, and so forth. It supports many languages. It can be extended with custom rules. -It uses JavaCC and Antlr to parse source files into abstract syntax trees (AST) and runs rules against them to find violations. -Rules can be written in Java or using a XPath query. +**PMD** is an extensible multilanguage static code analyzer. It finds common programming flaws like unused variables, +empty catch blocks, unnecessary object creation, and so forth. It's mainly concerned with **Java and +Apex**, but **supports 16 other languages**. It comes with **400+ built-in rules**. It can be +extended with custom rules. It uses JavaCC and Antlr to parse source files into abstract syntax trees +(AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query. -It supports Java, JavaScript, Salesforce.com Apex and Visualforce, -Modelica, PLSQL, Apache Velocity, HTML, XML and XSL. +Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce, +Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL. Scala is supported, but there are currently no Scala rules available. Additionally, it includes **CPD**, the copy-paste-detector. CPD finds duplicated code in -C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Kotlin, Lua, Matlab, Modelica, -Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and Visualforce, Scala, Swift, T-SQL, -Apache Velocity, and XML. - -In the future we hope to add support for data/control flow analysis and automatic (quick) fixes where -it makes sense. +Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin, +Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and +Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL. ## 🚀 Installation and Usage diff --git a/docs/index.md b/docs/index.md index 2a9eb9fed0..3bafc43f4d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,10 +24,20 @@ additional_js: -**PMD** is a static source code analyzer. It finds common programming flaws like -unused variables, empty catch blocks, unnecessary object creation, and -so forth. It's mainly concerned with **Java and Apex**, but **supports 16 other -languages**. +**PMD** is an extensible multilanguage static code analyzer. It finds common programming flaws like unused variables, +empty catch blocks, unnecessary object creation, and so forth. It's mainly concerned with **Java and +Apex**, but **supports 16 other languages**. It comes with **400+ built-in rules**. It can be +extended with custom rules. It uses JavaCC and Antlr to parse source files into abstract syntax trees +(AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query. + +Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce, +Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL. +Scala is supported, but there are currently no Scala rules available. + +Additionally, it includes **CPD**, the copy-paste-detector. CPD finds duplicated code in +Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin, +Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and +Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL. PMD features many **built-in checks** (in PMD lingo, *rules*), which are documented for each language in our [Rule references](#shuffle-panel-rule-references). We @@ -43,7 +53,7 @@ things, PMD can be run: * As a [bld operation](pmd_userdocs_tools_bld.html) * From [command-line](pmd_userdocs_installation.html#running-pmd-via-command-line) -**CPD**, the **copy-paste detector**, is also distributed with PMD. You can also use it +**CPD**, the **copy-paste detector**, is also distributed with PMD. You can use it in a variety of ways, which are [documented here](pmd_userdocs_cpd.html). ## 💾 Download diff --git a/pom.xml b/pom.xml index 11d7bef738..f3bab7a3e4 100644 --- a/pom.xml +++ b/pom.xml @@ -8,18 +8,20 @@ PMD - PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, - unnecessary object creation, and so forth. It supports many languages. It can be extended with custom rules. - It uses JavaCC and Antlr to parse source files into abstract syntax trees (AST) and runs rules against them to find violations. - Rules can be written in Java or using a XPath query. + PMD is an extensible multilanguage static code analyzer. It finds common programming flaws like unused variables, + empty catch blocks, unnecessary object creation, and so forth. It's mainly concerned with Java and + Apex, but supports 16 other languages. It comes with 400+ built-in rules. It can be + extended with custom rules. It uses JavaCC and Antlr to parse source files into abstract syntax trees + (AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query. - It supports Java, JavaScript, Salesforce.com Apex and Visualforce, - Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, HTML, XML and XSL. + Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce, + Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL. Scala is supported, but there are currently no Scala rules available. Additionally, it includes CPD, the copy-paste-detector. CPD finds duplicated code in - Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin, Lua, Matlab, Modelica, - Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and Visualforce, Scala, Swift, T-SQL, Typescript and XML. + Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin, + Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and + Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL. https://pmd.github.io/ From 516b305e502d075ce3c3f4d5a12977606934ed0a Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 3 May 2024 19:57:57 +0200 Subject: [PATCH 38/56] [doc] Fix links in README.md [skip ci] --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f0749994fa..a08c66d76c 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ [![Join the chat](https://img.shields.io/gitter/room/pmd/pmd)](https://app.gitter.im/#/room/#pmd_pmd:gitter.im?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://github.com/pmd/pmd/workflows/build/badge.svg?branch=master)](https://github.com/pmd/pmd/actions) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd) -[![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green?labelColor=blue)](https://github.com/jvm-repo-rebuild/reproducible-central#net.sourceforge.pmd:pmd) +[![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green?labelColor=blue)](https://github.com/jvm-repo-rebuild/reproducible-central/tree/master/content/net/sourceforge/pmd#readme) [![Coverage Status](https://coveralls.io/repos/github/pmd/pmd/badge.svg)](https://coveralls.io/github/pmd/pmd) -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ea550046a02344ec850553476c4aa2ca)](https://www.codacy.com/gh/pmd/pmd/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pmd/pmd&utm_campaign=Badge_Grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ea550046a02344ec850553476c4aa2ca)](https://app.codacy.com/organizations/gh/pmd/dashboard) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md) [![Documentation (latest)](https://img.shields.io/badge/docs-latest-green)](https://docs.pmd-code.org/latest/) From ef19659cb67ed087878c1d860df7b009c82855d5 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 3 May 2024 20:26:05 +0200 Subject: [PATCH 39/56] [ci] Only run PMD twice instead of three times during build pmd:check executes implicitly pmd:pmd, but with the default configuration. For execution "pmd-test" this means, we called pmd:pmd twice: Once within "pmd-test" to check test code and once more via pmd:check, but against the main code. Skipping now the default configuration always and explicitly call pmd:pmd in the two executions. Thanks @uhafner for the idea. --- pom.xml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index f3bab7a3e4..e5b7e66827 100644 --- a/pom.xml +++ b/pom.xml @@ -506,9 +506,22 @@ pmd-main verify + pmd check + cpd cpd-check + + ${pmd.skip} + 100 + + /net/sourceforge/pmd/pmd-dogfood-config.xml + + + target/generated-sources/javacc + target/generated-sources/antlr4 + + pmd-test @@ -518,6 +531,7 @@ check + ${pmd.skip} ${project.build.directory}/pmdTest/ true @@ -528,19 +542,15 @@ false - 100 1.${java.version} - - /net/sourceforge/pmd/pmd-dogfood-config.xml - - - target/generated-sources/javacc - target/generated-sources/antlr4 - false 2 true true + + true From b2a1ef714fc8d8a36afef88c94a99e83a7dbe8bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 6 May 2024 12:03:38 +0200 Subject: [PATCH 40/56] Fix PMD warning --- .../pmd/lang/java/types/internal/infer/IncorporationAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java index dfda211282..cc9bc4f9ec 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java @@ -83,7 +83,7 @@ abstract class IncorporationAction { // Check that other upper bounds that are class types are related to this bound. // Otherwise, GLB does not exist and its construction would fail during ReductionStep#UPPER. for (JTypeMirror otherBound : ivar.getBounds(BoundKind.UPPER)) { - if (otherBound != myBound && isClassType(otherBound)) { + if (otherBound != myBound && isClassType(otherBound)) { // NOPMD CompareObjectsWithEquals // Since we are testing both directions we cannot let those tests add bounds on the ivars, // because they could be contradictory. boolean areRelated = TypeOps.isConvertiblePure(myBound, otherBound).somehow() From 788b07ba14cd14204e936381e3b5286674eb5c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 6 May 2024 12:23:08 +0200 Subject: [PATCH 41/56] Move methods in order to avoid carrying around the pure parameter which is error-prone --- .../pmd/lang/java/types/TypeOps.java | 439 +++++++++--------- .../lang/java/types/TestUtilitiesForTypes.kt | 9 +- 2 files changed, 226 insertions(+), 222 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java index 0f8a12f38f..593ce994c9 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java @@ -79,7 +79,7 @@ public final class TypeOps { * of {@link JTypeMirror}. */ public static boolean isSameType(JTypeMirror t, JTypeMirror s) { - return isSameType(t, s, false, false); + return isSameType(t, s, true, false); } /** @@ -87,7 +87,7 @@ public final class TypeOps { * appearing within them. */ public static boolean isSameTypeWithSameAnnotations(JTypeMirror t, JTypeMirror s) { - return isSameType(t, s, false, true); + return isSameType(t, s, true, true); } /** @@ -97,7 +97,7 @@ public final class TypeOps { * @apiNote Internal API */ static boolean isSameTypeInInference(JTypeMirror t, JTypeMirror s) { - return isSameType(t, s, true, false); + return isSameType(t, s, false, false); } /** @@ -105,7 +105,7 @@ public final class TypeOps { * true, then encountering inference variables produces side effects * on them, adding bounds. */ - private static boolean isSameType(JTypeMirror t, JTypeMirror s, boolean inInference, boolean considerAnnotations) { + private static boolean isSameType(JTypeMirror t, JTypeMirror s, boolean pure, boolean considerAnnotations) { if (t == s) { // also returns true if both t and s are null return true; @@ -115,7 +115,7 @@ public final class TypeOps { return false; } - if (!inInference) { + if (pure) { if (considerAnnotations) { if (t instanceof CaptureMatcher || s instanceof CaptureMatcher) { return t.equals(s); // skip check for type annotations @@ -156,7 +156,7 @@ public final class TypeOps { return false; } for (int i = 0; i < ts.size(); i++) { - if (!isSameType(ts.get(i), ss.get(i).subst(subst), inInference, considerAnnotations)) { + if (!isSameType(ts.get(i), ss.get(i).subst(subst), !inInference, considerAnnotations)) { return false; } } @@ -195,7 +195,7 @@ public final class TypeOps { JClassType s2 = (JClassType) s; return t.getSymbol().equals(s2.getSymbol()) // maybe compare the type system as well. && t.hasErasedSuperTypes() == s2.hasErasedSuperTypes() - && isSameType(t.getEnclosingType(), s2.getEnclosingType(), inInference, considerAnnotations) + && isSameType(t.getEnclosingType(), s2.getEnclosingType(), !inInference, considerAnnotations) && areSameTypes(t.getTypeArgs(), s2.getTypeArgs(), inInference, considerAnnotations); } return false; @@ -212,7 +212,7 @@ public final class TypeOps { return false; } JWildcardType s2 = (JWildcardType) s; - return s2.isUpperBound() == t.isUpperBound() && isSameType(t.getBound(), s2.getBound(), inInference, considerAnnotations); + return s2.isUpperBound() == t.isUpperBound() && isSameType(t.getBound(), s2.getBound(), !inInference, considerAnnotations); } @Override @@ -254,7 +254,7 @@ public final class TypeOps { return false; } - if (!isSameType(t.getPrimaryBound(), s2.getPrimaryBound(), inInference, considerAnnotations)) { + if (!isSameType(t.getPrimaryBound(), s2.getPrimaryBound(), !inInference, considerAnnotations)) { return false; } @@ -263,7 +263,7 @@ public final class TypeOps { boolean found = false; for (JTypeMirror si : sComps) { // todo won't this behaves weirdly during inference? test it - if (isSameType(ti, si, inInference, considerAnnotations)) { + if (isSameType(ti, si, !inInference, considerAnnotations)) { found = true; break; } @@ -278,7 +278,7 @@ public final class TypeOps { @Override public Boolean visitArray(JArrayType t, JTypeMirror s) { return s instanceof JArrayType - && isSameType(t.getComponentType(), ((JArrayType) s).getComponentType(), inInference, considerAnnotations); + && isSameType(t.getComponentType(), ((JArrayType) s).getComponentType(), !inInference, considerAnnotations); } } @@ -398,84 +398,16 @@ public final class TypeOps { public static Convertibility isConvertible(@NonNull JTypeMirror t, @NonNull JTypeMirror s) { - return isConvertible(t, s, true, false); + return SubtypeVisitor.INFERENCE.isConvertible(t, s); } - @Deprecated // unused public static Convertibility isConvertibleNoCapture(@NonNull JTypeMirror t, @NonNull JTypeMirror s) { - return isConvertible(t, s, false, false); + return SubtypeVisitor.PURE.isConvertible(t, s, false); } // does not perform side effects on inference vars public static Convertibility isConvertiblePure(JTypeMirror t, JTypeMirror s) { - return isConvertible(t, s, true, true); - } - - /** - * Returns whether if {@code T <: S}, ie T is a subtype of S. - * - *

Note that {@link TypeSystem#ERROR} and {@link TypeSystem#UNKNOWN} - * are considered subtypes of anything. - * - * @param t A type T - * @param s A type S - */ - public static Convertibility isConvertible(@NonNull JTypeMirror t, @NonNull JTypeMirror s, boolean capture, boolean pure) { - // This is commented out as it makes JTypeMirror#isSubtypeOf partial, - // which is not nice for the API... But this assert caught a bug and - // should probably be enabled. - // assert !(t instanceof JWildcardType || s instanceof JWildcardType) : "Wildcards do not support subtyping"; - - if (t == s) { - Objects.requireNonNull(t); - return Convertibility.SUBTYPING; - } else if (s.isTop()) { - return Convertibility.subtypeIf(!t.isPrimitive()); - } else if (s.isVoid() || t.isVoid()) { // t != s - return Convertibility.NEVER; - } else if (s instanceof InferenceVar) { - if (!pure) { - // it's possible to add a bound to UNKNOWN or ERROR - ((InferenceVar) s).addBound(BoundKind.LOWER, t); - } - return Convertibility.SUBTYPING; - } else if (isTypeRange(s)) { - // If s is a type range L..U, - // then showing t <: s is the same thing as t <: L - JTypeMirror lower = lowerBoundRec(s); - if (!lower.isBottom()) { - return isConvertible(t, lower, capture, pure); - } - // otherwise fallthrough - } else if (isSpecialUnresolved(t)) { - // error type or unresolved type is subtype of everything - if (s instanceof JArrayType) { - // In case the array has an ivar 'a as element type, a bound will be added 'a >: (*unknown*) - // This helps inference recover in call chains and propagate the (*unknown*) types gracefully. - return isConvertible(t, ((JArrayType) s).getElementType()); - } - return Convertibility.SUBTYPING; - } else if (hasUnresolvedSymbol(t) && t instanceof JClassType) { - // This also considers types with an unresolved symbol - // subtypes of (nearly) anything. This allows them to - // pass bound checks on type variables. - if (Objects.equals(t.getSymbol(), s.getSymbol())) { - return typeArgsAreContained((JClassType) t, (JClassType) s, pure); - } else { - return Convertibility.subtypeIf(s instanceof JClassType); // excludes array or so - } - } else if (s instanceof JIntersectionType) { // TODO test intersection with tvars & arrays - // If S is an intersection, then T must conform to *all* bounds of S - // Symmetrically, if T is an intersection, T <: S requires only that - // at least one bound of T is a subtype of S. - return Convertibility.subtypesAll(t, asList(s), pure); - } - - if (capture) { - t = capture(t); - } - SubtypeVisitor visitor = pure ? SubtypeVisitor.PURE : SubtypeVisitor.INSTANCE; - return t.acceptVisitor(visitor, s); + return SubtypeVisitor.PURE.isConvertible(t, s); } public static boolean allArgsAreUnboundedWildcards(List sargs) { @@ -604,29 +536,6 @@ public final class TypeOps { return b ? SUBTYPING : NEVER; } - static Convertibility subtypesAll(JTypeMirror t, Iterable supers, boolean pure) { - Convertibility result = SUBTYPING; - for (JTypeMirror ui : supers) { - Convertibility sub = isConvertible(t, ui, true, pure); - if (sub == NEVER) { - return NEVER; - } - result = result.and(sub); - } - return result; - } - - static Convertibility anySubTypesAny(Iterable us, Iterable vs, boolean pure) { - for (JTypeMirror ui : us) { - for (JTypeMirror vi : vs) { - Convertibility sub = isConvertible(ui, vi, true, pure); - if (sub != NEVER) { - return sub.and(SUBTYPING); // never return identity here - } - } - } - return NEVER; - } } private static JTypeMirror wildUpperBound(JTypeMirror type) { @@ -669,116 +578,9 @@ public final class TypeOps { } - /** - * Returns true if {@code T <= S}, ie "S contains T". - * - *

S contains T if: - * - *

{@code L(S) <: L(T) && U(T) <: U(S)} - * - *

This only makes sense for type arguments, it's a component of - * subtype checks for parameterized types: - * - *

{@code C <: C if S <= T} - * - *

Defined in JLS§4.5.1 (Type Arguments of Parameterized Types) - */ - static Convertibility typeArgContains(JTypeMirror s, JTypeMirror t, boolean pure) { - // the contains relation can be understood intuitively if we - // represent types as ranges on a line: - - // ⊥ ---------L(S)---L(T)------U(T)-----U(S)---> Object - // range of S [-------------------------] - // range of T [---------] - - // here S contains T because its range is greater - - // since a wildcard is either "super" or "extends", in reality - // either L(S) = ⊥, or U(S) = Object. - - // meaning when S != T, we only have two scenarios where T <= S: - - // ⊥ -------U(T)-----U(S)------> Object (L(T) = L(S) = ⊥) - // ⊥ -------L(S)-----L(T)------> Object (U(T) = U(S) = Object) - - if (isSameType(s, t, !pure, false)) { - // S <= S - return Convertibility.SUBTYPING; - } - - if (s instanceof JWildcardType) { - JWildcardType sw = (JWildcardType) s; - - // capt(? extends T) <= ? extends T - // capt(? super T) <= ? super T - if (t instanceof JTypeVar && ((JTypeVar) t).isCaptureOf(sw)) { - return Convertibility.SUBTYPING; - } - - if (sw.isUpperBound()) { - // Test U(T) <: U(S), we already know L(S) <: L(T), because L(S) is bottom - return isConvertible(wildUpperBound(t), sw.asUpperBound(), pure, false); - } else { - // Test L(S) <: L(T), we already know U(T) <: U(S), because U(S) is top - return isConvertible(sw.asLowerBound(), wildLowerBound(t), pure, false); - } - } - - return Convertibility.NEVER; - } - - - /** - * Generalises containment to check if for each i, {@code Ti <= Si}. - */ - static Convertibility typeArgsAreContained(JClassType t, JClassType s, boolean pure) { - List targs = t.getTypeArgs(); - List sargs = s.getTypeArgs(); - - if (targs.isEmpty()) { - if (sargs.isEmpty()) { - // Some "erased" non-generic types may appear as the supertypes - // of raw types, and they're different from the regular flavor - // as their own supertypes are erased, yet they're not considered - // raw. To fix the subtyping relation, we say that `C <: (erased) C` - // but `(erased) C` converts to `C` by unchecked conversion, without - // warning. - boolean tRaw = t.hasErasedSuperTypes(); - boolean sRaw = s.hasErasedSuperTypes(); - if (tRaw && !sRaw) { - return Convertibility.UNCHECKED_NO_WARNING; - } else { - return Convertibility.SUBTYPING; - } - } - // for some C, S = C<...> and T = C, ie T is raw - // T is convertible to S, by unchecked conversion. - // If S = D, then the conversion produces - // no unchecked warning. - return allArgsAreUnboundedWildcards(sargs) ? Convertibility.UNCHECKED_NO_WARNING - : Convertibility.UNCHECKED_WARNING; - } - - if (targs.size() != sargs.size()) { - // types are not well-formed - return Convertibility.NEVER; - } - - Convertibility result = Convertibility.SUBTYPING; - for (int i = 0; i < targs.size(); i++) { - Convertibility sub = typeArgContains(sargs.get(i), targs.get(i), pure); - if (sub == Convertibility.NEVER) { - return Convertibility.NEVER; - } - result = result.and(sub); - } - - return result; - } - private static final class SubtypeVisitor implements JTypeVisitor { - static final SubtypeVisitor INSTANCE = new SubtypeVisitor(false); + static final SubtypeVisitor INFERENCE = new SubtypeVisitor(false); static final SubtypeVisitor PURE = new SubtypeVisitor(true); private final boolean pure; @@ -786,6 +588,207 @@ public final class TypeOps { this.pure = pure; } + + Convertibility isConvertible(@NonNull JTypeMirror t, @NonNull JTypeMirror s) { + return isConvertible(t, s, true); + } + + /** + * Returns whether if {@code T <: S}, ie T is a subtype of S. + * + *

Note that {@link TypeSystem#ERROR} and {@link TypeSystem#UNKNOWN} + * are considered subtypes of anything. + * + * @param t A type T + * @param s A type S + */ + Convertibility isConvertible(@NonNull JTypeMirror t, @NonNull JTypeMirror s, boolean capture) { + // This is commented out as it makes JTypeMirror#isSubtypeOf partial, + // which is not nice for the API... But this assert caught a bug and + // should probably be enabled. + // assert !(t instanceof JWildcardType || s instanceof JWildcardType) : "Wildcards do not support subtyping"; + + if (t == s) { + Objects.requireNonNull(t); + return Convertibility.SUBTYPING; + } else if (s.isTop()) { + return Convertibility.subtypeIf(!t.isPrimitive()); + } else if (s.isVoid() || t.isVoid()) { // t != s + return Convertibility.NEVER; + } else if (s instanceof InferenceVar) { + if (!pure) { + // it's possible to add a bound to UNKNOWN or ERROR + ((InferenceVar) s).addBound(BoundKind.LOWER, t); + } + return Convertibility.SUBTYPING; + } else if (isTypeRange(s)) { + // If s is a type range L..U, + // then showing t <: s is the same thing as t <: L + JTypeMirror lower = lowerBoundRec(s); + if (!lower.isBottom()) { + return isConvertible(t, lower); + } + // otherwise fallthrough + } else if (isSpecialUnresolved(t)) { + // error type or unresolved type is subtype of everything + if (s instanceof JArrayType) { + // In case the array has an ivar 'a as element type, a bound will be added 'a >: (*unknown*) + // This helps inference recover in call chains and propagate the (*unknown*) types gracefully. + return TypeOps.isConvertible(t, ((JArrayType) s).getElementType()); + } + return Convertibility.SUBTYPING; + } else if (hasUnresolvedSymbol(t) && t instanceof JClassType) { + // This also considers types with an unresolved symbol + // subtypes of (nearly) anything. This allows them to + // pass bound checks on type variables. + if (Objects.equals(t.getSymbol(), s.getSymbol())) { + return typeArgsAreContained((JClassType) t, (JClassType) s); + } else { + return Convertibility.subtypeIf(s instanceof JClassType); // excludes array or so + } + } else if (s instanceof JIntersectionType) { // TODO test intersection with tvars & arrays + // If S is an intersection, then T must conform to *all* bounds of S + // Symmetrically, if T is an intersection, T <: S requires only that + // at least one bound of T is a subtype of S. + return subtypesAll(t, asList(s)); + } + + if (capture) { + t = capture(t); + } + return t.acceptVisitor(this, s); + } + + Convertibility subtypesAll(JTypeMirror t, Iterable supers) { + Convertibility result = Convertibility.SUBTYPING; + for (JTypeMirror ui : supers) { + Convertibility sub = isConvertible(t, ui); + if (sub == Convertibility.NEVER) { + return Convertibility.NEVER; + } + result = result.and(sub); + } + return result; + } + + Convertibility anySubTypesAny(Iterable us, Iterable vs) { + for (JTypeMirror ui : us) { + for (JTypeMirror vi : vs) { + Convertibility sub = isConvertible(ui, vi); + if (sub != Convertibility.NEVER) { + return sub.and(Convertibility.SUBTYPING); // never return identity here + } + } + } + return Convertibility.NEVER; + } + + /** + * Generalises containment to check if for each i, {@code Ti <= Si}. + */ + Convertibility typeArgsAreContained(JClassType t, JClassType s) { + List targs = t.getTypeArgs(); + List sargs = s.getTypeArgs(); + + if (targs.isEmpty()) { + if (sargs.isEmpty()) { + // Some "erased" non-generic types may appear as the supertypes + // of raw types, and they're different from the regular flavor + // as their own supertypes are erased, yet they're not considered + // raw. To fix the subtyping relation, we say that `C <: (erased) C` + // but `(erased) C` converts to `C` by unchecked conversion, without + // warning. + boolean tRaw = t.hasErasedSuperTypes(); + boolean sRaw = s.hasErasedSuperTypes(); + if (tRaw && !sRaw) { + return Convertibility.UNCHECKED_NO_WARNING; + } else { + return Convertibility.SUBTYPING; + } + } + // for some C, S = C<...> and T = C, ie T is raw + // T is convertible to S, by unchecked conversion. + // If S = D, then the conversion produces + // no unchecked warning. + return allArgsAreUnboundedWildcards(sargs) ? Convertibility.UNCHECKED_NO_WARNING + : Convertibility.UNCHECKED_WARNING; + } + + if (targs.size() != sargs.size()) { + // types are not well-formed + return Convertibility.NEVER; + } + + Convertibility result = Convertibility.SUBTYPING; + for (int i = 0; i < targs.size(); i++) { + Convertibility sub = typeArgContains(sargs.get(i), targs.get(i)); + if (sub == Convertibility.NEVER) { + return Convertibility.NEVER; + } + result = result.and(sub); + } + + return result; + } + + /** + * Returns true if {@code T <= S}, ie "S contains T". + * + *

S contains T if: + * + *

{@code L(S) <: L(T) && U(T) <: U(S)} + * + *

This only makes sense for type arguments, it's a component of + * subtype checks for parameterized types: + * + *

{@code C <: C if S <= T} + * + *

Defined in JLS§4.5.1 (Type Arguments of Parameterized Types) + */ + Convertibility typeArgContains(JTypeMirror s, JTypeMirror t) { + // the contains relation can be understood intuitively if we + // represent types as ranges on a line: + + // ⊥ ---------L(S)---L(T)------U(T)-----U(S)---> Object + // range of S [-------------------------] + // range of T [---------] + + // here S contains T because its range is greater + + // since a wildcard is either "super" or "extends", in reality + // either L(S) = ⊥, or U(S) = Object. + + // meaning when S != T, we only have two scenarios where T <= S: + + // ⊥ -------U(T)-----U(S)------> Object (L(T) = L(S) = ⊥) + // ⊥ -------L(S)-----L(T)------> Object (U(T) = U(S) = Object) + + if (isSameType(s, t, pure, false)) { + // S <= S + return Convertibility.SUBTYPING; + } + + if (s instanceof JWildcardType) { + JWildcardType sw = (JWildcardType) s; + + // capt(? extends T) <= ? extends T + // capt(? super T) <= ? super T + if (t instanceof JTypeVar && ((JTypeVar) t).isCaptureOf(sw)) { + return Convertibility.SUBTYPING; + } + + if (sw.isUpperBound()) { + // Test U(T) <: U(S), we already know L(S) <: L(T), because L(S) is bottom + return this.isConvertible(wildUpperBound(t), sw.asUpperBound()); + } else { + // Test L(S) <: L(T), we already know U(T) <: U(S), because U(S) is top + return this.isConvertible(sw.asLowerBound(), wildLowerBound(t)); + } + } + + return Convertibility.NEVER; + } + @Override public Convertibility visit(JTypeMirror t, JTypeMirror s) { throw new IllegalStateException("Should not be called"); @@ -797,9 +800,9 @@ public final class TypeOps { return Convertibility.SUBTYPING; } if (isTypeRange(s)) { - return isConvertible(t, lowerBoundRec(s), true, pure); + return isConvertible(t, lowerBoundRec(s)); } - return isConvertible(t.getUpperBound(), s, true, pure); + return isConvertible(t.getUpperBound(), s); } @Override @@ -851,7 +854,7 @@ public final class TypeOps { // a raw type C is a supertype for all the family of parameterized type generated by C return Convertibility.SUBTYPING; } else { - return typeArgsAreContained(superDecl, cs, pure); + return typeArgsAreContained(superDecl, cs); } } @@ -875,7 +878,7 @@ public final class TypeOps { // what we mean is, if S is an intersection, then // "any component of T subtypes any component of S" - return Convertibility.anySubTypesAny(t.getComponents(), asList(s), pure); + return anySubTypesAny(t.getComponents(), asList(s)); } @Override @@ -896,7 +899,7 @@ public final class TypeOps { // arrays of primitive types have no sub-/ supertype return Convertibility.subtypeIf(cs.getComponentType() == t.getComponentType()); } else { - return isConvertible(t.getComponentType(), cs.getComponentType(), true, pure); + return isConvertible(t.getComponentType(), cs.getComponentType()); } } diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TestUtilitiesForTypes.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TestUtilitiesForTypes.kt index 2cd3888ae8..9899f11226 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TestUtilitiesForTypes.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/TestUtilitiesForTypes.kt @@ -14,7 +14,8 @@ import net.sourceforge.pmd.lang.java.JavaParsingHelper import net.sourceforge.pmd.lang.java.ast.InvocationNode import net.sourceforge.pmd.lang.java.ast.TypeNode import net.sourceforge.pmd.lang.java.symbols.internal.asm.AsmSymbolResolver -import net.sourceforge.pmd.lang.java.types.TypeOps.* +import net.sourceforge.pmd.lang.java.types.TypeOps.Convertibility +import net.sourceforge.pmd.lang.java.types.TypeOps.isSameTypeWithSameAnnotations import net.sourceforge.pmd.lang.test.ast.shouldBe import net.sourceforge.pmd.lang.test.ast.shouldBeA import org.hamcrest.Description @@ -168,18 +169,18 @@ fun assertSubtypeOrdering(vararg ts: JTypeMirror) { fun JClassType.parameterize(m1: JTypeMirror, vararg mirror: JTypeMirror): JClassType = withTypeArguments(listOf(m1, *mirror)) fun assertSubtype(t: JTypeMirror, s: JTypeMirror, capture: Boolean = true, passes: Convertibility.() -> Boolean) { - val res = isConvertible(t, s, capture, true) + val res = if (capture) TypeOps.isConvertiblePure(t, s) else TypeOps.isConvertibleNoCapture(t, s) assertTrue("$t \n\t\t<: $s") { res.passes() } } infix fun JTypeMirror.shouldSubtypeNoCapture(s: JTypeMirror) { - assertSubtype(this, s, false) { bySubtyping() } + assertSubtype(this, s, capture = false) { bySubtyping() } } infix fun JTypeMirror.shouldNotSubtypeNoCapture(s: JTypeMirror) { - assertSubtype(this, s, false) { never() } + assertSubtype(this, s, capture = false) { never() } } infix fun JTypeMirror.shouldBeSubtypeOf(other: JTypeMirror) { From 62cc3b134918e526f1e1d802058d31a1533ab878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 6 May 2024 12:30:58 +0200 Subject: [PATCH 42/56] fix release notes --- docs/pages/release_notes.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 1a4e0417e7..c540dcfade 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -16,8 +16,14 @@ This is a {{ site.pmd.release_type }} release. ### 🐛 Fixed Issues +* core + * [#4978](https://github.com/pmd/pmd/issues/4978): \[core] Referenced Rulesets do not emit details on validation errors + * [#4983](https://github.com/pmd/pmd/pull/4983): \[cpd] Fix CPD crashes about unicode escapes * java + * [#4912](https://github.com/pmd/pmd/issues/4912): \[java] Unable to parse some Java9+ resource references + * [#4973](https://github.com/pmd/pmd/pull/4973): \[java] Stop parsing Java for CPD * [#4980](https://github.com/pmd/pmd/issues/4980): \[java] Bad intersection, unrelated class types java.lang.Object\[] and java.lang.Number + * [#4988](https://github.com/pmd/pmd/pull/4988): \[java] Fix impl of ASTVariableId::isResourceDeclaration / VariableId/@ResourceDeclaration * java-bestpractices * [#4278](https://github.com/pmd/pmd/issues/4278): \[java] UnusedPrivateMethod FP with Junit 5 @MethodSource and default factory method name * [#4852](https://github.com/pmd/pmd/issues/4852): \[java] ReplaceVectorWithList false-positive (neither Vector nor List usage) From a72f851514ffcfdd0e4d325815fbaf3d4987d52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 6 May 2024 12:33:40 +0200 Subject: [PATCH 43/56] Invert booleans --- .../pmd/lang/java/types/TypeOps.java | 44 +++++++++---------- .../internal/infer/IncorporationAction.java | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java index 593ce994c9..d494244994 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java @@ -136,27 +136,27 @@ public final class TypeOps { } public static boolean areSameTypes(List ts, List ss) { - return areSameTypes(ts, ss, EMPTY, false, false); - } - - public static boolean areSameTypesInInference(List ts, List ss) { return areSameTypes(ts, ss, EMPTY, true, false); } - private static boolean areSameTypes(List ts, List ss, boolean inInference, boolean considerAnnotations) { - return areSameTypes(ts, ss, EMPTY, inInference, considerAnnotations); + public static boolean areSameTypesInInference(List ts, List ss) { + return areSameTypes(ts, ss, EMPTY, false, false); + } + + private static boolean areSameTypes(List ts, List ss, boolean pure, boolean considerAnnotations) { + return areSameTypes(ts, ss, EMPTY, pure, considerAnnotations); } private static boolean areSameTypes(List ts, List ss, Substitution subst) { - return areSameTypes(ts, ss, subst, false, false); + return areSameTypes(ts, ss, subst, true, false); } - private static boolean areSameTypes(List ts, List ss, Substitution subst, boolean inInference, boolean considerAnnotations) { + private static boolean areSameTypes(List ts, List ss, Substitution subst, boolean pure, boolean considerAnnotations) { if (ts.size() != ss.size()) { return false; } for (int i = 0; i < ts.size(); i++) { - if (!isSameType(ts.get(i), ss.get(i).subst(subst), !inInference, considerAnnotations)) { + if (!isSameType(ts.get(i), ss.get(i).subst(subst), pure, considerAnnotations)) { return false; } } @@ -166,15 +166,15 @@ public final class TypeOps { // note that this does not take type annotations into account private static final class SameTypeVisitor implements JTypeVisitor { - static final SameTypeVisitor INFERENCE = new SameTypeVisitor(true, false); - static final SameTypeVisitor PURE = new SameTypeVisitor(false, false); - static final SameTypeVisitor PURE_WITH_ANNOTATIONS = new SameTypeVisitor(false, true); + static final SameTypeVisitor INFERENCE = new SameTypeVisitor(false, false); + static final SameTypeVisitor PURE = new SameTypeVisitor(true, false); + static final SameTypeVisitor PURE_WITH_ANNOTATIONS = new SameTypeVisitor(true, true); - private final boolean inInference; + private final boolean pure; private final boolean considerAnnotations; - private SameTypeVisitor(boolean inInference, boolean considerAnnotations) { - this.inInference = inInference; + private SameTypeVisitor(boolean pure, boolean considerAnnotations) { + this.pure = pure; this.considerAnnotations = considerAnnotations; } @@ -195,8 +195,8 @@ public final class TypeOps { JClassType s2 = (JClassType) s; return t.getSymbol().equals(s2.getSymbol()) // maybe compare the type system as well. && t.hasErasedSuperTypes() == s2.hasErasedSuperTypes() - && isSameType(t.getEnclosingType(), s2.getEnclosingType(), !inInference, considerAnnotations) - && areSameTypes(t.getTypeArgs(), s2.getTypeArgs(), inInference, considerAnnotations); + && isSameType(t.getEnclosingType(), s2.getEnclosingType(), pure, considerAnnotations) + && areSameTypes(t.getTypeArgs(), s2.getTypeArgs(), pure, considerAnnotations); } return false; } @@ -212,12 +212,12 @@ public final class TypeOps { return false; } JWildcardType s2 = (JWildcardType) s; - return s2.isUpperBound() == t.isUpperBound() && isSameType(t.getBound(), s2.getBound(), !inInference, considerAnnotations); + return s2.isUpperBound() == t.isUpperBound() && isSameType(t.getBound(), s2.getBound(), pure, considerAnnotations); } @Override public Boolean visitInferenceVar(InferenceVar t, JTypeMirror s) { - if (!inInference) { + if (pure) { return t == s; } @@ -254,7 +254,7 @@ public final class TypeOps { return false; } - if (!isSameType(t.getPrimaryBound(), s2.getPrimaryBound(), !inInference, considerAnnotations)) { + if (!isSameType(t.getPrimaryBound(), s2.getPrimaryBound(), pure, considerAnnotations)) { return false; } @@ -263,7 +263,7 @@ public final class TypeOps { boolean found = false; for (JTypeMirror si : sComps) { // todo won't this behaves weirdly during inference? test it - if (isSameType(ti, si, !inInference, considerAnnotations)) { + if (isSameType(ti, si, pure, considerAnnotations)) { found = true; break; } @@ -278,7 +278,7 @@ public final class TypeOps { @Override public Boolean visitArray(JArrayType t, JTypeMirror s) { return s instanceof JArrayType - && isSameType(t.getComponentType(), ((JArrayType) s).getComponentType(), !inInference, considerAnnotations); + && isSameType(t.getComponentType(), ((JArrayType) s).getComponentType(), pure, considerAnnotations); } } diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java index cc9bc4f9ec..74e89636f1 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/IncorporationAction.java @@ -54,7 +54,7 @@ abstract class IncorporationAction { this.myBound = bound; } - public static boolean isClassType(JTypeMirror bound) { + private static boolean isClassType(JTypeMirror bound) { JTypeDeclSymbol symbol = bound.getSymbol(); return symbol instanceof JClassSymbol && !symbol.isInterface(); } From 3d4f165bbdd49f6b4048d387352abbfbb8736a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 6 May 2024 12:41:08 +0200 Subject: [PATCH 44/56] Add back removed method for compatibility --- .../java/net/sourceforge/pmd/lang/java/types/TypeOps.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java index d494244994..0398a5c2d8 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/TypeOps.java @@ -401,6 +401,11 @@ public final class TypeOps { return SubtypeVisitor.INFERENCE.isConvertible(t, s); } + @Deprecated // unused + public static Convertibility isConvertible(@NonNull JTypeMirror t, @NonNull JTypeMirror s, boolean capture) { + return SubtypeVisitor.PURE.isConvertible(t, s, capture); + } + public static Convertibility isConvertibleNoCapture(@NonNull JTypeMirror t, @NonNull JTypeMirror s) { return SubtypeVisitor.PURE.isConvertible(t, s, false); } From e5f55c08a5b2fb31820bca04fb23416cdd884611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Fri, 10 May 2024 20:30:59 +0200 Subject: [PATCH 45/56] Add test case for #1160 --- .../xml/ConsecutiveAppendsShouldReuse.xml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/performance/xml/ConsecutiveAppendsShouldReuse.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/performance/xml/ConsecutiveAppendsShouldReuse.xml index 6f04e64778..863971af4b 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/performance/xml/ConsecutiveAppendsShouldReuse.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/performance/xml/ConsecutiveAppendsShouldReuse.xml @@ -274,4 +274,29 @@ public class Foo { } ]]> + + FN within lambda #1160 + 1 + stream) { + return stream.reduce(new StringBuilder(1_000), (builder, string) -> { + switch (string) { + case "asd": + builder.append("asd"); + builder.append("qwe"); + break; + } + return builder; + }, (t, s) -> { + t.append(s); + return t; + }).toString(); + } + } + ]]> + From b6c0a100956332e6c356051e311d381fd34f34c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sun, 12 May 2024 15:30:45 +0200 Subject: [PATCH 46/56] [java] Fix #5006 - bad intersection in capture of recursive types --- .../sourceforge/pmd/lang/java/types/Lub.java | 26 ++++++++++++++++--- .../pmd/lang/java/types/CaptureTest.kt | 21 ++++++++++++++- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/Lub.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/Lub.java index 80e6ac5575..9a589aa79d 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/Lub.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/Lub.java @@ -340,10 +340,21 @@ final class Lub { JTypeMirror componentGlb = glb(ts, setOf(((JArrayType) ci).getComponentType(), ((JArrayType) primaryBound).getComponentType())); primaryBound = ts.arrayType(componentGlb); + } else { - throw new IllegalArgumentException( - "Bad intersection, unrelated class types " + ci + " and " + primaryBound + " in " + types - ); + // We have two primary bounds. This may happen during capture + // of recursive F-bounded types. Here we do a last resort check + // to see if one of the bounds is a subtype (unchecked) of the other. + // In that case we pick this as primary bound as it is more specific. + + int cmp = compareRelatedness(ci.getErasure(), primaryBound.getErasure()); + if (cmp == 0) { + throw new IllegalArgumentException( + "Bad intersection, unrelated class types " + ci + " and " + primaryBound + " in " + types + ); + } else if (cmp < 0) { + primaryBound = ci; + } } } else { bounds.add(ci); @@ -366,6 +377,15 @@ final class Lub { return new JIntersectionType(ts, primaryBound, bounds); } + private static int compareRelatedness(JTypeMirror t, JTypeMirror s) { + if (TypeOps.isConvertiblePure(t, s.getErasure()).withoutWarnings()) { + return -1; + } else if (TypeOps.isConvertiblePure(s, t.getErasure()).withoutWarnings()) { + return 1; + } + return 0; + } + private static void checkGlbComponent(Collection types, JTypeMirror ci) { if (ci.isPrimitive() || ci instanceof JWildcardType || ci instanceof JIntersectionType) { throw new IllegalArgumentException("Bad intersection type component: " + ci + " in " + types); diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/CaptureTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/CaptureTest.kt index 03125a0a58..a686a7436a 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/CaptureTest.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/types/CaptureTest.kt @@ -9,11 +9,12 @@ import io.kotest.core.spec.style.FunSpec import io.kotest.matchers.shouldBe import net.sourceforge.pmd.lang.java.symbols.internal.asm.createUnresolvedAsmSymbol import net.sourceforge.pmd.lang.java.types.TypeConversion.* +import net.sourceforge.pmd.lang.test.ast.IntelliMarker /** * @author Clément Fournier */ -class CaptureTest : FunSpec({ +class CaptureTest : IntelliMarker, FunSpec({ with(TypeDslOf(testTypeSystem)) { with(gen) { @@ -69,6 +70,24 @@ class CaptureTest : FunSpec({ } } + test("Capture of recursive types #5006") { + val acu = javaParser.parse(""" + class Parent> {} // Recursive type T + + class Child extends Parent {} + + class Box> { + public void foo(Box box) {} // <-- The bug is triggered by this line + } + """.trimIndent()) + + val (_, child, box) = acu.declaredTypeSignatures() + + val type = acu.methodDeclarations().first()!!.formalParameters.get(0).typeMirror + + capture(type) shouldBe box[captureMatcher(`?` extends child)] + } + } } From 38194a49f7f867b7095c350cb01f0f67e63809aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 13 May 2024 16:54:08 +0200 Subject: [PATCH 47/56] Fix #4042 - FN with StringBufferInstantiationWithChar --- .../src/main/resources/category/java/errorprone.xml | 7 ++++--- .../xml/StringBufferInstantiationWithChar.xml | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pmd-java/src/main/resources/category/java/errorprone.xml b/pmd-java/src/main/resources/category/java/errorprone.xml index d4599e9f82..88d2b1fe2c 100644 --- a/pmd-java/src/main/resources/category/java/errorprone.xml +++ b/pmd-java/src/main/resources/category/java/errorprone.xml @@ -2642,7 +2642,7 @@ public class SomeEJB extends EJBObject implements EJBLocalHome { @@ -2668,8 +2668,9 @@ new StringBuilder("A") // 1 + 16 = 17 diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/StringBufferInstantiationWithChar.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/StringBufferInstantiationWithChar.xml index 8cb72888d4..424e90f001 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/StringBufferInstantiationWithChar.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/StringBufferInstantiationWithChar.xml @@ -29,6 +29,18 @@ public class Foo { public class Foo2 { StringBuilder sb = new StringBuilder('c'); +} + ]]> + + + failure case (not a literal) + 1 + From a80897fc71c7e42cf510ab1d20730445e8a22fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 13 May 2024 17:18:11 +0200 Subject: [PATCH 48/56] [java] Fix #2326 - UnsynchronizedStaticFormatter FP in static initializer --- .../UnsynchronizedStaticFormatterRule.java | 19 ++++++++++++------- .../xml/ConstructorCallsOverridableMethod.xml | 19 +++++++++++++++++++ .../xml/UnsynchronizedStaticFormatter.xml | 17 +++++++++++++++++ 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java index 152492fdb3..f6487b15f6 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java @@ -8,14 +8,15 @@ import java.text.Format; import java.util.Arrays; import java.util.List; -import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTAssignableExpr.ASTNamedReferenceExpr; import net.sourceforge.pmd.lang.java.ast.ASTClassType; import net.sourceforge.pmd.lang.java.ast.ASTExpression; import net.sourceforge.pmd.lang.java.ast.ASTFieldDeclaration; +import net.sourceforge.pmd.lang.java.ast.ASTInitializer; import net.sourceforge.pmd.lang.java.ast.ASTMethodCall; import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTSynchronizedStatement; +import net.sourceforge.pmd.lang.java.ast.ASTType; import net.sourceforge.pmd.lang.java.ast.ASTVariableId; import net.sourceforge.pmd.lang.java.ast.JModifier; import net.sourceforge.pmd.lang.java.ast.internal.JavaAstUtils; @@ -62,12 +63,13 @@ public class UnsynchronizedStaticFormatterRule extends AbstractJavaRulechainRule if (!node.hasModifiers(JModifier.STATIC)) { return data; } - ASTClassType cit = node.descendants(ASTClassType.class).first(); - if (cit == null || !TypeTestUtil.isA(formatterClassToCheck, cit)) { + ASTType cit = node.getTypeNode(); + if (!(cit instanceof ASTClassType) + || !TypeTestUtil.isA(formatterClassToCheck, cit)) { return data; } - ASTVariableId var = node.descendants(ASTVariableId.class).first(); + ASTVariableId var = node.getVarIds().firstOrThrow(); for (String formatter: THREAD_SAFE_FORMATTER) { if (TypeTestUtil.isA(formatter, var)) { return data; @@ -83,8 +85,6 @@ public class UnsynchronizedStaticFormatterRule extends AbstractJavaRulechainRule continue; } - Node n = ref; - // is there a block-level synch? ASTSynchronizedStatement syncStatement = ref.ancestors(ASTSynchronizedStatement.class).first(); if (syncStatement != null) { @@ -102,7 +102,12 @@ public class UnsynchronizedStaticFormatterRule extends AbstractJavaRulechainRule } } - asCtx(data).addViolation(n); + boolean hasStaticInit = ref.ancestors(ASTInitializer.class).any(ASTInitializer::isStatic); + if (hasStaticInit) { + continue; + } + + asCtx(data).addViolation(ref); } return data; } diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/ConstructorCallsOverridableMethod.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/ConstructorCallsOverridableMethod.xml index 5581a7b041..0281087dec 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/ConstructorCallsOverridableMethod.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/ConstructorCallsOverridableMethod.xml @@ -629,6 +629,25 @@ class Foo1 { } public void bar() {} } +]]> + + + [java] ConstructorCallsOverridableMethod: false positive with lombok's @Value #4510 + 0 + diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml index c9012e95eb..e6eea9edaf 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml @@ -304,4 +304,21 @@ public class Foo { } ]]> + + [java] False positive UnsynchronizedStaticFormatter in static initializer #2368 + 0 + + From 11743a49fa50dfd8b8a8753af45ce14b38f704bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 13 May 2024 17:19:39 +0200 Subject: [PATCH 49/56] Update release notes --- docs/pages/release_notes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 44f8bf9e73..2015e6d46a 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -41,6 +41,8 @@ Since this release, PMD will also expose any getter returning a collection of an * [#4985](https://github.com/pmd/pmd/issues/4985): \[java] UnusedPrivateMethod false-positive / method reference in combination with custom object * java-codestyle * [#4930](https://github.com/pmd/pmd/issues/4930): \[java] EmptyControlStatement should not allow empty try with concise resources +* java-multithreading + * [#2368](https://github.com/pmd/pmd/issues/2368): \[java] False positive UnsynchronizedStaticFormatter in static initializer ### 🚨 API Changes From f1701df7f250066a39056f3843de51fc4321d255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 13 May 2024 17:22:00 +0200 Subject: [PATCH 50/56] Revert previous two commits - pushed by mistake --- docs/pages/release_notes.md | 2 -- .../UnsynchronizedStaticFormatterRule.java | 19 +++++++------------ .../xml/ConstructorCallsOverridableMethod.xml | 19 ------------------- .../xml/UnsynchronizedStaticFormatter.xml | 17 ----------------- 4 files changed, 7 insertions(+), 50 deletions(-) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 2015e6d46a..44f8bf9e73 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -41,8 +41,6 @@ Since this release, PMD will also expose any getter returning a collection of an * [#4985](https://github.com/pmd/pmd/issues/4985): \[java] UnusedPrivateMethod false-positive / method reference in combination with custom object * java-codestyle * [#4930](https://github.com/pmd/pmd/issues/4930): \[java] EmptyControlStatement should not allow empty try with concise resources -* java-multithreading - * [#2368](https://github.com/pmd/pmd/issues/2368): \[java] False positive UnsynchronizedStaticFormatter in static initializer ### 🚨 API Changes diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java index f6487b15f6..152492fdb3 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java @@ -8,15 +8,14 @@ import java.text.Format; import java.util.Arrays; import java.util.List; +import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTAssignableExpr.ASTNamedReferenceExpr; import net.sourceforge.pmd.lang.java.ast.ASTClassType; import net.sourceforge.pmd.lang.java.ast.ASTExpression; import net.sourceforge.pmd.lang.java.ast.ASTFieldDeclaration; -import net.sourceforge.pmd.lang.java.ast.ASTInitializer; import net.sourceforge.pmd.lang.java.ast.ASTMethodCall; import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTSynchronizedStatement; -import net.sourceforge.pmd.lang.java.ast.ASTType; import net.sourceforge.pmd.lang.java.ast.ASTVariableId; import net.sourceforge.pmd.lang.java.ast.JModifier; import net.sourceforge.pmd.lang.java.ast.internal.JavaAstUtils; @@ -63,13 +62,12 @@ public class UnsynchronizedStaticFormatterRule extends AbstractJavaRulechainRule if (!node.hasModifiers(JModifier.STATIC)) { return data; } - ASTType cit = node.getTypeNode(); - if (!(cit instanceof ASTClassType) - || !TypeTestUtil.isA(formatterClassToCheck, cit)) { + ASTClassType cit = node.descendants(ASTClassType.class).first(); + if (cit == null || !TypeTestUtil.isA(formatterClassToCheck, cit)) { return data; } - ASTVariableId var = node.getVarIds().firstOrThrow(); + ASTVariableId var = node.descendants(ASTVariableId.class).first(); for (String formatter: THREAD_SAFE_FORMATTER) { if (TypeTestUtil.isA(formatter, var)) { return data; @@ -85,6 +83,8 @@ public class UnsynchronizedStaticFormatterRule extends AbstractJavaRulechainRule continue; } + Node n = ref; + // is there a block-level synch? ASTSynchronizedStatement syncStatement = ref.ancestors(ASTSynchronizedStatement.class).first(); if (syncStatement != null) { @@ -102,12 +102,7 @@ public class UnsynchronizedStaticFormatterRule extends AbstractJavaRulechainRule } } - boolean hasStaticInit = ref.ancestors(ASTInitializer.class).any(ASTInitializer::isStatic); - if (hasStaticInit) { - continue; - } - - asCtx(data).addViolation(ref); + asCtx(data).addViolation(n); } return data; } diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/ConstructorCallsOverridableMethod.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/ConstructorCallsOverridableMethod.xml index 0281087dec..5581a7b041 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/ConstructorCallsOverridableMethod.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/ConstructorCallsOverridableMethod.xml @@ -629,25 +629,6 @@ class Foo1 { } public void bar() {} } -]]> - - - [java] ConstructorCallsOverridableMethod: false positive with lombok's @Value #4510 - 0 - diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml index e6eea9edaf..c9012e95eb 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml @@ -304,21 +304,4 @@ public class Foo { } ]]> - - [java] False positive UnsynchronizedStaticFormatter in static initializer #2368 - 0 - - From 228a1f5017d4f6b8715607bb534736338c41cf30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 13 May 2024 17:18:11 +0200 Subject: [PATCH 51/56] [java] Fix #2368 - UnsynchronizedStaticFormatter FP in static initializer --- .../UnsynchronizedStaticFormatterRule.java | 19 ++++++++++++------- .../xml/UnsynchronizedStaticFormatter.xml | 17 +++++++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java index 152492fdb3..f6487b15f6 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/multithreading/UnsynchronizedStaticFormatterRule.java @@ -8,14 +8,15 @@ import java.text.Format; import java.util.Arrays; import java.util.List; -import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTAssignableExpr.ASTNamedReferenceExpr; import net.sourceforge.pmd.lang.java.ast.ASTClassType; import net.sourceforge.pmd.lang.java.ast.ASTExpression; import net.sourceforge.pmd.lang.java.ast.ASTFieldDeclaration; +import net.sourceforge.pmd.lang.java.ast.ASTInitializer; import net.sourceforge.pmd.lang.java.ast.ASTMethodCall; import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTSynchronizedStatement; +import net.sourceforge.pmd.lang.java.ast.ASTType; import net.sourceforge.pmd.lang.java.ast.ASTVariableId; import net.sourceforge.pmd.lang.java.ast.JModifier; import net.sourceforge.pmd.lang.java.ast.internal.JavaAstUtils; @@ -62,12 +63,13 @@ public class UnsynchronizedStaticFormatterRule extends AbstractJavaRulechainRule if (!node.hasModifiers(JModifier.STATIC)) { return data; } - ASTClassType cit = node.descendants(ASTClassType.class).first(); - if (cit == null || !TypeTestUtil.isA(formatterClassToCheck, cit)) { + ASTType cit = node.getTypeNode(); + if (!(cit instanceof ASTClassType) + || !TypeTestUtil.isA(formatterClassToCheck, cit)) { return data; } - ASTVariableId var = node.descendants(ASTVariableId.class).first(); + ASTVariableId var = node.getVarIds().firstOrThrow(); for (String formatter: THREAD_SAFE_FORMATTER) { if (TypeTestUtil.isA(formatter, var)) { return data; @@ -83,8 +85,6 @@ public class UnsynchronizedStaticFormatterRule extends AbstractJavaRulechainRule continue; } - Node n = ref; - // is there a block-level synch? ASTSynchronizedStatement syncStatement = ref.ancestors(ASTSynchronizedStatement.class).first(); if (syncStatement != null) { @@ -102,7 +102,12 @@ public class UnsynchronizedStaticFormatterRule extends AbstractJavaRulechainRule } } - asCtx(data).addViolation(n); + boolean hasStaticInit = ref.ancestors(ASTInitializer.class).any(ASTInitializer::isStatic); + if (hasStaticInit) { + continue; + } + + asCtx(data).addViolation(ref); } return data; } diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml index c9012e95eb..e6eea9edaf 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/UnsynchronizedStaticFormatter.xml @@ -304,4 +304,21 @@ public class Foo { } ]]> + + [java] False positive UnsynchronizedStaticFormatter in static initializer #2368 + 0 + + From 8f23cbb55620f6f31b2cba6cec619ef35e7cbe16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 13 May 2024 17:19:39 +0200 Subject: [PATCH 52/56] Update release notes --- docs/pages/release_notes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 44f8bf9e73..2015e6d46a 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -41,6 +41,8 @@ Since this release, PMD will also expose any getter returning a collection of an * [#4985](https://github.com/pmd/pmd/issues/4985): \[java] UnusedPrivateMethod false-positive / method reference in combination with custom object * java-codestyle * [#4930](https://github.com/pmd/pmd/issues/4930): \[java] EmptyControlStatement should not allow empty try with concise resources +* java-multithreading + * [#2368](https://github.com/pmd/pmd/issues/2368): \[java] False positive UnsynchronizedStaticFormatter in static initializer ### 🚨 API Changes From 4472521605eb6516d4d51025f96a9aba77eea9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Tue, 14 May 2024 09:21:35 -0300 Subject: [PATCH 53/56] Update changelog, refs #5006 --- docs/pages/release_notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 44f8bf9e73..86a6d417a5 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -34,6 +34,7 @@ Since this release, PMD will also expose any getter returning a collection of an * [#4973](https://github.com/pmd/pmd/pull/4973): \[java] Stop parsing Java for CPD * [#4980](https://github.com/pmd/pmd/issues/4980): \[java] Bad intersection, unrelated class types java.lang.Object\[] and java.lang.Number * [#4988](https://github.com/pmd/pmd/pull/4988): \[java] Fix impl of ASTVariableId::isResourceDeclaration / VariableId/@ResourceDeclaration + * [#5006](https://github.com/pmd/pmd/issues/5006): \[java] Bad intersection, unrelated class types Child and Parent * java-bestpractices * [#4278](https://github.com/pmd/pmd/issues/4278): \[java] UnusedPrivateMethod FP with Junit 5 @MethodSource and default factory method name * [#4852](https://github.com/pmd/pmd/issues/4852): \[java] ReplaceVectorWithList false-positive (neither Vector nor List usage) From 746f64f8e2ec616c4a0ef91440369c318ac97e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Tue, 14 May 2024 09:25:16 -0300 Subject: [PATCH 54/56] Update changelog, refs #4042 --- docs/pages/release_notes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 44f8bf9e73..03d2d765d6 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -41,6 +41,8 @@ Since this release, PMD will also expose any getter returning a collection of an * [#4985](https://github.com/pmd/pmd/issues/4985): \[java] UnusedPrivateMethod false-positive / method reference in combination with custom object * java-codestyle * [#4930](https://github.com/pmd/pmd/issues/4930): \[java] EmptyControlStatement should not allow empty try with concise resources +* java-errorprone + * [#4042](https://github.com/pmd/pmd/issues/4042): \[java] A false negative about the rule StringBufferInstantiationWithChar ### 🚨 API Changes From feddca0f4a6e839d5856358060067ab1745f7862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Tue, 14 May 2024 12:03:58 -0300 Subject: [PATCH 55/56] Remove empty paragraph --- .../java/rule/performance/InefficientEmptyStringCheckRule.java | 1 - 1 file changed, 1 deletion(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/performance/InefficientEmptyStringCheckRule.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/performance/InefficientEmptyStringCheckRule.java index b843d7b51b..a6b68688d5 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/performance/InefficientEmptyStringCheckRule.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/performance/InefficientEmptyStringCheckRule.java @@ -13,7 +13,6 @@ import net.sourceforge.pmd.lang.java.types.TypeTestUtil; /** * This rule finds code which inefficiently determines empty strings. * - *

*

  * str.trim().length()==0
  * 
From 42130835541e725b78ec64e5bb3bc486b4122518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Thu, 16 May 2024 14:10:59 +0200 Subject: [PATCH 56/56] Remove redundant interface declarations in pmd-java Related to #4885 --- .../net/sourceforge/pmd/lang/java/ast/ASTAnnotation.java | 2 +- .../net/sourceforge/pmd/lang/java/ast/ASTArrayDimExpr.java | 2 +- .../sourceforge/pmd/lang/java/ast/ASTArrayInitializer.java | 2 +- .../java/net/sourceforge/pmd/lang/java/ast/ASTBlock.java | 3 +-- .../sourceforge/pmd/lang/java/ast/ASTBooleanLiteral.java | 2 +- .../sourceforge/pmd/lang/java/ast/ASTCastExpression.java | 2 +- .../net/sourceforge/pmd/lang/java/ast/ASTCharLiteral.java | 2 +- .../sourceforge/pmd/lang/java/ast/ASTCompilationUnit.java | 3 +-- .../sourceforge/pmd/lang/java/ast/ASTConstructorCall.java | 6 +----- .../net/sourceforge/pmd/lang/java/ast/ASTEnumConstant.java | 5 ++--- .../pmd/lang/java/ast/ASTExecutableDeclaration.java | 2 -- .../net/sourceforge/pmd/lang/java/ast/ASTExpression.java | 6 +----- .../sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.java | 4 +--- .../sourceforge/pmd/lang/java/ast/ASTFormalParameter.java | 5 +---- .../pmd/lang/java/ast/ASTLocalVariableDeclaration.java | 4 +--- .../net/sourceforge/pmd/lang/java/ast/ASTMethodCall.java | 6 +----- .../sourceforge/pmd/lang/java/ast/ASTMethodReference.java | 3 +-- .../net/sourceforge/pmd/lang/java/ast/ASTNullLiteral.java | 2 +- .../sourceforge/pmd/lang/java/ast/ASTNumericLiteral.java | 2 +- .../pmd/lang/java/ast/ASTRecordComponentList.java | 4 +--- .../net/sourceforge/pmd/lang/java/ast/ASTStringLiteral.java | 2 +- .../sourceforge/pmd/lang/java/ast/ASTSwitchExpression.java | 4 +--- .../net/sourceforge/pmd/lang/java/ast/ASTVariableId.java | 2 +- .../pmd/lang/java/ast/AbstractTypeBodyDeclaration.java | 2 +- .../sourceforge/pmd/lang/java/ast/InternalInterfaces.java | 2 +- .../pmd/lang/java/symbols/JAccessibleElementSymbol.java | 2 +- .../pmd/lang/java/symbols/JExecutableSymbol.java | 2 +- .../sourceforge/pmd/lang/java/symbols/JTypeDeclSymbol.java | 2 +- .../lang/java/symbols/internal/ast/AstUnnamedClassSym.java | 3 +-- .../pmd/lang/java/types/BasePrimitiveSymbol.java | 3 +-- .../java/net/sourceforge/pmd/lang/java/types/JTypeVar.java | 2 +- .../pmd/lang/java/types/internal/infer/InferenceVar.java | 2 +- .../java/types/internal/infer/ast/MethodInvocMirror.java | 3 +-- .../java/types/internal/infer/ast/StandaloneExprMirror.java | 2 +- 34 files changed, 34 insertions(+), 66 deletions(-) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTAnnotation.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTAnnotation.java index 69670a58ca..b3981ea8ad 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTAnnotation.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTAnnotation.java @@ -21,7 +21,7 @@ import net.sourceforge.pmd.lang.java.types.JClassType; * * */ -public final class ASTAnnotation extends AbstractJavaTypeNode implements TypeNode, ASTMemberValue, Iterable { +public final class ASTAnnotation extends AbstractJavaTypeNode implements ASTMemberValue, Iterable { ASTAnnotation(int id) { super(id); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTArrayDimExpr.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTArrayDimExpr.java index 367e3e9c63..a281c9e4b4 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTArrayDimExpr.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTArrayDimExpr.java @@ -17,7 +17,7 @@ package net.sourceforge.pmd.lang.java.ast; * * */ -public final class ASTArrayDimExpr extends ASTArrayTypeDim implements Annotatable { +public final class ASTArrayDimExpr extends ASTArrayTypeDim { ASTArrayDimExpr(int id) { super(id); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTArrayInitializer.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTArrayInitializer.java index c51c510061..eea8f50e9a 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTArrayInitializer.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTArrayInitializer.java @@ -22,7 +22,7 @@ import java.util.Iterator; * * */ -public final class ASTArrayInitializer extends AbstractJavaExpr implements ASTExpression, Iterable { +public final class ASTArrayInitializer extends AbstractJavaExpr implements Iterable { ASTArrayInitializer(int id) { super(id); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTBlock.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTBlock.java index 0461ca3a3d..605b264c7c 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTBlock.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTBlock.java @@ -6,7 +6,6 @@ package net.sourceforge.pmd.lang.java.ast; import net.sourceforge.pmd.lang.ast.impl.javacc.JavaccToken; import net.sourceforge.pmd.lang.java.ast.ASTList.ASTMaybeEmptyListOf; -import net.sourceforge.pmd.lang.java.ast.InternalInterfaces.AllChildrenAreOfType; /** * A block of code. This is a {@linkplain ASTStatement statement} that @@ -19,7 +18,7 @@ import net.sourceforge.pmd.lang.java.ast.InternalInterfaces.AllChildrenAreOfType * */ public final class ASTBlock extends ASTMaybeEmptyListOf - implements ASTSwitchArrowRHS, ASTStatement, AllChildrenAreOfType { + implements ASTSwitchArrowRHS, ASTStatement { ASTBlock(int id) { super(id, ASTStatement.class); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTBooleanLiteral.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTBooleanLiteral.java index e0cf7e923c..694ae630fb 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTBooleanLiteral.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTBooleanLiteral.java @@ -9,7 +9,7 @@ import org.checkerframework.checker.nullness.qual.NonNull; /** * The boolean literal, either "true" or "false". */ -public final class ASTBooleanLiteral extends AbstractLiteral implements ASTLiteral { +public final class ASTBooleanLiteral extends AbstractLiteral { private boolean isTrue; diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCastExpression.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCastExpression.java index 1c4ccf07e6..7ce73d5857 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCastExpression.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCastExpression.java @@ -14,7 +14,7 @@ package net.sourceforge.pmd.lang.java.ast; * * */ -public final class ASTCastExpression extends AbstractJavaExpr implements ASTExpression { +public final class ASTCastExpression extends AbstractJavaExpr { ASTCastExpression(int id) { super(id); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCharLiteral.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCharLiteral.java index c089ccabc0..5cc8e60b6f 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCharLiteral.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCharLiteral.java @@ -15,7 +15,7 @@ import net.sourceforge.pmd.lang.document.Chars; * retrieve the actual runtime value. Use {@link #getLiteralText()} to * retrieve the text. */ -public final class ASTCharLiteral extends AbstractLiteral implements ASTLiteral { +public final class ASTCharLiteral extends AbstractLiteral { ASTCharLiteral(int id) { diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.java index f6861c8bb7..f9afd45f6e 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.java @@ -13,7 +13,6 @@ import net.sourceforge.pmd.annotation.Experimental; import net.sourceforge.pmd.lang.ast.AstInfo; import net.sourceforge.pmd.lang.ast.NodeStream; import net.sourceforge.pmd.lang.ast.RootNode; -import net.sourceforge.pmd.lang.ast.impl.GenericNode; import net.sourceforge.pmd.lang.java.symbols.table.JSymbolTable; import net.sourceforge.pmd.lang.java.types.TypeSystem; import net.sourceforge.pmd.lang.java.types.ast.internal.LazyTypeResolver; @@ -49,7 +48,7 @@ import net.sourceforge.pmd.lang.rule.xpath.NoAttribute; * @see JEP 445: Unnamed Classes and Instance Main Methods (Preview) (Java 21) * @see #isUnnamedClass() */ -public final class ASTCompilationUnit extends AbstractJavaNode implements JavaNode, GenericNode, RootNode { +public final class ASTCompilationUnit extends AbstractJavaNode implements RootNode { private LazyTypeResolver lazyTypeResolver; private List comments; diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTConstructorCall.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTConstructorCall.java index 3258603e23..c70ac0f292 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTConstructorCall.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTConstructorCall.java @@ -22,11 +22,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; * * */ -public final class ASTConstructorCall extends AbstractInvocationExpr - implements ASTPrimaryExpression, - QualifiableExpression, - LeftRecursiveNode, - InvocationNode { +public final class ASTConstructorCall extends AbstractInvocationExpr implements QualifiableExpression, LeftRecursiveNode { ASTConstructorCall(int id) { super(id); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTEnumConstant.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTEnumConstant.java index 3c7d03baf3..4832a5d799 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTEnumConstant.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTEnumConstant.java @@ -19,9 +19,8 @@ import net.sourceforge.pmd.lang.java.types.OverloadSelectionResult; * */ public final class ASTEnumConstant extends AbstractJavaTypeNode - implements Annotatable, - InvocationNode, - ModifierOwner, + implements InvocationNode, + ModifierOwner, ASTBodyDeclaration, InternalInterfaces.VariableIdOwner, JavadocCommentOwner { diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTExecutableDeclaration.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTExecutableDeclaration.java index ce1fca46b8..db9f6d5b03 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTExecutableDeclaration.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTExecutableDeclaration.java @@ -7,7 +7,6 @@ package net.sourceforge.pmd.lang.java.ast; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; -import net.sourceforge.pmd.lang.ast.impl.GenericNode; import net.sourceforge.pmd.lang.java.symbols.JExecutableSymbol; import net.sourceforge.pmd.lang.java.types.JClassType; import net.sourceforge.pmd.lang.java.types.JMethodSig; @@ -32,7 +31,6 @@ public interface ASTExecutableDeclaration extends ModifierOwner, ASTBodyDeclaration, TypeParamOwnerNode, - GenericNode, JavadocCommentOwner { diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTExpression.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTExpression.java index 53fe256d36..3dcea35dd8 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTExpression.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTExpression.java @@ -39,11 +39,7 @@ import net.sourceforge.pmd.lang.java.types.ast.ExprContext; * * */ -public interface ASTExpression - extends JavaNode, - TypeNode, - ASTMemberValue, - ASTSwitchArrowRHS { +public interface ASTExpression extends TypeNode, ASTMemberValue, ASTSwitchArrowRHS { /** * Always returns true. This is to allow XPath queries diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.java index fead94268a..e3ba01bc4a 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.java @@ -22,9 +22,7 @@ import net.sourceforge.pmd.lang.rule.xpath.DeprecatedAttribute; * */ public final class ASTFieldDeclaration extends AbstractJavaNode - implements Iterable, - LeftRecursiveNode, - ModifierOwner, + implements LeftRecursiveNode, ASTBodyDeclaration, InternalInterfaces.MultiVariableIdOwner, JavadocCommentOwner { diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTFormalParameter.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTFormalParameter.java index e889684245..1151c12662 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTFormalParameter.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTFormalParameter.java @@ -25,10 +25,7 @@ import net.sourceforge.pmd.lang.java.types.TypingContext; * */ public final class ASTFormalParameter extends AbstractJavaNode - implements ModifierOwner, - TypeNode, - Annotatable, - VariableIdOwner { + implements ModifierOwner, TypeNode, VariableIdOwner { ASTFormalParameter(int id) { super(id); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.java index 10c06d0a15..6e6857fcd1 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.java @@ -25,9 +25,7 @@ import net.sourceforge.pmd.lang.document.FileLocation; */ // TODO extend AbstractStatement public final class ASTLocalVariableDeclaration extends AbstractJavaNode - implements Iterable, - ASTStatement, - ModifierOwner, + implements ASTStatement, LeftRecursiveNode, // ModifierList is parsed separately in BlockStatement InternalInterfaces.MultiVariableIdOwner { diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTMethodCall.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTMethodCall.java index abde828d20..3ddb812b9f 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTMethodCall.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTMethodCall.java @@ -19,11 +19,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; * * */ -public final class ASTMethodCall extends AbstractInvocationExpr - implements ASTPrimaryExpression, - QualifiableExpression, - InvocationNode, - MethodUsage { +public final class ASTMethodCall extends AbstractInvocationExpr implements QualifiableExpression { ASTMethodCall(int id) { super(id); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTMethodReference.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTMethodReference.java index 84152c4bb9..7106468563 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTMethodReference.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTMethodReference.java @@ -23,8 +23,7 @@ import net.sourceforge.pmd.lang.java.types.TypeSystem; * */ public final class ASTMethodReference extends AbstractJavaExpr - implements ASTPrimaryExpression, - QualifiableExpression, + implements QualifiableExpression, LeftRecursiveNode, MethodUsage, FunctionalExpression { diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTNullLiteral.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTNullLiteral.java index 58180fbad3..05a1cb1b24 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTNullLiteral.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTNullLiteral.java @@ -15,7 +15,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; * * */ -public final class ASTNullLiteral extends AbstractLiteral implements ASTLiteral { +public final class ASTNullLiteral extends AbstractLiteral { ASTNullLiteral(int id) { super(id); } diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.java index 95c4bf5c87..b31b8ec29a 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.java @@ -14,7 +14,7 @@ import net.sourceforge.pmd.lang.java.types.JPrimitiveType; /** * A numeric literal of any type (double, int, long, float, etc). */ -public final class ASTNumericLiteral extends AbstractLiteral implements ASTLiteral { +public final class ASTNumericLiteral extends AbstractLiteral { /** * True if this is an integral literal, ie int OR long, diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTRecordComponentList.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTRecordComponentList.java index 082a3e55e7..0ed93007be 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTRecordComponentList.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTRecordComponentList.java @@ -6,7 +6,6 @@ package net.sourceforge.pmd.lang.java.ast; import net.sourceforge.pmd.lang.java.ast.ASTList.ASTMaybeEmptyListOf; -import net.sourceforge.pmd.lang.java.ast.InternalInterfaces.AllChildrenAreOfType; import net.sourceforge.pmd.lang.java.symbols.JConstructorSymbol; /** @@ -18,8 +17,7 @@ import net.sourceforge.pmd.lang.java.symbols.JConstructorSymbol; * * */ -public final class ASTRecordComponentList extends ASTMaybeEmptyListOf - implements SymbolDeclaratorNode, AllChildrenAreOfType { +public final class ASTRecordComponentList extends ASTMaybeEmptyListOf implements SymbolDeclaratorNode { private JConstructorSymbol symbol; diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTStringLiteral.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTStringLiteral.java index 5612c7a4bc..928138bb5f 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTStringLiteral.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTStringLiteral.java @@ -18,7 +18,7 @@ import net.sourceforge.pmd.util.StringUtil; * in the source ({@link #getLiteralText()}). {@link #getConstValue()} allows to recover * the actual runtime value, by processing escapes. */ -public final class ASTStringLiteral extends AbstractLiteral implements ASTLiteral { +public final class ASTStringLiteral extends AbstractLiteral { private static final String TEXTBLOCK_DELIMITER = "\"\"\""; diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTSwitchExpression.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTSwitchExpression.java index 42b34f67c8..c25ded1073 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTSwitchExpression.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTSwitchExpression.java @@ -18,9 +18,7 @@ import net.sourceforge.pmd.lang.ast.NodeStream; * *

Their syntax is identical though, and described on {@link ASTSwitchLike}. */ -public final class ASTSwitchExpression extends AbstractJavaExpr - implements ASTExpression, - ASTSwitchLike { +public final class ASTSwitchExpression extends AbstractJavaExpr implements ASTSwitchLike { ASTSwitchExpression(int id) { super(id); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTVariableId.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTVariableId.java index 88f97fecfe..73a74cfb19 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTVariableId.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTVariableId.java @@ -43,7 +43,7 @@ import net.sourceforge.pmd.lang.java.types.JTypeMirror; *

Note: This node has been called ASTVariableDeclaratorId in PMD 6. */ // @formatter:on -public final class ASTVariableId extends AbstractTypedSymbolDeclarator implements ModifierOwner, SymbolDeclaratorNode { +public final class ASTVariableId extends AbstractTypedSymbolDeclarator implements ModifierOwner { private String name; private List usages = Collections.emptyList(); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/AbstractTypeBodyDeclaration.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/AbstractTypeBodyDeclaration.java index 342b6ae70a..c916eb2780 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/AbstractTypeBodyDeclaration.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/AbstractTypeBodyDeclaration.java @@ -8,7 +8,7 @@ package net.sourceforge.pmd.lang.java.ast; * @author Clément Fournier * @since 6.2.0 */ -abstract class AbstractTypeBodyDeclaration extends AbstractJavaNode implements JavaNode { +abstract class AbstractTypeBodyDeclaration extends AbstractJavaNode { AbstractTypeBodyDeclaration(int id) { super(id); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/InternalInterfaces.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/InternalInterfaces.java index 208d8f2538..874b310a39 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/InternalInterfaces.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/InternalInterfaces.java @@ -134,7 +134,7 @@ final class InternalInterfaces { ASTVariableId getVarId(); } - interface MultiVariableIdOwner extends JavaNode, Iterable, ModifierOwner { + interface MultiVariableIdOwner extends Iterable, ModifierOwner { /** * Returns a stream of the variable ids declared diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JAccessibleElementSymbol.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JAccessibleElementSymbol.java index 956c2fd1ef..37be4bd6d6 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JAccessibleElementSymbol.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JAccessibleElementSymbol.java @@ -16,7 +16,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; * * @since 7.0.0 */ -public interface JAccessibleElementSymbol extends JElementSymbol, AnnotableSymbol { +public interface JAccessibleElementSymbol extends AnnotableSymbol { /** * Conventional return value of {@link #getPackageName()} for diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JExecutableSymbol.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JExecutableSymbol.java index 076db24b92..c8bbac2c0f 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JExecutableSymbol.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JExecutableSymbol.java @@ -19,7 +19,7 @@ import net.sourceforge.pmd.lang.java.types.Substitution; * Common supertype for {@linkplain JMethodSymbol method} * and {@linkplain JConstructorSymbol constructor symbols}. */ -public interface JExecutableSymbol extends JAccessibleElementSymbol, JTypeParameterOwnerSymbol { +public interface JExecutableSymbol extends JTypeParameterOwnerSymbol { /** diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JTypeDeclSymbol.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JTypeDeclSymbol.java index fbe2aee615..638bcbee7d 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JTypeDeclSymbol.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/JTypeDeclSymbol.java @@ -21,7 +21,7 @@ import net.sourceforge.pmd.lang.java.types.JTypeMirror; * * @since 7.0.0 */ -public interface JTypeDeclSymbol extends JElementSymbol, JAccessibleElementSymbol { +public interface JTypeDeclSymbol extends JAccessibleElementSymbol { /** * Returns true if this class is a symbolic reference to an unresolved diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/ast/AstUnnamedClassSym.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/ast/AstUnnamedClassSym.java index 1d575cd9d5..c8b8c6da48 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/ast/AstUnnamedClassSym.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/ast/AstUnnamedClassSym.java @@ -16,12 +16,11 @@ import net.sourceforge.pmd.lang.java.ast.ASTFieldDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTVariableId; import net.sourceforge.pmd.lang.java.ast.JModifier; -import net.sourceforge.pmd.lang.java.symbols.JClassSymbol; import net.sourceforge.pmd.lang.java.symbols.JFieldSymbol; import net.sourceforge.pmd.lang.java.symbols.JMethodSymbol; import net.sourceforge.pmd.lang.java.symbols.internal.EmptyClassSymbol; -class AstUnnamedClassSym extends EmptyClassSymbol implements JClassSymbol { +class AstUnnamedClassSym extends EmptyClassSymbol { private final List declaredMethods; private final List declaredFields; diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/BasePrimitiveSymbol.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/BasePrimitiveSymbol.java index dd2647ec6e..107f81cc53 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/BasePrimitiveSymbol.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/BasePrimitiveSymbol.java @@ -10,13 +10,12 @@ import java.lang.reflect.Modifier; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; -import net.sourceforge.pmd.lang.java.symbols.JClassSymbol; import net.sourceforge.pmd.lang.java.symbols.internal.EmptyClassSymbol; import net.sourceforge.pmd.lang.java.symbols.internal.SymbolEquality; import net.sourceforge.pmd.lang.java.symbols.internal.SymbolToStrings; import net.sourceforge.pmd.lang.java.types.JPrimitiveType.PrimitiveTypeKind; -abstract class BasePrimitiveSymbol extends EmptyClassSymbol implements JClassSymbol { +abstract class BasePrimitiveSymbol extends EmptyClassSymbol { BasePrimitiveSymbol(TypeSystem ts) { super(() -> ts); diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/JTypeVar.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/JTypeVar.java index 8d3182bb09..432e917c29 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/JTypeVar.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/JTypeVar.java @@ -36,7 +36,7 @@ import net.sourceforge.pmd.lang.java.symbols.SymbolicValue.SymAnnot; *

Type variables do not, in general, use reference identity. Use * equals to compare them. */ -public interface JTypeVar extends JTypeMirror, SubstVar { +public interface JTypeVar extends SubstVar { /** diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceVar.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceVar.java index c36c10a74e..cf5a71ea5c 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceVar.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceVar.java @@ -35,7 +35,7 @@ import net.sourceforge.pmd.lang.java.types.TypeSystem; * type is of no importance outside the implementation of this framework. */ @SuppressWarnings("PMD.CompareObjectsWithEquals") -public final class InferenceVar implements JTypeMirror, SubstVar { +public final class InferenceVar implements SubstVar { // we used to use greek letters (for style), but they're hard to type private static final String NAMES = "abcdefghijklmnopqrstuvwxyz"; // + "αβγδεζηθκλμνξπρςυφχψω" diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ast/MethodInvocMirror.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ast/MethodInvocMirror.java index f42f61f1bd..fd66d5116f 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ast/MethodInvocMirror.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ast/MethodInvocMirror.java @@ -21,10 +21,9 @@ import net.sourceforge.pmd.lang.java.types.TypeConversion; import net.sourceforge.pmd.lang.java.types.TypeOps; import net.sourceforge.pmd.lang.java.types.internal.InternalMethodTypeItf; import net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror; -import net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror.InvocationMirror; import net.sourceforge.pmd.lang.java.types.internal.infer.ast.JavaExprMirrors.MirrorMaker; -class MethodInvocMirror extends BaseInvocMirror implements InvocationMirror { +class MethodInvocMirror extends BaseInvocMirror { MethodInvocMirror(JavaExprMirrors mirrors, ASTMethodCall call, @Nullable ExprMirror parent, MirrorMaker subexprMaker) { diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ast/StandaloneExprMirror.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ast/StandaloneExprMirror.java index bee13975a6..79abd11b51 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ast/StandaloneExprMirror.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ast/StandaloneExprMirror.java @@ -10,7 +10,7 @@ import net.sourceforge.pmd.lang.java.ast.ASTExpression; import net.sourceforge.pmd.lang.java.types.JTypeMirror; import net.sourceforge.pmd.lang.java.types.internal.infer.ExprMirror; -class StandaloneExprMirror extends BaseExprMirror implements ExprMirror { +class StandaloneExprMirror extends BaseExprMirror { StandaloneExprMirror(JavaExprMirrors factory, ASTExpression myNode, @Nullable ExprMirror parent) { super(factory, myNode, parent);