use of com.intellij.util.io.StringRef in project kotlin by JetBrains.
the class KtImportDirectiveElementType method createStub.
@Override
public KotlinImportDirectiveStub createStub(@NotNull KtImportDirective psi, StubElement parentStub) {
FqName importedFqName = psi.getImportedFqName();
StringRef fqName = StringRef.fromString(importedFqName == null ? null : importedFqName.asString());
StringRef aliasName = StringRef.fromString(psi.getAliasName());
return new KotlinImportDirectiveStubImpl(parentStub, psi.isAllUnder(), fqName, aliasName, psi.isValidImport());
}
use of com.intellij.util.io.StringRef 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);
}
use of com.intellij.util.io.StringRef in project kotlin by JetBrains.
the class KtParameterElementType method createStub.
@Override
public KotlinParameterStub createStub(@NotNull KtParameter psi, StubElement parentStub) {
FqName fqName = psi.getFqName();
StringRef fqNameRef = StringRef.fromString(fqName != null ? fqName.asString() : null);
return new KotlinParameterStubImpl(parentStub, fqNameRef, StringRef.fromString(psi.getName()), psi.isMutable(), psi.hasValOrVar(), psi.hasDefaultValue());
}
use of com.intellij.util.io.StringRef in project kotlin by JetBrains.
the class KtPropertyElementType method deserialize.
@NotNull
@Override
public KotlinPropertyStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
StringRef name = dataStream.readName();
boolean isVar = dataStream.readBoolean();
boolean isTopLevel = dataStream.readBoolean();
boolean hasDelegate = dataStream.readBoolean();
boolean hasDelegateExpression = dataStream.readBoolean();
boolean hasInitializer = dataStream.readBoolean();
boolean hasReceiverTypeRef = dataStream.readBoolean();
boolean hasReturnTypeRef = dataStream.readBoolean();
StringRef fqNameAsString = dataStream.readName();
FqName fqName = fqNameAsString != null ? new FqName(fqNameAsString.toString()) : null;
return new KotlinPropertyStubImpl(parentStub, name, isVar, isTopLevel, hasDelegate, hasDelegateExpression, hasInitializer, hasReceiverTypeRef, hasReturnTypeRef, fqName);
}
use of com.intellij.util.io.StringRef in project kotlin by JetBrains.
the class KtTypeParameterElementType method deserialize.
@NotNull
@Override
public KotlinTypeParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
StringRef name = dataStream.readName();
boolean isInVariance = dataStream.readBoolean();
boolean isOutVariance = dataStream.readBoolean();
return new KotlinTypeParameterStubImpl(parentStub, name, isInVariance, isOutVariance);
}
Aggregations