do not add private members references to index + add functional expressions to index

This commit is contained in:
Dmitry Batkovich
2016-09-27 10:21:58 +03:00
parent a867b6100e
commit 39698e7cb5
2 changed files with 59 additions and 0 deletions
@@ -0,0 +1,52 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jps.javac.ast.api;
import com.sun.source.tree.Tree;
import com.sun.tools.javac.code.Symbol;
public class JavacDefSymbol extends JavacRefSymbol {
private final int myOffset;
public JavacDefSymbol(Symbol symbol, Tree.Kind kind, int offset) {
super(symbol, kind);
myOffset = offset;
}
public int getOffset() {
return myOffset;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
JavacDefSymbol symbol = (JavacDefSymbol)o;
if (myOffset != symbol.myOffset) return false;
return true;
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + myOffset;
return result;
}
}
@@ -0,0 +1,7 @@
Backward Hierarchy:
java.lang.Object -> PrivateMembers PrivateMembers$PrivateInnerClass
Backward References:
PrivateMembers in PrivateMembers
PrivateMembers.<init>(0) in PrivateMembers
java.lang.Object.<init>(0) in PrivateMembers