javac ast indices: reduce index size on disk

This commit is contained in:
Dmitry Batkovich
2017-07-18 18:35:22 +03:00
parent e092f76f76
commit e0705788f8
46 changed files with 136 additions and 141 deletions
@@ -4,9 +4,7 @@ java.lang.Runnable -> fun_expr(id=0)
Backward References:
Lambda in Lambda occurrences = 1
Lambda.<init>(0) in Lambda occurrences = 1
Lambda.main(1) in Lambda occurrences = 1
java.lang.Object.<init>(0) in Lambda occurrences = 1
java.lang.String in Lambda occurrences = 1
java.lang.Thread in Lambda occurrences = 1
java.lang.Thread.<init>(1) in Lambda occurrences = 1
@@ -4,9 +4,7 @@ java.lang.Runnable -> fun_expr(id=0)
Backward References:
MethodReference in MethodReference occurrences = 1
MethodReference.<init>(0) in MethodReference occurrences = 1
MethodReference.main(1) in MethodReference occurrences = 1
java.lang.Object.<init>(0) in MethodReference occurrences = 1
java.lang.String in MethodReference occurrences = 1
java.lang.Thread in MethodReference occurrences = 1
java.lang.Thread.<init>(1) in MethodReference occurrences = 1
@@ -193,7 +193,7 @@ final class JavacReferenceCollectorListener implements TaskListener {
final MemberSelectTree classImport = (MemberSelectTree)qExpr;
final Element ownerElement = incompletelyProcessedFile.getReferencedElement(classImport);
final Name name = id.getIdentifier();
if (name != myNameTableCache.getAsterisk()) {
if (!myNameTableCache.isAsterisk(name)) {
// member import
for (Element memberElement : myElementUtility.getAllMembers((TypeElement)ownerElement)) {
if (memberElement.getSimpleName() == name) {
@@ -274,6 +274,14 @@ final class JavacReferenceCollectorListener implements TaskListener {
return myNameTableCache;
}
long getStartOffset(Tree tree) {
return myTreeHelper.getStartOffset(tree);
}
long getEndOffset(Tree tree) {
return myTreeHelper.getEndOffset(tree);
}
private int decrementRemainDeclarationsAndGet(Tree declarationToProcess) {
return declarationToProcess == null ? myRemainDeclarations : --myRemainDeclarations;
}
@@ -290,10 +298,20 @@ final class JavacReferenceCollectorListener implements TaskListener {
private class JavacTreeHelper {
private final TreePath myUnitPath;
private final Trees myTreeUtil;
private final SourcePositions myPositions;
private JavacTreeHelper(CompilationUnitTree unit, Trees treeUtil) {
myUnitPath = new TreePath(unit);
myTreeUtil = treeUtil;
myPositions = treeUtil.getSourcePositions();
}
private long getStartOffset(Tree tree) {
return myPositions.getStartPosition(myUnitPath.getCompilationUnit(), tree);
}
private long getEndOffset(Tree tree) {
return myPositions.getEndPosition(myUnitPath.getCompilationUnit(), tree);
}
private Element getReferencedElement(Tree tree) {
@@ -305,10 +323,9 @@ final class JavacReferenceCollectorListener implements TaskListener {
}
}
public TypeMirror getType(Tree tree) {
private TypeMirror getType(Tree tree) {
return myTreeUtil.getTypeMirror(new TreePath(myUnitPath, tree));
}
}
private static void incrementOrAdd(TObjectIntHashMap<JavacRef> map, JavacRef key) {
@@ -101,6 +101,12 @@ class JavacTreeRefScanner extends TreeScanner<Tree, JavacReferenceCollectorListe
@Override
public Tree visitMethod(MethodTree node, JavacReferenceCollectorListener.ReferenceCollector refCollector) {
final Element element = refCollector.getReferencedElement(node);
if (refCollector.getNameTable().isInit(node.getName()) &&
myCurrentEnclosingElementOffset.peek() == refCollector.getStartOffset(node)) {
return null;
}
if (element != null) {
final JavacRef.JavacElementRefBase ref = refCollector.asJavacRef(element);
if (ref != null) {
@@ -156,38 +162,47 @@ class JavacTreeRefScanner extends TreeScanner<Tree, JavacReferenceCollectorListe
return super.visitMethodInvocation(node, collector);
}
final Stack<TypeElement> myCurrentEnclosingElement = new Stack<TypeElement>(1);
private final Stack<TypeElement> myCurrentEnclosingElement = new Stack<TypeElement>(1);
private final Stack<Long> myCurrentEnclosingElementOffset = new Stack<Long>(1);
@Override
public Tree visitClass(ClassTree node, JavacReferenceCollectorListener.ReferenceCollector refCollector) {
TypeElement element = (TypeElement)refCollector.getReferencedElement(node);
if (element == null) return null;
myCurrentEnclosingElement.add(element);
ModifiersTree modifiers = node.getModifiers();
long modifiersEndOffset = refCollector.getEndOffset(modifiers);
long startOffset = modifiersEndOffset == -1 ? refCollector.getStartOffset(node) : (modifiersEndOffset + 1);
myCurrentEnclosingElementOffset.add(startOffset);
try {
final TypeMirror superclass = element.getSuperclass();
final List<? extends TypeMirror> interfaces = element.getInterfaces();
final JavacRef[] supers;
if (superclass != refCollector.getTypeUtility().getNoType(TypeKind.NONE)) {
supers = new JavacRef[interfaces.size() + 1];
final JavacRef.JavacElementRefBase ref = refCollector.asJavacRef(superclass);
if (ref == null) return null;
supers[interfaces.size()] = ref;
}
else {
supers = interfaces.isEmpty() ? JavacRef.EMPTY_ARRAY : new JavacRef[interfaces.size()];
}
final TypeMirror superclass = element.getSuperclass();
final List<? extends TypeMirror> interfaces = element.getInterfaces();
final JavacRef[] supers;
if (superclass != refCollector.getTypeUtility().getNoType(TypeKind.NONE)) {
supers = new JavacRef[interfaces.size() + 1];
final JavacRef.JavacElementRefBase ref = refCollector.asJavacRef(superclass);
if (ref == null) return null;
supers[interfaces.size()] = ref;
} else {
supers = interfaces.isEmpty() ? JavacRef.EMPTY_ARRAY : new JavacRef[interfaces.size()];
int i = 0;
for (TypeMirror anInterface : interfaces) {
final JavacRef.JavacElementRefBase ref = refCollector.asJavacRef(anInterface);
if (ref == null) return null;
supers[i++] = ref;
}
final JavacRef.JavacElementRefBase aClass = refCollector.asJavacRef(element);
if (aClass == null) return null;
refCollector.sinkReference(aClass);
refCollector.sinkDeclaration(new JavacDef.JavacClassDef(aClass, supers));
super.visitClass(node, refCollector);
} finally {
myCurrentEnclosingElement.pop();
myCurrentEnclosingElementOffset.pop();
}
int i = 0;
for (TypeMirror anInterface : interfaces) {
final JavacRef.JavacElementRefBase ref = refCollector.asJavacRef(anInterface);
if (ref == null) return null;
supers[i++] = ref;
}
final JavacRef.JavacElementRefBase aClass = refCollector.asJavacRef(element);
if (aClass == null) return null;
refCollector.sinkReference(aClass);
refCollector.sinkDeclaration(new JavacDef.JavacClassDef(aClass, supers));
super.visitClass(node, refCollector);
myCurrentEnclosingElement.pop();
return null;
}
@@ -28,6 +28,7 @@ public class JavacNameTable {
private final SLRUCache<Name, String> myParsedNameCache;
private final Elements myElements;
private Name myAsterisk;
private Name myInit;
private TypeElement myStreamElement;
private TypeElement myIteratorElement;
private TypeElement myIterableElement;
@@ -50,15 +51,27 @@ public class JavacNameTable {
@NotNull
public String parseBinaryName(Element element) {
return parseName(myElements.getBinaryName((TypeElement)element));
try {
return parseName(myElements.getBinaryName((TypeElement)element));
}
catch (ClassCastException e) {
System.out.println(123);
throw e;
}
}
@NotNull
public Name getAsterisk() {
public boolean isAsterisk(Name name) {
if (myAsterisk == null) {
myAsterisk = myElements.getName("*");
}
return myAsterisk;
return myAsterisk == name;
}
public boolean isInit(Name name) {
if (myInit == null) {
myInit = myElements.getName("<init>");
}
return myInit == name;
}
@Nullable("if the type is not loaded to javac name table")
@@ -4,11 +4,8 @@ java.lang.Runnable -> anonymous(id=0)
Backward References:
Anonymous in Anonymous occurrences = 1
Anonymous.<init>(0) in Anonymous occurrences = 1
Anonymous.m(0) in Anonymous occurrences = 1
java.lang.Object.<init>(0) in Anonymous occurrences = 2
java.lang.Runnable in Anonymous occurrences = 2
java.lang.Runnable.<init>(0) in Anonymous occurrences = 1
java.lang.Runnable.run(0) in Anonymous occurrences = 2
Class Definitions:
@@ -3,13 +3,9 @@ java.lang.Object -> Array Bar Foo
Backward References:
Array in Array occurrences = 1
Array.<init>(0) in Array occurrences = 1
Array.method(1) in Array occurrences = 1
Bar in Array Bar occurrences = 2
Bar.<init>(0) in Bar occurrences = 1
Foo in Array Foo occurrences = 2
Foo.<init>(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Array Bar Foo occurrences = 3
Class Definitions:
Array in Array
@@ -3,8 +3,6 @@ java.lang.Object -> Foo
Backward References:
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 1
Class Definitions:
Foo in Foo
@@ -5,10 +5,7 @@ java.lang.Runnable -> Foo$Inner
Backward References:
Foo in Foo occurrences = 1
Foo$Inner in Foo occurrences = 1
Foo$Inner.<init>(0) in Foo occurrences = 1
Foo$Inner.run(0) in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 2
java.lang.Override in Foo occurrences = 1
java.lang.Runnable in Foo occurrences = 1
@@ -0,0 +1 @@
public final class Foo { }
@@ -0,0 +1,10 @@
Backward Hierarchy:
java.lang.Object -> Foo
Backward References:
Foo in Foo occurrences = 1
Class Definitions:
Foo in Foo
Members Signatures:
@@ -3,12 +3,9 @@ java.lang.Object -> Boo Foo
Backward References:
Boo in Foo occurrences = 1
Boo.<init>(0) in Foo occurrences = 1
Boo.m(0) in Foo occurrences = 1
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 2
java.util.Collections in Foo occurrences = 3
java.util.Collections.emptyList(0) in Foo occurrences = 1
java.util.Collections.emptySet(0) in Foo occurrences = 1
@@ -3,9 +3,7 @@ java.lang.Object -> Foo
Backward References:
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 1
java.util.ArrayList in Foo occurrences = 3
java.util.ArrayList.<init>(0) in Foo occurrences = 3
java.util.LinkedList in Foo occurrences = 2
@@ -3,11 +3,9 @@ java.lang.Object -> Bar
Backward References:
Bar in Bar occurrences = 1
Bar.<init>(0) in Bar occurrences = 1
Bar.DEBUG in Bar occurrences = 2
Bar.m(0) in Bar occurrences = 1
java.io.PrintStream.println(1) in Bar occurrences = 1
java.lang.Object.<init>(0) in Bar occurrences = 1
java.lang.System in Bar occurrences = 1
java.lang.System.out in Bar occurrences = 1
java.util.ArrayList in Bar occurrences = 1
@@ -0,0 +1,7 @@
class Foo {
static Foo newFoo() {
return new Foo();
}
}
@@ -0,0 +1,13 @@
Backward Hierarchy:
java.lang.Object -> Foo
Backward References:
Foo in Foo occurrences = 3
Foo.<init>(0) in Foo occurrences = 1
Foo.newFoo(0) in Foo occurrences = 1
Class Definitions:
Foo in Foo
Members Signatures:
static Foo <- Foo.newFoo(0)
@@ -3,10 +3,8 @@ java.lang.Object -> Inner
Backward References:
Inner in bar occurrences = 1
Inner.<init>(0) in bar occurrences = 1
Inner.m(0) in bar occurrences = 1
java.io.PrintStream.println(1) in bar occurrences = 1
java.lang.Object.<init>(0) in bar occurrences = 1
java.lang.System in bar occurrences = 1
java.lang.System.out in bar occurrences = 1
@@ -3,10 +3,8 @@ java.lang.Object -> Inner
Backward References:
Inner in Bar occurrences = 1
Inner.<init>(0) in Bar occurrences = 1
Inner.m(0) in Bar occurrences = 1
java.io.PrintStream.println(1) in Bar occurrences = 1
java.lang.Object.<init>(0) in Bar occurrences = 1
java.lang.System in Bar occurrences = 1
java.lang.System.out in Bar occurrences = 1
@@ -3,9 +3,7 @@ java.lang.Object -> Foo
Backward References:
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 1
Class Definitions:
Foo in Foo
@@ -3,12 +3,11 @@ java.lang.Object -> Bar Foo
Backward References:
Bar in Bar Foo occurrences = 3
Bar.<init>(0) in Bar Foo occurrences = 2
Bar.<init>(0) in Foo occurrences = 1
Bar.m(0) in Bar occurrences = 1
Foo in Bar Foo occurrences = 3
Foo.<init>(0) in Bar Foo occurrences = 2
Foo.<init>(0) in Bar occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Bar Foo occurrences = 2
Class Definitions:
Bar in Bar
@@ -4,15 +4,12 @@ java.lang.Object -> Bar FooImpl
Backward References:
Bar in Bar occurrences = 1
Bar.<init>(0) in Bar occurrences = 1
Bar.m(1) in Bar occurrences = 1
Foo in Foo FooImpl occurrences = 2
Foo.getSomeText(0) in Foo occurrences = 1
FooImpl in Bar FooImpl occurrences = 2
FooImpl.<init>(0) in FooImpl occurrences = 1
FooImpl.TITLE in FooImpl occurrences = 1
FooImpl.getSomeText(0) in FooImpl occurrences = 1
java.lang.Object.<init>(0) in Bar FooImpl occurrences = 2
java.lang.String in Foo FooImpl occurrences = 3
Class Definitions:
@@ -3,15 +3,12 @@ java.lang.Object -> Bar FooImpl
Backward References:
Bar in Bar occurrences = 1
Bar.<init>(0) in Bar occurrences = 1
Bar.m(1) in Bar occurrences = 1
Foo in Foo occurrences = 1
Foo.getSomeText(0) in Foo occurrences = 1
FooImpl in Bar FooImpl occurrences = 2
FooImpl.<init>(0) in FooImpl occurrences = 1
FooImpl.TITLE in FooImpl occurrences = 1
FooImpl.getSomeText(0) in FooImpl occurrences = 1
java.lang.Object.<init>(0) in Bar FooImpl occurrences = 2
java.lang.String in Foo FooImpl occurrences = 3
Class Definitions:
@@ -4,16 +4,13 @@ java.lang.Object -> Bar FooImpl
Backward References:
Bar in Bar occurrences = 1
Bar.<init>(0) in Bar occurrences = 1
Bar.m(1) in Bar occurrences = 1
Foo in Foo FooImpl occurrences = 2
Foo.getSomeText(0) in Foo occurrences = 1
FooImpl in Bar FooImpl occurrences = 3
FooImpl.<init>(0) in FooImpl occurrences = 1
FooImpl.TITLE in Bar FooImpl occurrences = 2
FooImpl.getSomeText(0) in Bar FooImpl occurrences = 2
java.io.PrintStream.println(1) in Bar occurrences = 2
java.lang.Object.<init>(0) in Bar FooImpl occurrences = 2
java.lang.String in Foo FooImpl occurrences = 3
java.lang.System in Bar occurrences = 2
java.lang.System.out in Bar occurrences = 2
@@ -3,9 +3,7 @@ java.lang.Object -> Foo
Backward References:
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 1
java.util.Collections in Foo occurrences = 2
java.util.Collections.emptySet(0) in Foo occurrences = 1
@@ -3,9 +3,7 @@ java.lang.Object -> Foo
Backward References:
Foo in Bar occurrences = 1
Foo.<init>(0) in Bar occurrences = 1
Foo.m(0) in Bar occurrences = 1
java.lang.Object.<init>(0) in Bar occurrences = 1
java.util.Collections in Bar occurrences = 2
java.util.Collections.emptySet(0) in Bar occurrences = 1
@@ -4,9 +4,7 @@ java.util.List -> Foo
Backward References:
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 1
java.util.Collections in Foo occurrences = 2
java.util.Collections.emptyList(0) in Foo occurrences = 1
java.util.List in Foo occurrences = 2
@@ -3,12 +3,9 @@ java.lang.Object -> Bar Foo
Backward References:
Bar in Bar occurrences = 1
Bar.<init>(0) in Bar occurrences = 1
Bar.m(0) in Bar occurrences = 1
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Bar Foo occurrences = 2
java.util.Collections in Bar Foo occurrences = 4
java.util.Collections.emptyList(0) in Foo occurrences = 1
java.util.Collections.emptySet(0) in Bar occurrences = 1
@@ -3,12 +3,9 @@ java.lang.Object -> Bar Foo
Backward References:
Bar in Foo occurrences = 1
Bar.<init>(0) in Foo occurrences = 1
Bar.m(0) in Foo occurrences = 1
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 2
java.util.Collections in Foo occurrences = 3
java.util.Collections.emptyList(0) in Foo occurrences = 1
java.util.Collections.emptySet(0) in Foo occurrences = 1
@@ -7,24 +7,23 @@ java.lang.Object -> Foo0
Backward References:
Bar0 in Bar Boo Foo occurrences = 4
Bar0.<init>(0) in Bar Boo Foo occurrences = 3
Bar0.<init>(0) in Foo occurrences = 1
Bar0.mm(0) in Bar Foo occurrences = 2
Bar1 in Bar Boo occurrences = 3
Bar1.<init>(0) in Bar Boo occurrences = 2
Bar1.<init>(0) in Boo occurrences = 1
Bar1.mm(0) in Bar Boo occurrences = 2
Boo0 in Bar Boo Foo occurrences = 4
Boo0.<init>(0) in Bar Boo Foo occurrences = 3
Boo0.<init>(0) in Foo occurrences = 1
Boo0.mm(0) in Boo Foo occurrences = 2
Boo1 in Bar Boo occurrences = 3
Boo1.<init>(0) in Bar Boo occurrences = 2
Boo1.<init>(0) in Bar occurrences = 1
Boo1.mm(0) in Bar Boo occurrences = 2
Foo0 in Bar Foo occurrences = 5
Foo0.<init>(0) in Bar Foo occurrences = 4
Foo0.<init>(0) in Bar occurrences = 1
Foo0.mm(0) in Bar Foo occurrences = 2
Foo1 in Boo Foo occurrences = 4
Foo1.<init>(0) in Boo Foo occurrences = 3
Foo1.<init>(0) in Boo occurrences = 1
Foo1.mm(0) in Boo Foo occurrences = 2
java.lang.Object.<init>(0) in Foo occurrences = 1
Class Definitions:
Bar0 in Bar
@@ -4,17 +4,12 @@ java.lang.Object -> Boo Boo$Baz Foo Foo$Bar
Backward References:
Boo in Foo occurrences = 1
Boo$Baz in Foo occurrences = 1
Boo$Baz.<init>(0) in Foo occurrences = 1
Boo$Baz.m(0) in Foo occurrences = 1
Boo.<init>(0) in Foo occurrences = 1
Boo.m(0) in Foo occurrences = 1
Foo in Foo occurrences = 1
Foo$Bar in Foo occurrences = 1
Foo$Bar.<init>(0) in Foo occurrences = 1
Foo$Bar.m(0) in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 4
java.util.Collections in Foo occurrences = 5
java.util.Collections.emptyList(0) in Foo occurrences = 1
java.util.Collections.emptyMap(0) in Foo occurrences = 1
@@ -3,14 +3,12 @@ java.lang.Object -> Bar Foo
Backward References:
Bar in Bar Foo occurrences = 2
Bar.<init>(0) in Bar Foo occurrences = 2
Bar.<init>(0) in Foo occurrences = 1
Bar.m(0) in Bar occurrences = 1
Bar.xxx in Bar Foo occurrences = 2
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(0) in Foo occurrences = 1
java.io.PrintStream.println(0) in Foo occurrences = 3
java.lang.Object.<init>(0) in Bar Foo occurrences = 2
java.lang.System in Foo occurrences = 3
java.lang.System.out in Foo occurrences = 3
java.util.ArrayList in Bar Foo occurrences = 8
@@ -3,9 +3,7 @@ java.lang.Object -> myPackage.A
Backward References:
java.lang.Deprecated in package-info occurrences = 1
java.lang.Object.<init>(0) in package-info occurrences = 1
myPackage.A in package-info occurrences = 1
myPackage.A.<init>(0) in package-info occurrences = 1
Class Definitions:
myPackage.A in package-info
@@ -0,0 +1,7 @@
class Foo {
Foo() {
System.out.println(123);
}
}
@@ -3,8 +3,6 @@ java.lang.Object -> PrivateMembers PrivateMembers$PrivateInnerClass
Backward References:
PrivateMembers in PrivateMembers occurrences = 1
PrivateMembers.<init>(0) in PrivateMembers occurrences = 1
java.lang.Object.<init>(0) in PrivateMembers occurrences = 2
Class Definitions:
PrivateMembers in PrivateMembers
@@ -4,14 +4,10 @@ java.util.ArrayList -> ArrayListImpl
Backward References:
ArrayListImpl in Foo occurrences = 2
ArrayListImpl.<init>(0) in Foo occurrences = 1
ArrayListImpl.size(0) in Foo occurrences = 1
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.m(1) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 1
java.util.ArrayList in Foo occurrences = 1
java.util.ArrayList.<init>(0) in Foo occurrences = 1
Class Definitions:
ArrayListImpl in Foo
@@ -3,7 +3,6 @@ java.lang.Object -> Foo
Backward References:
Foo in Foo occurrences = 1
Foo.<init>(0) in Foo occurrences = 1
Foo.f1 in Foo occurrences = 1
Foo.f2 in Foo occurrences = 1
Foo.f3 in Foo occurrences = 1
@@ -12,7 +11,6 @@ Foo.m1(0) in Foo occurrences = 1
Foo.m2(0) in Foo occurrences = 1
Foo.m3(0) in Foo occurrences = 1
Foo.m4(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 1
java.lang.String in Foo occurrences = 6
java.util.List in Foo occurrences = 5
@@ -3,11 +3,9 @@ java.lang.Object -> pack.Bar
Backward References:
java.io.PrintStream.println(1) in Bar occurrences = 1
java.lang.Object.<init>(0) in Bar occurrences = 1
java.lang.System in Bar occurrences = 1
java.lang.System.out in Bar occurrences = 1
pack.Bar in Bar occurrences = 1
pack.Bar.<init>(0) in Bar occurrences = 1
pack.Bar.m(0) in Bar occurrences = 1
pack.Foo in Bar Foo occurrences = 2
pack.Foo.CONST in Bar Foo occurrences = 2
@@ -3,9 +3,7 @@ java.lang.Object -> TypeParam
Backward References:
TypeParam in TypeParam occurrences = 1
TypeParam.<init>(0) in TypeParam occurrences = 1
TypeParam.method(1) in TypeParam occurrences = 1
java.lang.Object.<init>(0) in TypeParam occurrences = 1
java.lang.String in TypeParam occurrences = 1
java.util.List in TypeParam occurrences = 2
@@ -4,11 +4,8 @@ java.lang.Object -> A A$B
Backward References:
A in Foo occurrences = 1
A$B in Foo occurrences = 1
A$B.<init>(0) in Foo occurrences = 1
A$B.hashCode(0) in Foo occurrences = 1
A$B.m(0) in Foo occurrences = 1
A.<init>(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 2
Class Definitions:
A in Foo
@@ -4,11 +4,8 @@ java.lang.Object -> A A$B
Backward References:
A in Foo occurrences = 1
A$B in Foo occurrences = 1
A$B.<init>(0) in Foo occurrences = 1
A$B.m(0) in Foo occurrences = 1
A.<init>(0) in Foo occurrences = 1
A.xxxx(0) in Foo occurrences = 2
java.lang.Object.<init>(0) in Foo occurrences = 2
Class Definitions:
A in Foo
@@ -4,11 +4,8 @@ java.lang.Runnable -> anonymous(id=0)
Backward References:
A in Foo occurrences = 1
A.<init>(0) in Foo occurrences = 1
A.mmmm(0) in Foo occurrences = 2
java.lang.Object.<init>(0) in Foo occurrences = 2
java.lang.Runnable in Foo occurrences = 2
java.lang.Runnable.<init>(0) in Foo occurrences = 1
java.lang.Runnable.run(0) in Foo occurrences = 1
Class Definitions:
@@ -4,11 +4,8 @@ java.lang.Runnable -> anonymous(id=0)
Backward References:
A in Foo occurrences = 1
A.<init>(0) in Foo occurrences = 1
A.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 2
java.lang.Runnable in Foo occurrences = 2
java.lang.Runnable.<init>(0) in Foo occurrences = 1
java.lang.Runnable.run(0) in Foo occurrences = 2
Class Definitions:
@@ -4,11 +4,8 @@ java.lang.Runnable -> anonymous(id=0)
Backward References:
A in Foo occurrences = 1
A.<init>(0) in Foo occurrences = 1
A.m(0) in Foo occurrences = 1
java.lang.Object.<init>(0) in Foo occurrences = 2
java.lang.Runnable in Foo occurrences = 2
java.lang.Runnable.<init>(0) in Foo occurrences = 1
java.lang.Runnable.run(0) in Foo occurrences = 1
Class Definitions:
@@ -3,8 +3,6 @@ java.lang.Object -> Bar
Backward References:
Bar in Bar occurrences = 1
Bar.<init>(0) in Bar occurrences = 1
java.lang.Object.<init>(0) in Bar occurrences = 1
java.util.ArrayList in Bar occurrences = 1
java.util.Collections in Bar occurrences = 2
java.util.Collections.EMPTY_LIST in Bar occurrences = 1
@@ -3,28 +3,18 @@ java.lang.Object -> Main com.ru.Some com.ru.Some$I1 com.ru.Some$I1$I2 com.ru.Som
Backward References:
Main in Main occurrences = 1
Main.<init>(0) in Main occurrences = 1
Main.main(1) in Main occurrences = 1
com.ru.Some in Main Some occurrences = 2
com.ru.Some$I1 in Main Some occurrences = 2
com.ru.Some$I1$I2 in Main Some occurrences = 2
com.ru.Some$I1$I2$I3 in Main Some occurrences = 2
com.ru.Some$I1$I2$I3.<init>(0) in Some occurrences = 1
com.ru.Some$I1$I2.<init>(0) in Some occurrences = 1
com.ru.Some$I1.<init>(0) in Some occurrences = 1
com.ru.Some.<init>(0) in Some occurrences = 1
com.ru.Some2 in Main Some2 occurrences = 2
com.ru.Some2$I1 in Main Some2 occurrences = 2
com.ru.Some2$I1$I2 in Main Some2 occurrences = 2
com.ru.Some2$I1$I2.<init>(0) in Some2 occurrences = 1
com.ru.Some2$I1$I2.utilityMethod(0) in Main Some2 occurrences = 2
com.ru.Some2$I1$I2.utilityMethod(1) in Main Some2 occurrences = 2
com.ru.Some2$I1.<init>(0) in Some2 occurrences = 1
com.ru.Some2.<init>(0) in Some2 occurrences = 1
com.ru.Some3 in Main Some3 occurrences = 2
com.ru.Some3.<init>(0) in Some3 occurrences = 1
com.ru.Some3.CONST in Main Some3 occurrences = 2
java.lang.Object.<init>(0) in Main Some Some2 Some3 occurrences = 9
java.lang.String in Main occurrences = 1
Class Definitions:
@@ -169,5 +169,17 @@ class ReferenceIndexTest : ReferenceIndexTestBase() {
fun testSignatureDataIndex() {
assertIndexOnRebuild("Foo.java")
}
fun testClassWithModifiers() {
assertIndexOnRebuild("Foo.java")
}
fun testParameterlessExplicitConstructor() {
assertIndexOnRebuild("Foo.java")
}
fun testDefaultConstructorUsage() {
assertIndexOnRebuild("Foo.java")
}
}