[java] Fix TypePattern and Modifiers
This commit is contained in:
@ -490,6 +490,32 @@ class JavaParserImpl {
|
||||
jjtree.pushNode(emptyMods);
|
||||
}
|
||||
|
||||
private void insertEmptyModifierListWithAnnotations(AbstractJavaNode node, AbstractJavaNode nodeWithAnnotations) {
|
||||
ASTModifierList emptyMods = new ASTModifierList(JJTMODIFIERLIST);
|
||||
|
||||
emptyMods.setDeclaredModifiers(Collections.emptySet());
|
||||
|
||||
JavaccToken tok = JavaccToken.implicitBefore(node.getFirstToken());
|
||||
emptyMods.setFirstToken(tok);
|
||||
emptyMods.setLastToken(tok);
|
||||
|
||||
List<ASTAnnotation> annotations = new ArrayList<ASTAnnotation>();
|
||||
while (nodeWithAnnotations.getNumChildren() > 0 && nodeWithAnnotations.getChild(0) instanceof ASTAnnotation) {
|
||||
ASTAnnotation annotation = (ASTAnnotation) nodeWithAnnotations.getChild(0);
|
||||
nodeWithAnnotations.removeChildAtIndex(0);
|
||||
annotations.add(annotation);
|
||||
}
|
||||
for (int i = 0; i < annotations.size(); i++) {
|
||||
emptyMods.addChild(annotations.get(i), i);
|
||||
}
|
||||
if (!annotations.isEmpty()) {
|
||||
emptyMods.setFirstToken(annotations.get(0).getFirstToken());
|
||||
emptyMods.setLastToken(annotations.get(annotations.size() - 1).getLastToken());
|
||||
}
|
||||
|
||||
node.insertChild(emptyMods, 0);
|
||||
}
|
||||
|
||||
private void forceTypeContext() {
|
||||
AbstractJavaNode top = jjtree.peekNode();
|
||||
|
||||
@ -1196,12 +1222,6 @@ void VariableDeclaratorId() :
|
||||
<IDENTIFIER> { setLastTokenImage(jjtThis); }
|
||||
}
|
||||
|
||||
void BindingVarId() #VariableDeclaratorId:
|
||||
{ pushEmptyModifierList(); }
|
||||
{
|
||||
<IDENTIFIER> { setLastTokenImage(jjtThis); }
|
||||
}
|
||||
|
||||
void VariableIdWithDims() #VariableDeclaratorId :
|
||||
{}
|
||||
{
|
||||
@ -1691,21 +1711,24 @@ void InstanceOfExpression() #void:
|
||||
LOOKAHEAD(1)
|
||||
("instanceof"
|
||||
(
|
||||
AnnotatedRefType() [ BindingVarId() #TypePattern(2) ]
|
||||
AnnotatedRefType() [ VariableDeclaratorId() #TypePattern(2) ]
|
||||
|
|
||||
( LocalVarModifierList() ReferenceType() BindingVarId() ) #TypePattern(3)
|
||||
( LocalVarModifierList() ReferenceType() VariableDeclaratorId() ) #TypePattern(3)
|
||||
)
|
||||
{
|
||||
jjtThis.setOp(BinaryOp.INSTANCEOF);
|
||||
AbstractJavaNode top = jjtree.popNode();
|
||||
if (top instanceof ASTPattern) {
|
||||
if (top.getNumChildren() == 2) {
|
||||
insertEmptyModifierListWithAnnotations(top, (AbstractJavaNode) top.getChild(0));
|
||||
}
|
||||
top = new ASTPatternExpression((ASTPattern) top);
|
||||
} else {
|
||||
top = new ASTTypeExpression((ASTType) top);
|
||||
}
|
||||
jjtree.pushNode(top);
|
||||
}
|
||||
{}
|
||||
{} // seems to be important?
|
||||
) #InfixExpression(2)
|
||||
]
|
||||
}
|
||||
|
@ -208,15 +208,6 @@ public final class ASTModifierList extends AbstractJavaNode {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visit(ASTVariableDeclaratorId node, Set<JModifier> effective) {
|
||||
// resources are implicitly final
|
||||
if (node.isPatternBinding()) {
|
||||
effective.add(FINAL);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visit(ASTLocalVariableDeclaration node, Set<JModifier> effective) {
|
||||
// resources are implicitly final
|
||||
|
@ -19,9 +19,7 @@ import java.util.List;
|
||||
*
|
||||
* @see <a href="https://openjdk.java.net/jeps/394">JEP 394: Pattern Matching for instanceof</a>
|
||||
*/
|
||||
public final class ASTTypePattern extends AbstractJavaNode implements ASTPattern {
|
||||
|
||||
private boolean isFinal;
|
||||
public final class ASTTypePattern extends AbstractJavaNode implements ASTPattern, AccessNode {
|
||||
|
||||
ASTTypePattern(int id) {
|
||||
super(id);
|
||||
@ -43,12 +41,4 @@ public final class ASTTypePattern extends AbstractJavaNode implements ASTPattern
|
||||
public ASTVariableDeclaratorId getVarId() {
|
||||
return getFirstChildOfType(ASTVariableDeclaratorId.class);
|
||||
}
|
||||
|
||||
void setFinal(boolean isFinal) {
|
||||
this.isFinal = isFinal;
|
||||
}
|
||||
|
||||
boolean isFinal() {
|
||||
return isFinal;
|
||||
}
|
||||
}
|
||||
|
@ -90,12 +90,6 @@ public final class ASTVariableDeclaratorId extends AbstractTypedSymbolDeclarator
|
||||
@NonNull
|
||||
@Override
|
||||
public ASTModifierList getModifiers() {
|
||||
if (isPatternBinding()) {
|
||||
JavaNode firstChild = getFirstChild();
|
||||
assert firstChild != null : "Binding variable has no modifiers!";
|
||||
return (ASTModifierList) firstChild;
|
||||
}
|
||||
|
||||
// delegates modifiers
|
||||
return getModifierOwnerParent().getModifiers();
|
||||
}
|
||||
@ -111,8 +105,6 @@ public final class ASTVariableDeclaratorId extends AbstractTypedSymbolDeclarator
|
||||
JavaNode parent = getParent();
|
||||
if (parent instanceof ASTVariableDeclarator) {
|
||||
return (AccessNode) parent.getParent();
|
||||
} else if (parent instanceof ASTTypePattern) {
|
||||
return this; // this is pretty weird
|
||||
}
|
||||
return (AccessNode) parent;
|
||||
}
|
||||
|
@ -10,16 +10,15 @@ import net.sourceforge.pmd.lang.ast.test.shouldBe as typeShouldBe
|
||||
import net.sourceforge.pmd.lang.java.ast.JavaVersion.*
|
||||
import java.io.IOException
|
||||
|
||||
class ASTPatternTest : ParserTestSpec({
|
||||
class ASTPatternTest : ProcessorTestSpec({
|
||||
|
||||
val typePatternsVersions = JavaVersion.since(J16).plus(J15__PREVIEW)
|
||||
|
||||
parserTest("Test patterns only available on JDK 15 (preview) and JDK16 and JDK16 (preview)", javaVersions = typePatternsVersions) {
|
||||
parserTest("Test patterns only available on JDK 15 (preview) and JDK16 and JDK16 (preview)",
|
||||
javaVersions = JavaVersion.except(typePatternsVersions)) {
|
||||
|
||||
inContext(ExpressionParsingCtx) {
|
||||
"obj instanceof Class c" should throwParseException {
|
||||
it.message.shouldContain("Type patterns in instanceof was only standardized in Java 16")
|
||||
}
|
||||
"obj instanceof Class c" shouldNot parse()
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,13 +31,14 @@ class ASTPatternTest : ParserTestSpec({
|
||||
infixExpr(BinaryOp.INSTANCEOF) {
|
||||
variableAccess("obj")
|
||||
child<ASTPatternExpression> {
|
||||
//it.isAnnotationPresent("java.lang.Deprecated") shouldBe false
|
||||
it::getPattern shouldBe child<ASTTypePattern> {
|
||||
it::getTypeNode shouldBe classType("Class")
|
||||
it::getVarId shouldBe variableId("c") {
|
||||
it::getModifiers shouldBe modifiers { } // dummy modifier list
|
||||
it.pattern shouldBe child<ASTTypePattern> {
|
||||
it.isAnnotationPresent("java.lang.Deprecated") shouldBe false
|
||||
it.modifiers shouldBe modifiers { } // dummy/empty modifier list
|
||||
it.typeNode shouldBe classType("Class")
|
||||
it.varId shouldBe variableId("c") {
|
||||
it.hasExplicitModifiers(JModifier.FINAL) shouldBe false
|
||||
it.hasModifiers(JModifier.FINAL) shouldBe false
|
||||
it.isPatternBinding shouldBe true
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -49,13 +49,14 @@ class ASTPatternTest : ParserTestSpec({
|
||||
infixExpr(BinaryOp.INSTANCEOF) {
|
||||
variableAccess("obj")
|
||||
child<ASTPatternExpression> {
|
||||
//it.isAnnotationPresent("java.lang.Deprecated") shouldBe false
|
||||
it::getPattern shouldBe child<ASTTypePattern> {
|
||||
it::getTypeNode shouldBe classType("Class")
|
||||
it::getVarId shouldBe variableId("c") {
|
||||
it::getModifiers shouldBe modifiers { } // dummy modifier list
|
||||
it.pattern shouldBe child<ASTTypePattern> {
|
||||
it.isAnnotationPresent("java.lang.Deprecated") shouldBe false
|
||||
it.modifiers shouldBe modifiers { } // explicit modifier list
|
||||
it.typeNode shouldBe classType("Class")
|
||||
it.varId shouldBe variableId("c") {
|
||||
it.hasExplicitModifiers(JModifier.FINAL) shouldBe true
|
||||
it.hasModifiers(JModifier.FINAL) shouldBe true
|
||||
it.isPatternBinding shouldBe true
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -66,17 +67,16 @@ class ASTPatternTest : ParserTestSpec({
|
||||
infixExpr(BinaryOp.INSTANCEOF) {
|
||||
variableAccess("obj")
|
||||
child<ASTPatternExpression> {
|
||||
child<ASTAnnotation>(ignoreChildren = true) {
|
||||
it.annotationName shouldBe "Deprecated"
|
||||
}
|
||||
|
||||
//it.isAnnotationPresent("java.lang.Deprecated") shouldBe true
|
||||
it::getPattern shouldBe child<ASTTypePattern> {
|
||||
it::getTypeNode shouldBe classType("Class")
|
||||
it::getVarId shouldBe variableId("c") {
|
||||
it::getModifiers shouldBe modifiers { } // dummy modifier list
|
||||
it.hasExplicitModifiers(JModifier.FINAL) shouldBe true
|
||||
it.hasModifiers(JModifier.FINAL) shouldBe true
|
||||
it.pattern shouldBe child<ASTTypePattern> {
|
||||
it.isAnnotationPresent("java.lang.Deprecated") shouldBe true
|
||||
it.modifiers shouldBe modifiers {
|
||||
annotation("Deprecated")
|
||||
}
|
||||
it.typeNode shouldBe classType("Class")
|
||||
it.varId shouldBe variableId("c") {
|
||||
it.hasExplicitModifiers(JModifier.FINAL) shouldBe false
|
||||
it.hasModifiers(JModifier.FINAL) shouldBe false
|
||||
it.isPatternBinding shouldBe true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,40 +0,0 @@
|
||||
+- CompilationUnit[@PackageName = "", @declarationsAreInDefaultPackage = true]
|
||||
+- TypeDeclaration[]
|
||||
+- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "LocalClassAndInterfaceDeclarations", @Default = false, @Final = false, @Image = "LocalClassAndInterfaceDeclarations", @Interface = false, @Local = false, @Modifiers = 1, @Native = false, @Nested = false, @NonSealed = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Sealed = false, @SimpleName = "LocalClassAndInterfaceDeclarations", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false]
|
||||
+- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false]
|
||||
+- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.INITIALIZER]
|
||||
+- Initializer[@Static = false]
|
||||
+- Block[@containsComment = true]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "LocalClassAndInterfaceDeclarations$1MyLocalClass", @Default = false, @Final = false, @Image = "MyLocalClass", @Interface = false, @Local = true, @Modifiers = 0, @Native = false, @Nested = false, @NonSealed = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = false, @Sealed = false, @SimpleName = "MyLocalClass", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false]
|
||||
| +- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false]
|
||||
| +- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.FIELD]
|
||||
| | +- FieldDeclaration[@Abstract = false, @AnnotationMember = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = true, @InterfaceMember = false, @Modifiers = 48, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = true, @Strictfp = false, @Synchronized = false, @SyntacticallyFinal = true, @SyntacticallyPublic = false, @SyntacticallyStatic = true, @Transient = false, @VariableName = "constantField", @Volatile = false]
|
||||
| | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| | +- VariableDeclarator[@Initializer = true, @Name = "constantField"]
|
||||
| | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = true, @Final = true, @FormalParameter = false, @Image = "constantField", @LambdaParameter = false, @LocalVariable = false, @Name = "constantField", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "constantField"]
|
||||
| | +- VariableInitializer[]
|
||||
| | +- Expression[@StandAlonePrimitive = true]
|
||||
| | +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- Literal[@CharLiteral = false, @DoubleLiteral = false, @EscapedStringLiteral = "1", @FloatLiteral = false, @Image = "1", @IntLiteral = true, @LongLiteral = false, @SingleCharacterStringLiteral = false, @StringLiteral = false, @TextBlock = false, @TextBlockContent = "1", @ValueAsDouble = NaN, @ValueAsFloat = NaN, @ValueAsInt = 1, @ValueAsLong = 1]
|
||||
| +- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.FIELD]
|
||||
| | +- FieldDeclaration[@Abstract = false, @AnnotationMember = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @InterfaceMember = false, @Modifiers = 16, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = true, @Strictfp = false, @Synchronized = false, @SyntacticallyFinal = false, @SyntacticallyPublic = false, @SyntacticallyStatic = true, @Transient = false, @VariableName = "staticField", @Volatile = false]
|
||||
| | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| | +- VariableDeclarator[@Initializer = false, @Name = "staticField"]
|
||||
| | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = true, @Final = false, @FormalParameter = false, @Image = "staticField", @LambdaParameter = false, @LocalVariable = false, @Name = "staticField", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "staticField"]
|
||||
| +- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD]
|
||||
| +- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "staticMethod", @Modifiers = 16, @Name = "staticMethod", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = true, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Void = true, @Volatile = false]
|
||||
| +- ResultType[@Void = true, @returnsArray = false]
|
||||
| +- MethodDeclarator[@Image = "staticMethod", @ParameterCount = 0]
|
||||
| | +- FormalParameters[@ParameterCount = 0, @Size = 0]
|
||||
| +- Block[@containsComment = false]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "LocalClassAndInterfaceDeclarations$1MyLocalInterface", @Default = false, @Final = false, @Image = "MyLocalInterface", @Interface = true, @Local = true, @Modifiers = 0, @Native = false, @Nested = false, @NonSealed = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = false, @Sealed = false, @SimpleName = "MyLocalInterface", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.INTERFACE, @Volatile = false]
|
||||
| +- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
+- EnumDeclaration[@Abstract = false, @BinaryName = "LocalClassAndInterfaceDeclarations$MyLocalEnum", @Default = false, @Final = false, @Image = "MyLocalEnum", @Local = true, @Modifiers = 0, @Native = false, @Nested = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "MyLocalEnum", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.ENUM, @Volatile = false]
|
||||
+- EnumBody[]
|
||||
+- EnumConstant[@AnonymousClass = false, @Image = "A"]
|
@ -1,292 +0,0 @@
|
||||
+- CompilationUnit[@PackageName = "", @declarationsAreInDefaultPackage = true]
|
||||
+- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.stream.Collectors", @ImportedSimpleName = "Collectors", @PackageName = "java.util.stream", @Static = false]
|
||||
| +- Name[@Image = "java.util.stream.Collectors"]
|
||||
+- ImportDeclaration[@ImportOnDemand = false, @ImportedName = "java.util.List", @ImportedSimpleName = "List", @PackageName = "java.util", @Static = false]
|
||||
| +- Name[@Image = "java.util.List"]
|
||||
+- TypeDeclaration[]
|
||||
+- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "LocalRecords", @Default = false, @Final = false, @Image = "LocalRecords", @Interface = false, @Local = false, @Modifiers = 1, @Native = false, @Nested = false, @NonSealed = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Sealed = false, @SimpleName = "LocalRecords", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false]
|
||||
+- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false]
|
||||
+- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.INTERFACE]
|
||||
| +- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "LocalRecords$Merchant", @Default = false, @Final = false, @Image = "Merchant", @Interface = true, @Local = false, @Modifiers = 1, @Native = false, @Nested = true, @NonSealed = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Sealed = false, @SimpleName = "Merchant", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.INTERFACE, @Volatile = false]
|
||||
| +- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false]
|
||||
+- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD]
|
||||
| +- MethodDeclaration[@Abstract = false, @Arity = 2, @Default = false, @Final = false, @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "computeSales", @Modifiers = 17, @Name = "computeSales", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = true, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Void = false, @Volatile = false]
|
||||
| +- ResultType[@Void = false, @returnsArray = false]
|
||||
| | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "double"]
|
||||
| | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "double"]
|
||||
| +- MethodDeclarator[@Image = "computeSales", @ParameterCount = 2]
|
||||
| | +- FormalParameters[@ParameterCount = 2, @Size = 2]
|
||||
| | +- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @ExplicitReceiverParameter = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false]
|
||||
| | | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "Merchant"]
|
||||
| | | | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | | | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "Merchant", @ReferenceToClassSameCompilationUnit = true]
|
||||
| | | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "merchant", @LambdaParameter = false, @LocalVariable = false, @Name = "merchant", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "merchant"]
|
||||
| | +- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @ExplicitReceiverParameter = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false]
|
||||
| | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "month", @LambdaParameter = false, @LocalVariable = false, @Name = "month", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "month"]
|
||||
| +- Block[@containsComment = false]
|
||||
| +- BlockStatement[@Allocation = false]
|
||||
| +- Statement[]
|
||||
| +- ReturnStatement[]
|
||||
| +- Expression[@StandAlonePrimitive = false]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Name[@Image = "month"]
|
||||
+- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD]
|
||||
| +- MethodDeclaration[@Abstract = false, @Arity = 2, @Default = false, @Final = false, @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "findTopMerchants", @Modifiers = 0, @Name = "findTopMerchants", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Void = false, @Volatile = false]
|
||||
| +- ResultType[@Void = false, @returnsArray = false]
|
||||
| | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "List"]
|
||||
| | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "List", @ReferenceToClassSameCompilationUnit = false]
|
||||
| | +- TypeArguments[@Diamond = false]
|
||||
| | +- TypeArgument[@Wildcard = false]
|
||||
| | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "Merchant", @ReferenceToClassSameCompilationUnit = true]
|
||||
| +- MethodDeclarator[@Image = "findTopMerchants", @ParameterCount = 2]
|
||||
| | +- FormalParameters[@ParameterCount = 2, @Size = 2]
|
||||
| | +- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @ExplicitReceiverParameter = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false]
|
||||
| | | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "List"]
|
||||
| | | | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | | | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "List", @ReferenceToClassSameCompilationUnit = false]
|
||||
| | | | +- TypeArguments[@Diamond = false]
|
||||
| | | | +- TypeArgument[@Wildcard = false]
|
||||
| | | | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | | | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "Merchant", @ReferenceToClassSameCompilationUnit = true]
|
||||
| | | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "merchants", @LambdaParameter = false, @LocalVariable = false, @Name = "merchants", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "merchants"]
|
||||
| | +- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @ExplicitReceiverParameter = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false]
|
||||
| | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "month", @LambdaParameter = false, @LocalVariable = false, @Name = "month", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "month"]
|
||||
| +- Block[@containsComment = false]
|
||||
| +- BlockStatement[@Allocation = false]
|
||||
| | +- RecordDeclaration[@Abstract = false, @BinaryName = "LocalRecords$MerchantSales", @Default = false, @Final = true, @Image = "MerchantSales", @Local = true, @Modifiers = 0, @Native = false, @Nested = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "MerchantSales", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.RECORD, @Volatile = false]
|
||||
| | +- RecordComponentList[@Size = 2]
|
||||
| | | +- RecordComponent[@Varargs = false]
|
||||
| | | | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "Merchant"]
|
||||
| | | | | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | | | | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "Merchant", @ReferenceToClassSameCompilationUnit = true]
|
||||
| | | | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "merchant", @LambdaParameter = false, @LocalVariable = false, @Name = "merchant", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "merchant"]
|
||||
| | | +- RecordComponent[@Varargs = false]
|
||||
| | | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "double"]
|
||||
| | | | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "double"]
|
||||
| | | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "sales", @LambdaParameter = false, @LocalVariable = false, @Name = "sales", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "sales"]
|
||||
| | +- RecordBody[]
|
||||
| +- BlockStatement[@Allocation = false]
|
||||
| +- Statement[]
|
||||
| +- ReturnStatement[]
|
||||
| +- Expression[@StandAlonePrimitive = false]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- Name[@Image = "merchants.stream"]
|
||||
| +- PrimarySuffix[@ArgumentCount = 0, @Arguments = true, @ArrayDereference = false]
|
||||
| | +- Arguments[@ArgumentCount = 0, @Size = 0]
|
||||
| +- PrimarySuffix[@ArgumentCount = -1, @Arguments = false, @ArrayDereference = false, @Image = "map"]
|
||||
| +- PrimarySuffix[@ArgumentCount = 1, @Arguments = true, @ArrayDereference = false]
|
||||
| | +- Arguments[@ArgumentCount = 1, @Size = 1]
|
||||
| | +- ArgumentList[@Size = 1]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- LambdaExpression[@Abstract = false, @Default = false, @Final = false, @Kind = MethodLikeKind.LAMBDA, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Volatile = false]
|
||||
| | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "merchant", @LambdaParameter = true, @LocalVariable = false, @Name = "merchant", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = true, @VariableName = "merchant"]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- AllocationExpression[@AnonymousClass = false]
|
||||
| | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "MerchantSales", @ReferenceToClassSameCompilationUnit = false]
|
||||
| | +- Arguments[@ArgumentCount = 2, @Size = 2]
|
||||
| | +- ArgumentList[@Size = 2]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | | +- PrimaryExpression[]
|
||||
| | | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | | +- Name[@Image = "merchant"]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | | +- Name[@Image = "computeSales"]
|
||||
| | +- PrimarySuffix[@ArgumentCount = 2, @Arguments = true, @ArrayDereference = false]
|
||||
| | +- Arguments[@ArgumentCount = 2, @Size = 2]
|
||||
| | +- ArgumentList[@Size = 2]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | | +- PrimaryExpression[]
|
||||
| | | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | | +- Name[@Image = "merchant"]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- Name[@Image = "month"]
|
||||
| +- PrimarySuffix[@ArgumentCount = -1, @Arguments = false, @ArrayDereference = false, @Image = "sorted"]
|
||||
| +- PrimarySuffix[@ArgumentCount = 1, @Arguments = true, @ArrayDereference = false]
|
||||
| | +- Arguments[@ArgumentCount = 1, @Size = 1]
|
||||
| | +- ArgumentList[@Size = 1]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- LambdaExpression[@Abstract = false, @Default = false, @Final = false, @Kind = MethodLikeKind.LAMBDA, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Volatile = false]
|
||||
| | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "m1", @LambdaParameter = true, @LocalVariable = false, @Name = "m1", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = true, @VariableName = "m1"]
|
||||
| | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "m2", @LambdaParameter = true, @LocalVariable = false, @Name = "m2", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = true, @VariableName = "m2"]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | | +- Name[@Image = "Double.compare"]
|
||||
| | +- PrimarySuffix[@ArgumentCount = 2, @Arguments = true, @ArrayDereference = false]
|
||||
| | +- Arguments[@ArgumentCount = 2, @Size = 2]
|
||||
| | +- ArgumentList[@Size = 2]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | | +- PrimaryExpression[]
|
||||
| | | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | | | +- Name[@Image = "m2.sales"]
|
||||
| | | +- PrimarySuffix[@ArgumentCount = 0, @Arguments = true, @ArrayDereference = false]
|
||||
| | | +- Arguments[@ArgumentCount = 0, @Size = 0]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | | +- Name[@Image = "m1.sales"]
|
||||
| | +- PrimarySuffix[@ArgumentCount = 0, @Arguments = true, @ArrayDereference = false]
|
||||
| | +- Arguments[@ArgumentCount = 0, @Size = 0]
|
||||
| +- PrimarySuffix[@ArgumentCount = -1, @Arguments = false, @ArrayDereference = false, @Image = "map"]
|
||||
| +- PrimarySuffix[@ArgumentCount = 1, @Arguments = true, @ArrayDereference = false]
|
||||
| | +- Arguments[@ArgumentCount = 1, @Size = 1]
|
||||
| | +- ArgumentList[@Size = 1]
|
||||
| | +- Expression[@StandAlonePrimitive = false]
|
||||
| | +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | | +- Name[@Image = "MerchantSales"]
|
||||
| | +- PrimarySuffix[@ArgumentCount = -1, @Arguments = false, @ArrayDereference = false]
|
||||
| | +- MemberSelector[]
|
||||
| | +- MethodReference[@Image = "merchant"]
|
||||
| +- PrimarySuffix[@ArgumentCount = -1, @Arguments = false, @ArrayDereference = false, @Image = "collect"]
|
||||
| +- PrimarySuffix[@ArgumentCount = 1, @Arguments = true, @ArrayDereference = false]
|
||||
| +- Arguments[@ArgumentCount = 1, @Size = 1]
|
||||
| +- ArgumentList[@Size = 1]
|
||||
| +- Expression[@StandAlonePrimitive = false]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- Name[@Image = "Collectors.toList"]
|
||||
| +- PrimarySuffix[@ArgumentCount = 0, @Arguments = true, @ArrayDereference = false]
|
||||
| +- Arguments[@ArgumentCount = 0, @Size = 0]
|
||||
+- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD]
|
||||
| +- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "methodWithLocalRecordAndModifiers", @Modifiers = 0, @Name = "methodWithLocalRecordAndModifiers", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Void = true, @Volatile = false]
|
||||
| +- ResultType[@Void = true, @returnsArray = false]
|
||||
| +- MethodDeclarator[@Image = "methodWithLocalRecordAndModifiers", @ParameterCount = 0]
|
||||
| | +- FormalParameters[@ParameterCount = 0, @Size = 0]
|
||||
| +- Block[@containsComment = false]
|
||||
| +- BlockStatement[@Allocation = false]
|
||||
| | +- RecordDeclaration[@Abstract = false, @BinaryName = "LocalRecords$MyRecord1", @Default = false, @Final = true, @Image = "MyRecord1", @Local = true, @Modifiers = 32, @Native = false, @Nested = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "MyRecord1", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.RECORD, @Volatile = false]
|
||||
| | +- RecordComponentList[@Size = 1]
|
||||
| | | +- RecordComponent[@Varargs = false]
|
||||
| | | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "String"]
|
||||
| | | | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | | | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "String", @ReferenceToClassSameCompilationUnit = false]
|
||||
| | | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "a", @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "a"]
|
||||
| | +- RecordBody[]
|
||||
| +- BlockStatement[@Allocation = false]
|
||||
| | +- RecordDeclaration[@Abstract = false, @BinaryName = "LocalRecords$MyRecord2", @Default = false, @Final = true, @Image = "MyRecord2", @Local = true, @Modifiers = 48, @Native = false, @Nested = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "MyRecord2", @Static = true, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.RECORD, @Volatile = false]
|
||||
| | +- RecordComponentList[@Size = 1]
|
||||
| | | +- RecordComponent[@Varargs = false]
|
||||
| | | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "String"]
|
||||
| | | | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | | | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "String", @ReferenceToClassSameCompilationUnit = false]
|
||||
| | | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "a", @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "a"]
|
||||
| | +- RecordBody[]
|
||||
| +- BlockStatement[@Allocation = false]
|
||||
| | +- Annotation[@AnnotationName = "Deprecated"]
|
||||
| | | +- MarkerAnnotation[@AnnotationName = "Deprecated"]
|
||||
| | | +- Name[@Image = "Deprecated"]
|
||||
| | +- RecordDeclaration[@Abstract = false, @BinaryName = "LocalRecords$MyRecord3", @Default = false, @Final = true, @Image = "MyRecord3", @Local = true, @Modifiers = 0, @Native = false, @Nested = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "MyRecord3", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.RECORD, @Volatile = false]
|
||||
| | +- RecordComponentList[@Size = 1]
|
||||
| | | +- RecordComponent[@Varargs = false]
|
||||
| | | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "String"]
|
||||
| | | | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | | | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "String", @ReferenceToClassSameCompilationUnit = false]
|
||||
| | | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "a", @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "a"]
|
||||
| | +- RecordBody[]
|
||||
| +- BlockStatement[@Allocation = false]
|
||||
| +- Annotation[@AnnotationName = "Deprecated"]
|
||||
| | +- MarkerAnnotation[@AnnotationName = "Deprecated"]
|
||||
| | +- Name[@Image = "Deprecated"]
|
||||
| +- RecordDeclaration[@Abstract = false, @BinaryName = "LocalRecords$MyRecord4", @Default = false, @Final = true, @Image = "MyRecord4", @Local = true, @Modifiers = 48, @Native = false, @Nested = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "MyRecord4", @Static = true, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.RECORD, @Volatile = false]
|
||||
| +- RecordComponentList[@Size = 1]
|
||||
| | +- RecordComponent[@Varargs = false]
|
||||
| | +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "String"]
|
||||
| | | +- ReferenceType[@Array = false, @ArrayDepth = 0]
|
||||
| | | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = false, @ArrayDepth = 0, @Image = "String", @ReferenceToClassSameCompilationUnit = false]
|
||||
| | +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "a", @LambdaParameter = false, @LocalVariable = false, @Name = "a", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "a"]
|
||||
| +- RecordBody[]
|
||||
+- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD]
|
||||
| +- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "methodWithLocalClass", @Modifiers = 0, @Name = "methodWithLocalClass", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Void = true, @Volatile = false]
|
||||
| +- ResultType[@Void = true, @returnsArray = false]
|
||||
| +- MethodDeclarator[@Image = "methodWithLocalClass", @ParameterCount = 0]
|
||||
| | +- FormalParameters[@ParameterCount = 0, @Size = 0]
|
||||
| +- Block[@containsComment = false]
|
||||
| +- BlockStatement[@Allocation = false]
|
||||
| +- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "LocalRecords$1MyLocalClass", @Default = false, @Final = false, @Image = "MyLocalClass", @Interface = false, @Local = true, @Modifiers = 0, @Native = false, @Nested = false, @NonSealed = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = false, @Sealed = false, @SimpleName = "MyLocalClass", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false]
|
||||
| +- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false]
|
||||
+- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD]
|
||||
+- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "methodWithLocalVarsNamedSealed", @Modifiers = 0, @Name = "methodWithLocalVarsNamedSealed", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Void = true, @Volatile = false]
|
||||
+- ResultType[@Void = true, @returnsArray = false]
|
||||
+- MethodDeclarator[@Image = "methodWithLocalVarsNamedSealed", @ParameterCount = 0]
|
||||
| +- FormalParameters[@ParameterCount = 0, @Size = 0]
|
||||
+- Block[@containsComment = false]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "result", @Volatile = false]
|
||||
| +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| +- VariableDeclarator[@Initializer = true, @Name = "result"]
|
||||
| +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "result", @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "result"]
|
||||
| +- VariableInitializer[]
|
||||
| +- Expression[@StandAlonePrimitive = true]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Literal[@CharLiteral = false, @DoubleLiteral = false, @EscapedStringLiteral = "0", @FloatLiteral = false, @Image = "0", @IntLiteral = true, @LongLiteral = false, @SingleCharacterStringLiteral = false, @StringLiteral = false, @TextBlock = false, @TextBlockContent = "0", @ValueAsDouble = NaN, @ValueAsFloat = NaN, @ValueAsInt = 0, @ValueAsLong = 0]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "non", @Volatile = false]
|
||||
| +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| +- VariableDeclarator[@Initializer = true, @Name = "non"]
|
||||
| +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "non", @LambdaParameter = false, @LocalVariable = true, @Name = "non", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "non"]
|
||||
| +- VariableInitializer[]
|
||||
| +- Expression[@StandAlonePrimitive = true]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Literal[@CharLiteral = false, @DoubleLiteral = false, @EscapedStringLiteral = "1", @FloatLiteral = false, @Image = "1", @IntLiteral = true, @LongLiteral = false, @SingleCharacterStringLiteral = false, @StringLiteral = false, @TextBlock = false, @TextBlockContent = "1", @ValueAsDouble = NaN, @ValueAsFloat = NaN, @ValueAsInt = 1, @ValueAsLong = 1]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "sealed", @Volatile = false]
|
||||
| +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| +- VariableDeclarator[@Initializer = true, @Name = "sealed"]
|
||||
| +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "sealed", @LambdaParameter = false, @LocalVariable = true, @Name = "sealed", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "sealed"]
|
||||
| +- VariableInitializer[]
|
||||
| +- Expression[@StandAlonePrimitive = true]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Literal[@CharLiteral = false, @DoubleLiteral = false, @EscapedStringLiteral = "2", @FloatLiteral = false, @Image = "2", @IntLiteral = true, @LongLiteral = false, @SingleCharacterStringLiteral = false, @StringLiteral = false, @TextBlock = false, @TextBlockContent = "2", @ValueAsDouble = NaN, @ValueAsFloat = NaN, @ValueAsInt = 2, @ValueAsLong = 2]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- Statement[]
|
||||
| +- StatementExpression[]
|
||||
| +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- Name[@Image = "result"]
|
||||
| +- AssignmentOperator[@Compound = false, @Image = "="]
|
||||
| +- Expression[@StandAlonePrimitive = false]
|
||||
| +- AdditiveExpression[@Image = "-", @Operator = "-"]
|
||||
| +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- Name[@Image = "non"]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Name[@Image = "sealed"]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
+- Statement[]
|
||||
+- StatementExpression[]
|
||||
+- PrimaryExpression[]
|
||||
+- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Name[@Image = "System.out.println"]
|
||||
+- PrimarySuffix[@ArgumentCount = 1, @Arguments = true, @ArrayDereference = false]
|
||||
+- Arguments[@ArgumentCount = 1, @Size = 1]
|
||||
+- ArgumentList[@Size = 1]
|
||||
+- Expression[@StandAlonePrimitive = false]
|
||||
+- PrimaryExpression[]
|
||||
+- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
+- Name[@Image = "result"]
|
@ -1,76 +0,0 @@
|
||||
+- CompilationUnit[@PackageName = "", @declarationsAreInDefaultPackage = true]
|
||||
+- TypeDeclaration[]
|
||||
+- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "NonSealedIdentifier", @Default = false, @Final = false, @Image = "NonSealedIdentifier", @Interface = false, @Local = false, @Modifiers = 1, @Native = false, @Nested = false, @NonSealed = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Sealed = false, @SimpleName = "NonSealedIdentifier", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false]
|
||||
+- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false]
|
||||
+- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD]
|
||||
+- MethodDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "main", @Modifiers = 17, @Name = "main", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = true, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Void = true, @Volatile = false]
|
||||
+- ResultType[@Void = true, @returnsArray = false]
|
||||
+- MethodDeclarator[@Image = "main", @ParameterCount = 1]
|
||||
| +- FormalParameters[@ParameterCount = 1, @Size = 1]
|
||||
| +- FormalParameter[@Abstract = false, @Array = true, @ArrayDepth = 1, @Default = false, @ExplicitReceiverParameter = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false]
|
||||
| +- Type[@Array = true, @ArrayDepth = 1, @ArrayType = true, @TypeImage = "String"]
|
||||
| | +- ReferenceType[@Array = true, @ArrayDepth = 1]
|
||||
| | +- ClassOrInterfaceType[@AnonymousClass = false, @Array = true, @ArrayDepth = 1, @Image = "String", @ReferenceToClassSameCompilationUnit = false]
|
||||
| +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = true, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "args", @LambdaParameter = false, @LocalVariable = false, @Name = "args", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "args"]
|
||||
+- Block[@containsComment = false]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "result", @Volatile = false]
|
||||
| +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| +- VariableDeclarator[@Initializer = true, @Name = "result"]
|
||||
| +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "result", @LambdaParameter = false, @LocalVariable = true, @Name = "result", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "result"]
|
||||
| +- VariableInitializer[]
|
||||
| +- Expression[@StandAlonePrimitive = true]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Literal[@CharLiteral = false, @DoubleLiteral = false, @EscapedStringLiteral = "0", @FloatLiteral = false, @Image = "0", @IntLiteral = true, @LongLiteral = false, @SingleCharacterStringLiteral = false, @StringLiteral = false, @TextBlock = false, @TextBlockContent = "0", @ValueAsDouble = NaN, @ValueAsFloat = NaN, @ValueAsInt = 0, @ValueAsLong = 0]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "non", @Volatile = false]
|
||||
| +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| +- VariableDeclarator[@Initializer = true, @Name = "non"]
|
||||
| +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "non", @LambdaParameter = false, @LocalVariable = true, @Name = "non", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "non"]
|
||||
| +- VariableInitializer[]
|
||||
| +- Expression[@StandAlonePrimitive = true]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Literal[@CharLiteral = false, @DoubleLiteral = false, @EscapedStringLiteral = "1", @FloatLiteral = false, @Image = "1", @IntLiteral = true, @LongLiteral = false, @SingleCharacterStringLiteral = false, @StringLiteral = false, @TextBlock = false, @TextBlockContent = "1", @ValueAsDouble = NaN, @ValueAsFloat = NaN, @ValueAsInt = 1, @ValueAsLong = 1]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "sealed", @Volatile = false]
|
||||
| +- Type[@Array = false, @ArrayDepth = 0, @ArrayType = false, @TypeImage = "int"]
|
||||
| | +- PrimitiveType[@Array = false, @ArrayDepth = 0, @Boolean = false, @Image = "int"]
|
||||
| +- VariableDeclarator[@Initializer = true, @Name = "sealed"]
|
||||
| +- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @ExceptionBlockParameter = false, @ExplicitReceiverParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "sealed", @LambdaParameter = false, @LocalVariable = true, @Name = "sealed", @PatternBinding = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "sealed"]
|
||||
| +- VariableInitializer[]
|
||||
| +- Expression[@StandAlonePrimitive = true]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Literal[@CharLiteral = false, @DoubleLiteral = false, @EscapedStringLiteral = "2", @FloatLiteral = false, @Image = "2", @IntLiteral = true, @LongLiteral = false, @SingleCharacterStringLiteral = false, @StringLiteral = false, @TextBlock = false, @TextBlockContent = "2", @ValueAsDouble = NaN, @ValueAsFloat = NaN, @ValueAsInt = 2, @ValueAsLong = 2]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
| +- Statement[]
|
||||
| +- StatementExpression[]
|
||||
| +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- Name[@Image = "result"]
|
||||
| +- AssignmentOperator[@Compound = false, @Image = "="]
|
||||
| +- Expression[@StandAlonePrimitive = false]
|
||||
| +- AdditiveExpression[@Image = "-", @Operator = "-"]
|
||||
| +- PrimaryExpression[]
|
||||
| | +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| | +- Name[@Image = "non"]
|
||||
| +- PrimaryExpression[]
|
||||
| +- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Name[@Image = "sealed"]
|
||||
+- BlockStatement[@Allocation = false]
|
||||
+- Statement[]
|
||||
+- StatementExpression[]
|
||||
+- PrimaryExpression[]
|
||||
+- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
| +- Name[@Image = "System.out.println"]
|
||||
+- PrimarySuffix[@ArgumentCount = 1, @Arguments = true, @ArrayDereference = false]
|
||||
+- Arguments[@ArgumentCount = 1, @Size = 1]
|
||||
+- ArgumentList[@Size = 1]
|
||||
+- Expression[@StandAlonePrimitive = false]
|
||||
+- PrimaryExpression[]
|
||||
+- PrimaryPrefix[@SuperModifier = false, @ThisModifier = false]
|
||||
+- Name[@Image = "result"]
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user