Merge branch 'java-ast-goodies' into 7.0.x

This commit is contained in:
Clément Fournier committed 2020-11-03 15:54:05 +01:00
commit 0434d83280
52 files changed
+967 -797

No files matched your search

Binary file not shown.
+1 -1
View File
@@ -19,7 +19,7 @@ echo "Setting up secrets..."
# * id_rsa
# * release-signing-key-D0BF1D737C9A1C22.gpg
openssl aes-256-cbc -K ${encrypted_a5724fade5c6_key} -iv ${encrypted_a5724fade5c6_iv} -in .travis/secrets.tar.enc -out .travis/secrets.tar -d
openssl aes-256-cbc -K ${encrypted_3b9f0b9d36d1_key} -iv ${encrypted_3b9f0b9d36d1_iv} -in .travis/secrets.tar.enc -out .travis/secrets.tar -d
pushd .travis && tar xfv secrets.tar && popd
mkdir -p "$HOME/.ssh"
chmod 700 "$HOME/.ssh"
+4
View File
@@ -27,6 +27,10 @@ This is a {{ site.pmd.release_type }} release.
### API Changes
#### Deprecated API
- {% jdoc java::ast.ASTPackageDeclaration#getPackageNameImage() %}, {% jdoc java::ast.ASTTypeParameter#getParameterName() %} and the corresponding XPath attributes. In both cases they're replaced with a new method `getName`, the attribute is `@Name`
### External Contributions
{% endtocmaker %}
@@ -173,6 +173,8 @@ public class AttributeAxisIterator implements Iterator<Attribute> {
}
if ("size".equals(n)) {
return "Size";
} else if ("length".equals(n)) {
return "Length";
}
return n;
@@ -69,7 +69,7 @@ public final class ASTCompilationUnit extends AbstractJavaTypeNode implements Ja
@NonNull
public String getPackageName() {
ASTPackageDeclaration pack = getPackageDeclaration();
return pack == null ? "" : pack.getPackageNameImage();
return pack == null ? "" : pack.getName();
}
/**
@@ -51,6 +51,17 @@ public final class ASTMethodDeclaration extends AbstractMethodOrConstructorDecla
}
/**
* Returns true if this method is overridden.
* TODO for now, this just checks for an @Override annotation,
* but this should definitely do what MissingOverride does.
* This could be useful in UnusedPrivateMethod (to check not only private methods),
* and also UselessOverridingMethod, and overall many many rules.
*/
public boolean isOverridden() {
return isAnnotationPresent(Override.class);
}
@Override
protected @Nullable JavaccToken getPreferredReportLocation() {
return TokenUtils.nthPrevious(getModifiers().getLastToken(), getFormalParameters().getFirstToken(), 1);
@@ -155,6 +155,8 @@ public final class ASTNumericLiteral extends AbstractLiteral implements ASTLiter
case 'b':
case 'B':
return 2;
case '.':
return 10;
default:
return 8;
}
@@ -7,7 +7,7 @@ package net.sourceforge.pmd.lang.java.ast;
/**
* Package declaration at the top of a {@linkplain ASTCompilationUnit source file}.
* Since 7.0, there is no {@linkplain ASTName Name} node anymore. Use
* {@link #getPackageNameImage()} instead.
* {@link #getName()} instead.
*
*
* <pre class="grammar">
@@ -29,12 +29,13 @@ public final class ASTPackageDeclaration extends AbstractJavaNode implements Ann
return visitor.visit(this, data);
}
/**
* Returns the name of the package.
*
* @since 4.2
* @since 6.30.0
*/
public String getPackageNameImage() {
public String getName() {
return super.getImage();
}
@@ -42,6 +42,20 @@ public final class ASTStringLiteral extends AbstractLiteral implements ASTLitera
return isTextBlock;
}
/** True if the constant value is empty. Does not necessarily compute the constant value. */
public boolean isEmpty() {
if (isTextBlock) {
return getConstValue().isEmpty(); // could be a bunch of ignorable indents?
} else {
return getImage().length() == 2; // ""
}
}
/** Length of the constant value in characters. */
public int length() {
return getConstValue().length();
}
@Override
protected <P, R> R acceptVisitor(JavaVisitor<? super P, ? extends R> visitor, P data) {
return visitor.visit(this, data);
@@ -23,4 +23,9 @@ public interface ASTSwitchBranch extends JavaNode {
return (ASTSwitchLabel) getFirstChild();
}
/** Return true if this is the default branch. */
default boolean isDefault() {
return getLabel().isDefault();
}
}
@@ -35,7 +35,7 @@ public final class ASTTypeParameter extends AbstractTypedSymbolDeclarator<JTypeP
/**
* Returns the name of the type variable introduced by this declaration.
*/
public String getParameterName() {
public String getName() {
return getImage();
}
@@ -39,7 +39,7 @@ public class ASTVariableDeclarator extends AbstractJavaTypeNode implements Inter
* Returns the name of the declared variable.
*/
public String getName() {
return getVarId().getVariableName();
return getVarId().getName();
}
@@ -47,7 +47,7 @@ import net.sourceforge.pmd.lang.symboltable.NameOccurrence;
*
*/
// @formatter:on
public final class ASTVariableDeclaratorId extends AbstractTypedSymbolDeclarator<JVariableSymbol> implements AccessNode, SymbolDeclaratorNode {
public final class ASTVariableDeclaratorId extends AbstractTypedSymbolDeclarator<JVariableSymbol> implements AccessNode, SymbolDeclaratorNode, FinalizableNode {
private VariableNameDeclaration nameDeclaration;
@@ -101,6 +101,13 @@ public final class ASTVariableDeclaratorId extends AbstractTypedSymbolDeclarator
return getModifierOwnerParent().getModifiers();
}
@Override
public Visibility getVisibility() {
return isPatternBinding() ? Visibility.V_LOCAL
: getModifierOwnerParent().getVisibility();
}
private AccessNode getModifierOwnerParent() {
JavaNode parent = getParent();
if (parent instanceof ASTVariableDeclarator) {
@@ -113,7 +120,6 @@ public final class ASTVariableDeclaratorId extends AbstractTypedSymbolDeclarator
/**
* @deprecated Use {@link #getName()}
* @return
*/
@Override
@DeprecatedAttribute(replaceWith = "@Name")
@@ -70,6 +70,27 @@ public interface AccessNode extends Annotatable {
}
}
/**
* Returns the "effective" visibility of a member. This is the minimum
* visibility of its enclosing type declarations. For example, a public
* method of a private class is "effectively private".
*
* <p>Local declarations keep local visibility, eg a local variable
* somewhere in an anonymous class doesn't get anonymous visibility.
*/
default Visibility getEffectiveVisibility() {
Visibility minv = getVisibility();
if (minv == Visibility.V_LOCAL) {
return minv;
}
for (ASTAnyTypeDeclaration enclosing : ancestors(ASTAnyTypeDeclaration.class)) {
minv = Visibility.min(minv, enclosing.getVisibility());
if (minv == Visibility.V_LOCAL) {
return minv;
}
}
return minv;
}
/**
* Returns true if this node has <i>all</i> the given modifiers
@@ -244,6 +265,12 @@ public interface AccessNode extends Annotatable {
public boolean isAtMost(Visibility other) {
return this.compareTo(other) < 0;
}
}
/**
* The minimum of both visibilities.
*/
static Visibility min(Visibility v1, Visibility v2) {
return v1.compareTo(v2) <= 0 ? v1 : v2;
}
}
}
@@ -4,22 +4,16 @@
package net.sourceforge.pmd.lang.java.ast;
import net.sourceforge.pmd.lang.rule.xpath.NoAttribute;
/**
* Package private, though the method is public.
* A node that may have the final modifier.
*/
interface FinalizableNode extends AccessNode {
public interface FinalizableNode extends AccessNode {
/**
* Returns true if this variable, method or class is final (even implicitly).
*/
@Override
// because the interface is package-private, reflection may fail
// to invoke this attribute. Either make the interface public, or
// keep this @NoAttribute
@NoAttribute
default boolean isFinal() {
return hasModifiers(JModifier.FINAL);
}
@@ -9,6 +9,8 @@ import java.lang.reflect.Modifier;
import java.util.Collection;
import java.util.Locale;
import org.checkerframework.checker.nullness.qual.NonNull;
import net.sourceforge.pmd.lang.java.symbols.JMethodSymbol;
/**
@@ -100,4 +102,13 @@ public enum JModifier {
return res;
}
/**
* Gets a modifier from its name.
*
* @throws IllegalArgumentException if the name is incorrect
*/
public static @NonNull JModifier fromToken(@NonNull String token) {
return valueOf(token.toLowerCase(Locale.ROOT));
}
}
@@ -53,7 +53,7 @@ public class UnnecessaryFullyQualifiedNameRule extends AbstractJavaRule {
@Override
public Object visit(ASTPackageDeclaration node, Object data) {
currentPackage = node.getPackageNameImage();
currentPackage = node.getName();
return data;
}
@@ -97,7 +97,7 @@ public class UselessOverridingMethodRule extends AbstractJavaRule {
@Override
public Object visit(ASTPackageDeclaration node, Object data) {
packageName = node.getPackageNameImage();
packageName = node.getName();
return super.visit(node, data);
}
@@ -46,7 +46,7 @@ final class AstTypeParamSym
@NonNull
@Override
public String getSimpleName() {
return node.getParameterName();
return node.getName();
}
}
@@ -152,7 +152,7 @@ public class ScopeAndDeclarationFinder extends JavaParserVisitorAdapter {
SourceFileScope scope;
ASTPackageDeclaration n = node.getPackageDeclaration();
if (n != null) {
scope = new SourceFileScope(classLoader, n.getPackageNameImage());
scope = new SourceFileScope(classLoader, n.getName());
} else {
scope = new SourceFileScope(classLoader);
}
@@ -19,7 +19,7 @@ public class ASTPackageDeclarationTest extends BaseParserTest {
public void testPackageName() {
ASTCompilationUnit nodes = java.parse(PACKAGE_INFO_ANNOTATED);
assertEquals("net.sourceforge.pmd.foobar", nodes.getPackageDeclaration().getPackageNameImage());
assertEquals("net.sourceforge.pmd.foobar", nodes.getPackageDeclaration().getName());
assertEquals("net.sourceforge.pmd.foobar", nodes.getPackageName());
}
}
@@ -351,6 +351,11 @@ $delim
it::getBase shouldBe 10 // by convention
}
}
"0.5" should parseAs {
number(DOUBLE) {
it::getBase shouldBe 10
}
}
}
}
@@ -0,0 +1,93 @@
/*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.ast
import net.sourceforge.pmd.lang.ast.test.shouldBe
import net.sourceforge.pmd.lang.java.ast.AccessNode.Visibility.*
import net.sourceforge.pmd.lang.java.types.JPrimitiveType.PrimitiveTypeKind.INT
class ModifiersTest : ParserTestSpec({
parserTest("Local classes") {
inContext(StatementParsingCtx) {
"""
@F class Local {
private int i;
}
""" should parseAs {
localClassDecl(simpleName = "Local") {
it::getVisibility shouldBe V_LOCAL
it::getEffectiveVisibility shouldBe V_LOCAL
it::isAbstract shouldBe false
it::isFinal shouldBe false
it::isLocal shouldBe true
it::isNested shouldBe false
it::getModifiers shouldBe modifiers {
annotation("F")
}
typeBody {
fieldDecl {
modifiers()
primitiveType(INT)
varDeclarator {
variableId("i") {
it::getVisibility shouldBe V_PRIVATE
it::getEffectiveVisibility shouldBe V_LOCAL
}
}
}
}
}
}
}
}
parserTest("Anon classes") {
inContext(StatementParsingCtx) {
"""
new Runnable() {
private int i;
public void run() { int l; }
};
""" should parseAs {
exprStatement {
val (i, l) = it.descendants(ASTVariableDeclaratorId::class.java)
.crossFindBoundaries()
.toList()
i.let {
it::getVisibility shouldBe V_PRIVATE
it::getEffectiveVisibility shouldBe V_ANONYMOUS
}
l.let {
it::getVisibility shouldBe V_LOCAL
it::getEffectiveVisibility shouldBe V_LOCAL
}
val runMethod = it.descendants(ASTMethodDeclaration::class.java).crossFindBoundaries().firstOrThrow()
runMethod.let {
it::getVisibility shouldBe V_PUBLIC
it::getEffectiveVisibility shouldBe V_ANONYMOUS
}
constructorCall()
}
}
}
}
})
@@ -369,7 +369,7 @@ fun TreeNodeWrapper<Node, *>.methodDecl(contents: NodeSpec<ASTMethodDeclaration>
fun TreeNodeWrapper<Node, *>.typeParam(name: String, contents: ValuedNodeSpec<ASTTypeParameter, ASTType?> = { null }) =
child<ASTTypeParameter> {
it::getParameterName shouldBe name
it::getName shouldBe name
it::getTypeBoundNode shouldBe contents()
}
@@ -83,4 +83,4 @@ fun JavaNode.firstCtorCall() = ctorCalls().crossFindBoundaries().firstOrThrow()
fun JavaNode.typeVariables(): MutableList<JTypeVar> = descendants(ASTTypeParameter::class.java).toList { it.typeMirror }
fun JavaNode.varAccesses(name: String): NodeStream<ASTVariableAccess> = descendants(ASTVariableAccess::class.java).filter { it.name == name }
fun JavaNode.varId(name: String) = descendants(ASTVariableDeclaratorId::class.java).filter { it.name == name }.firstOrThrow()
fun JavaNode.typeVar(name: String) = descendants(ASTTypeParameter::class.java).filter { it.parameterName == name }.firstOrThrow().typeMirror
fun JavaNode.typeVar(name: String) = descendants(ASTTypeParameter::class.java).filter { it.name == name }.firstOrThrow().typeMirror
@@ -21,11 +21,6 @@ import java.util.function.Supplier
*/
class SpecialMethodsTest : ProcessorTestSpec({
val jutil = "java.util"
val juf = "$jutil.function"
val justream = "$jutil.stream"
val jlang = "java.lang"
parserTest("Test getClass special type") {
@@ -1,8 +1,8 @@
+- CompilationUnit[@PackageName = ""]
+- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "Bug1429", @CanonicalName = "Bug1429", @Enum = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "false", @Record = "false", @RegularClass = "true", @SimpleName = "Bug1429", @TopLevel = "true", @Visibility = "public"]
+- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "Bug1429", @CanonicalName = "Bug1429", @EffectiveVisibility = "public", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "false", @Record = "false", @RegularClass = "true", @SimpleName = "Bug1429", @TopLevel = "true", @Visibility = "public"]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Size = "1"]
+- MethodDeclaration[@Abstract = "false", @Arity = "0", @Image = "getAttributeTuples", @Name = "getAttributeTuples", @Varargs = "false", @Visibility = "public", @Void = "false"]
+- MethodDeclaration[@Abstract = "false", @Arity = "0", @EffectiveVisibility = "public", @Image = "getAttributeTuples", @Name = "getAttributeTuples", @Overridden = "false", @Varargs = "false", @Visibility = "public", @Void = "false"]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Set"]
| +- TypeArguments[@Diamond = "false", @Size = "1"]
@@ -39,44 +39,44 @@
+- ConstructorCall[@AnonymousClass = "true", @CompileTimeConstant = "false", @DiamondTypeArgs = "false", @MethodName = "new", @ParenthesisDepth = "0", @Parenthesized = "false", @QualifiedInstanceCreation = "false"]
+- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Transformer"]
+- ArgumentList[@Size = "0"]
+- AnonymousClassDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "true", @BinaryName = "Bug1429$1", @CanonicalName = null, @Enum = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @Record = "false", @RegularClass = "false", @SimpleName = "", @TopLevel = "false", @Visibility = "anonymous"]
+- AnonymousClassDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "true", @BinaryName = "Bug1429$1", @CanonicalName = null, @EffectiveVisibility = "anonymous", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @Record = "false", @RegularClass = "false", @SimpleName = "", @TopLevel = "false", @Visibility = "anonymous"]
+- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
+- ClassOrInterfaceBody[@Size = "1"]
+- MethodDeclaration[@Abstract = "false", @Arity = "1", @Image = "transform", @Name = "transform", @Varargs = "false", @Visibility = "public", @Void = "false"]
+- MethodDeclaration[@Abstract = "false", @Arity = "1", @EffectiveVisibility = "anonymous", @Image = "transform", @Name = "transform", @Overridden = "true", @Varargs = "false", @Visibility = "public", @Void = "false"]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
| +- Annotation[@SimpleName = "Override"]
| +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Override"]
+- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Object"]
+- FormalParameters[@Size = "1"]
| +- FormalParameter[@Varargs = "false", @Visibility = "local"]
| +- FormalParameter[@EffectiveVisibility = "local", @Final = "true", @Varargs = "false", @Visibility = "local"]
| +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"]
| +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Object"]
| +- VariableDeclaratorId[@ArrayType = "false", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @FormalParameter = "true", @LambdaParameter = "false", @LocalVariable = "false", @Name = "obj", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "package"]
| +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "true", @FormalParameter = "true", @LambdaParameter = "false", @LocalVariable = "false", @Name = "obj", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
+- Block[@Size = "5", @containsComment = "false"]
+- LocalVariableDeclaration[@TypeInferred = "false", @Visibility = "local"]
+- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "true", @TypeInferred = "false", @Visibility = "local"]
| +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"]
| +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"]
| +- VariableDeclarator[@Initializer = "true", @Name = "key"]
| +- VariableDeclaratorId[@ArrayType = "false", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "key", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "package"]
| +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "true", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "key", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
| +- CastExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
| +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"]
| +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "obj", @Name = "obj", @ParenthesisDepth = "0", @Parenthesized = "false"]
+- LocalVariableDeclaration[@TypeInferred = "false", @Visibility = "local"]
+- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "true", @TypeInferred = "false", @Visibility = "local"]
| +- ModifierList[@EffectiveModifiers = "{final}", @ExplicitModifiers = "{final}"]
| +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"]
| +- VariableDeclarator[@Initializer = "true", @Name = "value"]
| +- VariableDeclaratorId[@ArrayType = "false", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "value", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "package"]
| +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "true", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "value", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
| +- MethodCall[@CompileTimeConstant = "false", @Image = "get", @MethodName = "get", @ParenthesisDepth = "0", @Parenthesized = "false"]
| +- FieldAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "attributes", @Name = "attributes", @ParenthesisDepth = "0", @Parenthesized = "false"]
| | +- ThisExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"]
| | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "HGXLIFFTypeConfiguration"]
| +- ArgumentList[@Size = "1"]
| +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "key", @Name = "key", @ParenthesisDepth = "0", @Parenthesized = "false"]
+- LocalVariableDeclaration[@TypeInferred = "false", @Visibility = "local"]
+- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"]
| +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
| +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"]
| +- VariableDeclarator[@Initializer = "true", @Name = "result"]
| +- VariableDeclaratorId[@ArrayType = "false", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "result", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "package"]
| +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "result", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"]
| +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "key", @Name = "key", @ParenthesisDepth = "0", @Parenthesized = "false"]
+- IfStatement[@Else = "false"]
| +- MethodCall[@CompileTimeConstant = "false", @Image = "isNotEmpty", @MethodName = "isNotEmpty", @ParenthesisDepth = "0", @Parenthesized = "false"]
@@ -91,7 +91,7 @@
| +- MethodCall[@CompileTimeConstant = "false", @Image = "concat", @MethodName = "concat", @ParenthesisDepth = "0", @Parenthesized = "false"]
| | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "result", @Name = "result", @ParenthesisDepth = "0", @Parenthesized = "false"]
| | +- ArgumentList[@Size = "1"]
| | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ":", @Image = "":"", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"]
| | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ":", @Empty = "false", @Image = "":"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"]
| +- ArgumentList[@Size = "1"]
| +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "value", @Name = "value", @ParenthesisDepth = "0", @Parenthesized = "false"]
+- ReturnStatement[]
@@ -1,8 +1,8 @@
+- CompilationUnit[@PackageName = ""]
+- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "Bug1530", @CanonicalName = "Bug1530", @Enum = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "false", @Record = "false", @RegularClass = "true", @SimpleName = "Bug1530", @TopLevel = "true", @Visibility = "public"]
+- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "Bug1530", @CanonicalName = "Bug1530", @EffectiveVisibility = "public", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "false", @Record = "false", @RegularClass = "true", @SimpleName = "Bug1530", @TopLevel = "true", @Visibility = "public"]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Size = "1"]
+- MethodDeclaration[@Abstract = "false", @Arity = "0", @Image = "incChild", @Name = "incChild", @Varargs = "false", @Visibility = "public", @Void = "true"]
+- MethodDeclaration[@Abstract = "false", @Arity = "0", @EffectiveVisibility = "public", @Image = "incChild", @Name = "incChild", @Overridden = "false", @Varargs = "false", @Visibility = "public", @Void = "true"]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- VoidType[]
+- FormalParameters[@Size = "0"]
@@ -2,6 +2,6 @@
+- ImportDeclaration[@ImportOnDemand = "false", @ImportedName = "a", @ImportedSimpleName = "a", @PackageName = "", @Static = "false"]
+- EmptyDeclaration[]
+- ImportDeclaration[@ImportOnDemand = "false", @ImportedName = "b", @ImportedSimpleName = "b", @PackageName = "", @Static = "false"]
+- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "Foo", @CanonicalName = "Foo", @Enum = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "false", @Record = "false", @RegularClass = "true", @SimpleName = "Foo", @TopLevel = "true", @Visibility = "public"]
+- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "Foo", @CanonicalName = "Foo", @EffectiveVisibility = "public", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "false", @Record = "false", @RegularClass = "true", @SimpleName = "Foo", @TopLevel = "true", @Visibility = "public"]
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
+- ClassOrInterfaceBody[@Size = "0"]
@@ -1,5 +1,5 @@
+- CompilationUnit[@PackageName = "c"]
+- PackageDeclaration[@PackageNameImage = "c"]
+- PackageDeclaration[@Name = "c"]
| +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"]
+- EmptyDeclaration[]
+- ImportDeclaration[@ImportOnDemand = "false", @ImportedName = "a", @ImportedSimpleName = "a", @PackageName = "", @Static = "false"]
Loaded 30 of 52 files, more files were not shown because too many files have changed in this diff. Show more