use of org.jetbrains.kotlin.psi.stubs.impl.KotlinObjectStubImpl in project kotlin by JetBrains.
the class KtObjectElementType method createStub.
@Override
public KotlinObjectStub createStub(@NotNull KtObjectDeclaration psi, StubElement parentStub) {
String name = psi.getName();
FqName fqName = ResolveSessionUtils.safeFqNameForLazyResolve(psi);
List<String> superNames = KtPsiUtilKt.getSuperNames(psi);
return new KotlinObjectStubImpl(parentStub, StringRef.fromString(name), fqName, Utils.INSTANCE.wrapStrings(superNames), psi.isTopLevel(), psi.isCompanion(), psi.isLocal(), psi.isObjectLiteral());
}
use of org.jetbrains.kotlin.psi.stubs.impl.KotlinObjectStubImpl in project kotlin by JetBrains.
the class KtObjectElementType method deserialize.
@NotNull
@Override
public KotlinObjectStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
StringRef name = dataStream.readName();
StringRef fqNameStr = dataStream.readName();
FqName fqName = fqNameStr != null ? new FqName(fqNameStr.toString()) : null;
boolean isTopLevel = dataStream.readBoolean();
boolean isCompanion = dataStream.readBoolean();
boolean isLocal = dataStream.readBoolean();
boolean isObjectLiteral = dataStream.readBoolean();
int superCount = dataStream.readVarInt();
StringRef[] superNames = StringRef.createArray(superCount);
for (int i = 0; i < superCount; i++) {
superNames[i] = dataStream.readName();
}
return new KotlinObjectStubImpl(parentStub, name, fqName, superNames, isTopLevel, isCompanion, isLocal, isObjectLiteral);
}
Aggregations