Minor: inline consturctor of PsiJetClassStubImpl
This commit is contained in:
+4
-11
@@ -30,6 +30,7 @@ import org.jetbrains.jet.lang.psi.JetPsiUtil;
|
||||
import org.jetbrains.jet.lang.psi.psiUtil.PsiUtilPackage;
|
||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetClassStub;
|
||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetClassStubImpl;
|
||||
import org.jetbrains.jet.lang.psi.stubs.impl.Utils;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
|
||||
@@ -64,17 +65,9 @@ public class JetClassElementType extends JetStubElementType<PsiJetClassStub, Jet
|
||||
boolean isEnumEntry = psi instanceof JetEnumEntry;
|
||||
List<String> superNames = PsiUtilPackage.getSuperNames(psi);
|
||||
return new PsiJetClassStubImpl(
|
||||
getStubType(isEnumEntry),
|
||||
parentStub,
|
||||
fqName != null ? fqName.asString() : null,
|
||||
psi.getName(),
|
||||
superNames,
|
||||
psi.isTrait(),
|
||||
psi.isEnum(),
|
||||
isEnumEntry,
|
||||
psi.isAnnotation(),
|
||||
psi.isInner(),
|
||||
JetPsiUtil.isLocal(psi)
|
||||
getStubType(isEnumEntry), parentStub, StringRef.fromString(fqName != null ? fqName.asString() : null),
|
||||
StringRef.fromString(psi.getName()), Utils.instance$.wrapStrings(superNames), psi.isTrait(), psi.isEnum(), isEnumEntry,
|
||||
psi.isAnnotation(), psi.isInner(), JetPsiUtil.isLocal(psi)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-20
@@ -42,17 +42,6 @@ public class PsiJetClassStubImpl extends StubBase<JetClass> implements PsiJetCla
|
||||
private final boolean isInner;
|
||||
private final boolean isLocal;
|
||||
|
||||
public PsiJetClassStubImpl(
|
||||
JetClassElementType type,
|
||||
StubElement parent,
|
||||
@Nullable String qualifiedName,
|
||||
String name,
|
||||
List<String> superNames,
|
||||
boolean isTrait, boolean isEnumClass, boolean isEnumEntry, boolean isAnnotation, boolean isInner, boolean isLocal) {
|
||||
this(type, parent, StringRef.fromString(qualifiedName), StringRef.fromString(name), wrapStrings(superNames),
|
||||
isTrait, isEnumClass, isEnumEntry, isAnnotation, isInner, isLocal);
|
||||
}
|
||||
|
||||
public PsiJetClassStubImpl(
|
||||
JetClassElementType type,
|
||||
StubElement parent,
|
||||
@@ -64,7 +53,8 @@ public class PsiJetClassStubImpl extends StubBase<JetClass> implements PsiJetCla
|
||||
boolean isEnumEntry,
|
||||
boolean isAnnotation,
|
||||
boolean isInner,
|
||||
boolean isLocal) {
|
||||
boolean isLocal
|
||||
) {
|
||||
super(parent, type);
|
||||
this.qualifiedName = qualifiedName;
|
||||
this.name = name;
|
||||
@@ -77,14 +67,6 @@ public class PsiJetClassStubImpl extends StubBase<JetClass> implements PsiJetCla
|
||||
this.isLocal = isLocal;
|
||||
}
|
||||
|
||||
private static StringRef[] wrapStrings(List<String> names) {
|
||||
StringRef[] refs = new StringRef[names.size()];
|
||||
for (int i = 0; i < names.size(); i++) {
|
||||
refs[i] = StringRef.fromString(names.get(i));
|
||||
}
|
||||
return refs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FqName getFqName() {
|
||||
String stringRef = StringRef.toString(qualifiedName);
|
||||
|
||||
Reference in New Issue
Block a user