From bb40b754a2c8fa86161b1c8b5c9c087337851282 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 12 Jul 2024 11:16:01 +0200 Subject: [PATCH] [java] Update impl for "Flexible Constructor Bodies" --- .../ast/internal/LanguageLevelChecker.java | 5 +- .../java/ast/Java22PreviewTreeDumpTest.java | 2 +- .../java/ast/Java23PreviewTreeDumpTest.java | 10 + .../Jep482_FlexibleConstructorBodies.java | 106 ++++++ .../Jep482_FlexibleConstructorBodies.txt | 344 ++++++++++++++++++ 5 files changed, 464 insertions(+), 3 deletions(-) create mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.java create mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.txt diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/internal/LanguageLevelChecker.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/internal/LanguageLevelChecker.java index 785b33ca31..4f4e46ee73 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/internal/LanguageLevelChecker.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/internal/LanguageLevelChecker.java @@ -142,8 +142,9 @@ public class LanguageLevelChecker { /** * Statements before super * @see JEP 447: Statements before super(...) (Preview) (Java 22) + * @see JEP 482: Flexible Constructor Bodies (Second Preview) (Java 23) */ - STATEMENTS_BEFORE_SUPER(22, 22, false), + FLEXIBLE_CONSTRUCTOR_BODIES(22, 23, false), ; // SUPPRESS CHECKSTYLE enum trailing semi is awesome @@ -697,7 +698,7 @@ public class LanguageLevelChecker { super.visit(node, data); if (node.getBody().descendants(ASTExplicitConstructorInvocation.class).nonEmpty()) { if (!(node.getBody().getFirstChild() instanceof ASTExplicitConstructorInvocation)) { - check(node, PreviewFeature.STATEMENTS_BEFORE_SUPER, data); + check(node, PreviewFeature.FLEXIBLE_CONSTRUCTOR_BODIES, data); } } return null; diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/Java22PreviewTreeDumpTest.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/Java22PreviewTreeDumpTest.java index 981e27cf68..10f65c3ad1 100644 --- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/Java22PreviewTreeDumpTest.java +++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/Java22PreviewTreeDumpTest.java @@ -101,6 +101,6 @@ class Java22PreviewTreeDumpTest extends BaseJavaTreeDumpTest { @Test void jep447StatementsBeforeSuperBeforeJava22Preview() { ParseException thrown = assertThrows(ParseException.class, () -> java22.parseResource("Jep447_StatementsBeforeSuper.java")); - assertThat(thrown.getMessage(), containsString("Statements before super is a preview feature of JDK 22, you should select your language version accordingly")); + assertThat(thrown.getMessage(), containsString("Flexible constructor bodies is a preview feature of JDK 22, you should select your language version accordingly")); } } diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/Java23PreviewTreeDumpTest.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/Java23PreviewTreeDumpTest.java index d3c12e3d6a..dba9c6b969 100644 --- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/Java23PreviewTreeDumpTest.java +++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/Java23PreviewTreeDumpTest.java @@ -48,4 +48,14 @@ class Java23PreviewTreeDumpTest extends BaseJavaTreeDumpTest { doTest("Jep477_ImplicitlyDeclaredClassesAndInstanceMainMethods2"); } + @Test + void jep482FlexibleConstructorBodies() { + doTest("Jep482_FlexibleConstructorBodies"); + } + + @Test + void jep482FlexibleConstructorBodiesBeforeJava23Preview() { + ParseException thrown = assertThrows(ParseException.class, () -> java23.parseResource("Jep482_FlexibleConstructorBodies.java")); + assertThat(thrown.getMessage(), containsString("Flexible constructor bodies is a preview feature of JDK 23, you should select your language version accordingly")); + } } diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.java b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.java new file mode 100644 index 0000000000..ea1461ab79 --- /dev/null +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.java @@ -0,0 +1,106 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.security.cert.Certificate; +import java.security.interfaces.DSAPublicKey; +import java.security.interfaces.RSAKey; + +/** + * @see JEP 447: Statements before super(...) (Preview) (Java 22) + * @see JEP 482: Flexible Constructor Bodies (Second Preview) (Java 23) + */ +class Jep482_FlexibleConstructorBodies { + // To test backwards compatibility - "normal" explicit constructor invocation + public static class Old { + public Old() { + super(); + } + } + + // Example: Validating superclass constructor arguments + public static class PositiveBigInteger extends BigInteger { + + public PositiveBigInteger(long value) { + if (value <= 0) + throw new IllegalArgumentException("non-positive value"); + final String valueAsString = String.valueOf(value); + super(valueAsString); + } + } + + // Example: Preparing superclass constructor arguments + public static class Super { + public Super(byte[] bytes) {} + } + + public class Sub extends Super { + public Sub(Certificate certificate) { + var publicKey = certificate.getPublicKey(); + if (publicKey == null) + throw new IllegalArgumentException("null certificate"); + final byte[] byteArray = switch (publicKey) { + case RSAKey rsaKey -> rsaKey.toString().getBytes(StandardCharsets.UTF_8); + case DSAPublicKey dsaKey -> dsaKey.toString().getBytes(StandardCharsets.UTF_8); + default -> new byte[0]; + }; + super(byteArray); + } + } + + // Example: Sharing superclass constructor arguments + public static class F {} + public static class Super2 { + public Super2(F f1, F f2) {} + } + public class Sub2 extends Super2 { + public Sub2(int i) { + var f = new F(); + super(f, f); + // ... i ... + } + } + + // Example with records + public record Range(int lo, int hi) { + public Range(int lo, int hi, int maxDistance) { + if (lo > hi) + throw new IllegalArgumentException(String.format("(%d,%d)", lo, hi)); + if (hi - lo > maxDistance) + throw new IllegalArgumentException(String.format("(%d,%d,%d", lo, hi, maxDistance)); + this(lo, hi); + } + } + + // Example with enum + public enum Color { + BLUE(1); + private Color() { + } + private Color(int a) { + if (a < 0) throw new IllegalArgumentException(); + this(); + }; + } + + // Example for Early assignment to fields (new with Java 23 preview) + public static class EarlyAssignmentToFieldsSuper { + EarlyAssignmentToFieldsSuper() { overriddenMethod(); } + + void overriddenMethod() { System.out.println("hello"); } + } + + public static class EarlyAssignmentToFieldsSub extends EarlyAssignmentToFieldsSuper { + final int x; + + EarlyAssignmentToFieldsSub(int x) { + this.x = x; // Initialize the field + super(); // Then invoke the Super constructor explicitly + } + + @Override + void overriddenMethod() { System.out.println(x); } + } +} diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.txt new file mode 100644 index 0000000000..561ffff24b --- /dev/null +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java23p/Jep482_FlexibleConstructorBodies.txt @@ -0,0 +1,344 @@ ++- CompilationUnit[@PackageName = ""] + +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.math.BigInteger", @ImportedSimpleName = "BigInteger", @PackageName = "java.math", @Static = false] + +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.nio.charset.StandardCharsets", @ImportedSimpleName = "StandardCharsets", @PackageName = "java.nio.charset", @Static = false] + +- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.security.cert.Certificate", @ImportedSimpleName = "Certificate", @PackageName = "java.security.cert", @Static = false] + +- 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 = "Jep482_FlexibleConstructorBodies", @CanonicalName = "Jep482_FlexibleConstructorBodies", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "Jep482_FlexibleConstructorBodies", @Static = false, @TopLevel = true, @Visibility = Visibility.V_PACKAGE] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] + +- ClassBody[@Empty = false, @Size = 11] + +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$Old", @CanonicalName = "Jep482_FlexibleConstructorBodies.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 = (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 = (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 = "Jep482_FlexibleConstructorBodies$PositiveBigInteger", @CanonicalName = "Jep482_FlexibleConstructorBodies.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 = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] + | +- ExtendsList[@Empty = false, @Size = 1] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @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 = (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 = ()] + | | +- 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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | +- Block[@Empty = false, @Size = 3, @containsComment = false] + | +- IfStatement[@Else = false] + | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.LE, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "value", @Name = "value", @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] + | | +- ThrowStatement[] + | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] + | | +- 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 = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | +- MethodCall[@CompileTimeConstant = false, @Image = "valueOf", @MethodName = "valueOf", @ParenthesisDepth = 0, @Parenthesized = false] + | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] + | | +- ArgumentList[@Empty = false, @Size = 1] + | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "value", @Name = "value", @ParenthesisDepth = 0, @Parenthesized = false] + | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] + | +- 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 = "Jep482_FlexibleConstructorBodies$Super", @CanonicalName = "Jep482_FlexibleConstructorBodies.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 = (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 = (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 = ()] + | | +- ArrayType[@ArrayDepth = 1] + | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] + | | | +- ArrayDimensions[@Empty = false, @Size = 1] + | | | +- ArrayTypeDim[@Varargs = false] + | | +- 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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | +- Block[@Empty = true, @Size = 0, @containsComment = false] + +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$Sub", @CanonicalName = "Jep482_FlexibleConstructorBodies.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 = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] + | +- ExtendsList[@Empty = false, @Size = 1] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @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 = (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 = ()] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @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, @Unnamed = 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 = ()] + | | +- 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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | +- MethodCall[@CompileTimeConstant = false, @Image = "getPublicKey", @MethodName = "getPublicKey", @ParenthesisDepth = 0, @Parenthesized = false] + | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "certificate", @Name = "certificate", @ParenthesisDepth = 0, @Parenthesized = false] + | | +- ArgumentList[@Empty = true, @Size = 0] + | +- IfStatement[@Else = false] + | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "publicKey", @Name = "publicKey", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- NullLiteral[@CompileTimeConstant = false, @LiteralText = "null", @ParenthesisDepth = 0, @Parenthesized = false] + | | +- ThrowStatement[] + | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] + | | +- 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 = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] + | | +- ArrayType[@ArrayDepth = 1] + | | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] + | | | +- ArrayDimensions[@Empty = false, @Size = 1] + | | | +- ArrayTypeDim[@Varargs = false] + | | +- VariableDeclarator[@Initializer = true, @Name = "byteArray"] + | | +- VariableId[@ArrayType = true, @EffectiveVisibility = Visibility.V_LOCAL, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = true, @Name = "byteArray", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | +- SwitchExpression[@CompileTimeConstant = false, @DefaultCase = true, @EnumSwitch = false, @ExhaustiveEnumSwitch = false, @FallthroughSwitch = false, @ParenthesisDepth = 0, @Parenthesized = false] + | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "publicKey", @Name = "publicKey", @ParenthesisDepth = 0, @Parenthesized = false] + | | +- SwitchArrowBranch[@Default = false] + | | | +- SwitchLabel[@Default = false] + | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] + | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getBytes", @MethodName = "getBytes", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "rsaKey", @Name = "rsaKey", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +- ArgumentList[@Empty = true, @Size = 0] + | | | +- ArgumentList[@Empty = false, @Size = 1] + | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "UTF_8", @Name = "UTF_8", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "StandardCharsets"] + | | +- SwitchArrowBranch[@Default = false] + | | | +- SwitchLabel[@Default = false] + | | | | +- TypePattern[@EffectiveVisibility = Visibility.V_PACKAGE, @Visibility = Visibility.V_PACKAGE] + | | | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] + | | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | | +- MethodCall[@CompileTimeConstant = false, @Image = "getBytes", @MethodName = "getBytes", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- MethodCall[@CompileTimeConstant = false, @Image = "toString", @MethodName = "toString", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "dsaKey", @Name = "dsaKey", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +- ArgumentList[@Empty = true, @Size = 0] + | | | +- ArgumentList[@Empty = false, @Size = 1] + | | | +- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "UTF_8", @Name = "UTF_8", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "StandardCharsets"] + | | +- SwitchArrowBranch[@Default = true] + | | +- SwitchLabel[@Default = true] + | | +- ArrayAllocation[@ArrayDepth = 1, @CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] + | | +- ArrayType[@ArrayDepth = 1] + | | +- PrimitiveType[@Kind = PrimitiveTypeKind.BYTE] + | | +- ArrayDimensions[@Empty = false, @Size = 1] + | | +- ArrayDimExpr[@Varargs = 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] + | +- ExplicitConstructorInvocation[@ArgumentCount = 1, @MethodName = "new", @Qualified = false, @Super = true, @This = false] + | +- 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 = "Jep482_FlexibleConstructorBodies$F", @CanonicalName = "Jep482_FlexibleConstructorBodies.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 = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] + | +- ClassBody[@Empty = true, @Size = 0] + +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$Super2", @CanonicalName = "Jep482_FlexibleConstructorBodies.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 = (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 = (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 = ()] + | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | +- Block[@Empty = true, @Size = 0, @containsComment = false] + +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$Sub2", @CanonicalName = "Jep482_FlexibleConstructorBodies.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 = (JModifier.PUBLIC), @ExplicitModifiers = (JModifier.PUBLIC)] + | +- ExtendsList[@Empty = false, @Size = 1] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @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 = (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 = ()] + | | +- 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, @Unnamed = 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 = ()] + | | +- 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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "F"] + | | +- ArgumentList[@Empty = true, @Size = 0] + | +- ExplicitConstructorInvocation[@ArgumentCount = 2, @MethodName = "new", @Qualified = false, @Super = true, @This = false] + | +- ArgumentList[@Empty = false, @Size = 2] + | +- 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 = "Jep482_FlexibleConstructorBodies$Range", @CanonicalName = "Jep482_FlexibleConstructorBodies.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 = (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 = (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, @Unnamed = false, @Visibility = Visibility.V_PRIVATE] + | | +- RecordComponent[@EffectiveVisibility = Visibility.V_PRIVATE, @Varargs = false, @Visibility = Visibility.V_PRIVATE] + | | +- 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, @Unnamed = 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 = (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 = ()] + | | | +- 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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] + | | | +- 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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] + | | +- 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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | +- Block[@Empty = false, @Size = 3, @containsComment = false] + | +- IfStatement[@Else = false] + | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- 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] + | | +- ThrowStatement[] + | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] + | | +- ArgumentList[@Empty = false, @Size = 1] + | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] + | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] + | | +- ArgumentList[@Empty = false, @Size = 3] + | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "(%d,%d)", @Empty = false, @Image = "\"(%d,%d)\"", @Length = 7, @LiteralText = "\"(%d,%d)\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] + | | +- 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] + | +- IfStatement[@Else = false] + | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.GT, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.SUB, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "hi", @Name = "hi", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "lo", @Name = "lo", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "maxDistance", @Name = "maxDistance", @ParenthesisDepth = 0, @Parenthesized = false] + | | +- ThrowStatement[] + | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] + | | +- ArgumentList[@Empty = false, @Size = 1] + | | +- MethodCall[@CompileTimeConstant = false, @Image = "format", @MethodName = "format", @ParenthesisDepth = 0, @Parenthesized = false] + | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "String"] + | | +- ArgumentList[@Empty = false, @Size = 4] + | | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "(%d,%d,%d", @Empty = false, @Image = "\"(%d,%d,%d\"", @Length = 9, @LiteralText = "\"(%d,%d,%d\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] + | | +- 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] + | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "maxDistance", @Name = "maxDistance", @ParenthesisDepth = 0, @Parenthesized = false] + | +- ExplicitConstructorInvocation[@ArgumentCount = 2, @MethodName = "new", @Qualified = false, @Super = false, @This = true] + | +- ArgumentList[@Empty = false, @Size = 2] + | +- 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 = "Jep482_FlexibleConstructorBodies$Color", @CanonicalName = "Jep482_FlexibleConstructorBodies.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 = (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 = (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, @Unnamed = false, @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 = (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 = (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 = ()] + | | | +- 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, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | | +- Block[@Empty = false, @Size = 2, @containsComment = false] + | | +- IfStatement[@Else = false] + | | | +- InfixExpression[@CompileTimeConstant = false, @Operator = BinaryOp.LT, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "a", @Name = "a", @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] + | | | +- ThrowStatement[] + | | | +- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @MethodName = "new", @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "IllegalArgumentException"] + | | | +- ArgumentList[@Empty = true, @Size = 0] + | | +- ExplicitConstructorInvocation[@ArgumentCount = 0, @MethodName = "new", @Qualified = false, @Super = false, @This = true] + | | +- ArgumentList[@Empty = true, @Size = 0] + | +- EmptyDeclaration[] + +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$EarlyAssignmentToFieldsSuper", @CanonicalName = "Jep482_FlexibleConstructorBodies.EarlyAssignmentToFieldsSuper", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "EarlyAssignmentToFieldsSuper", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] + | +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] + | +- ClassBody[@Empty = false, @Size = 2] + | +- ConstructorDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "EarlyAssignmentToFieldsSuper", @Name = "EarlyAssignmentToFieldsSuper", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = false] + | | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] + | | +- FormalParameters[@Empty = true, @Size = 0] + | | +- Block[@Empty = false, @Size = 1, @containsComment = false] + | | +- ExpressionStatement[] + | | +- MethodCall[@CompileTimeConstant = false, @Image = "overriddenMethod", @MethodName = "overriddenMethod", @ParenthesisDepth = 0, @Parenthesized = false] + | | +- ArgumentList[@Empty = true, @Size = 0] + | +- MethodDeclaration[@Abstract = false, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Name = "overriddenMethod", @Overridden = false, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] + | +- VoidType[] + | +- FormalParameters[@Empty = true, @Size = 0] + | +- Block[@Empty = false, @Size = 1, @containsComment = false] + | +- ExpressionStatement[] + | +- 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] + | | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] + | | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] + | +- ArgumentList[@Empty = false, @Size = 1] + | +- StringLiteral[@CompileTimeConstant = true, @ConstValue = "hello", @Empty = false, @Image = "\"hello\"", @Length = 5, @LiteralText = "\"hello\"", @ParenthesisDepth = 0, @Parenthesized = false, @TextBlock = false] + +- ClassDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "Jep482_FlexibleConstructorBodies$EarlyAssignmentToFieldsSub", @CanonicalName = "Jep482_FlexibleConstructorBodies.EarlyAssignmentToFieldsSub", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "EarlyAssignmentToFieldsSub", @Static = true, @TopLevel = false, @Visibility = Visibility.V_PUBLIC] + +- ModifierList[@EffectiveModifiers = (JModifier.PUBLIC, JModifier.STATIC), @ExplicitModifiers = (JModifier.PUBLIC, JModifier.STATIC)] + +- ExtendsList[@Empty = false, @Size = 1] + | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "EarlyAssignmentToFieldsSuper"] + +- ClassBody[@Empty = false, @Size = 3] + +- FieldDeclaration[@EffectiveVisibility = Visibility.V_PACKAGE, @Static = false, @Visibility = Visibility.V_PACKAGE] + | +- ModifierList[@EffectiveModifiers = (JModifier.FINAL), @ExplicitModifiers = (JModifier.FINAL)] + | +- PrimitiveType[@Kind = PrimitiveTypeKind.INT] + | +- VariableDeclarator[@Initializer = false, @Name = "x"] + | +- VariableId[@ArrayType = false, @EffectiveVisibility = Visibility.V_PACKAGE, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = true, @ForLoopVariable = false, @ForeachVariable = false, @FormalParameter = false, @LambdaParameter = false, @LocalVariable = false, @Name = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_PACKAGE] + +- ConstructorDeclaration[@Abstract = false, @Arity = 1, @EffectiveVisibility = Visibility.V_PACKAGE, @Final = false, @Image = "EarlyAssignmentToFieldsSub", @Name = "EarlyAssignmentToFieldsSub", @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @containsComment = true] + | +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] + | +- FormalParameters[@Empty = false, @Size = 1] + | | +- FormalParameter[@EffectiveVisibility = Visibility.V_LOCAL, @Final = false, @Varargs = false, @Visibility = Visibility.V_LOCAL] + | | +- 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 = "x", @PatternBinding = false, @RecordComponent = false, @ResourceDeclaration = false, @Static = false, @TypeInferred = false, @Unnamed = false, @Visibility = Visibility.V_LOCAL] + | +- Block[@Empty = false, @Size = 2, @containsComment = true] + | +- ExpressionStatement[] + | | +- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | | +- FieldAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +- ThisExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] + | | +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = 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_PACKAGE, @Final = false, @Name = "overriddenMethod", @Overridden = true, @Static = false, @Varargs = false, @Visibility = Visibility.V_PACKAGE, @Void = true] + +- ModifierList[@EffectiveModifiers = (), @ExplicitModifiers = ()] + | +- Annotation[@SimpleName = "Override"] + | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "Override"] + +- VoidType[] + +- FormalParameters[@Empty = true, @Size = 0] + +- Block[@Empty = false, @Size = 1, @containsComment = false] + +- ExpressionStatement[] + +- 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] + | +- TypeExpression[@CompileTimeConstant = false, @ParenthesisDepth = 0, @Parenthesized = false] + | +- ClassType[@FullyQualified = false, @PackageQualifier = null, @SimpleName = "System"] + +- ArgumentList[@Empty = false, @Size = 1] + +- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Image = "x", @Name = "x", @ParenthesisDepth = 0, @Parenthesized = false]