use of org.jetbrains.kotlin.psi.stubs.impl.KotlinClassStubImpl in project kotlin by JetBrains.
the class KtClassElementType method deserialize.
@NotNull
@Override
public KotlinClassStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
StringRef name = dataStream.readName();
StringRef qualifiedName = dataStream.readName();
boolean isTrait = dataStream.readBoolean();
boolean isEnumEntry = dataStream.readBoolean();
boolean isLocal = dataStream.readBoolean();
boolean isTopLevel = dataStream.readBoolean();
int superCount = dataStream.readVarInt();
StringRef[] superNames = StringRef.createArray(superCount);
for (int i = 0; i < superCount; i++) {
superNames[i] = dataStream.readName();
}
return new KotlinClassStubImpl(getStubType(isEnumEntry), parentStub, qualifiedName, name, superNames, isTrait, isEnumEntry, isLocal, isTopLevel);
}
use of org.jetbrains.kotlin.psi.stubs.impl.KotlinClassStubImpl in project kotlin by JetBrains.
the class KtClassElementType method createStub.
@Override
public KotlinClassStub createStub(@NotNull KtClass psi, StubElement parentStub) {
FqName fqName = ResolveSessionUtils.safeFqNameForLazyResolve(psi);
boolean isEnumEntry = psi instanceof KtEnumEntry;
List<String> superNames = KtPsiUtilKt.getSuperNames(psi);
return new KotlinClassStubImpl(getStubType(isEnumEntry), parentStub, StringRef.fromString(fqName != null ? fqName.asString() : null), StringRef.fromString(psi.getName()), Utils.INSTANCE.wrapStrings(superNames), psi.isInterface(), isEnumEntry, psi.isLocal(), psi.isTopLevel());
}
Aggregations