Search in sources :

Example 1 with KotlinParameterStubImpl

use of org.jetbrains.kotlin.psi.stubs.impl.KotlinParameterStubImpl in project kotlin by JetBrains.

the class KtParameterElementType method deserialize.

@NotNull
@Override
public KotlinParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
    StringRef name = dataStream.readName();
    boolean isMutable = dataStream.readBoolean();
    boolean hasValOrValNode = dataStream.readBoolean();
    boolean hasDefaultValue = dataStream.readBoolean();
    StringRef fqName = dataStream.readName();
    return new KotlinParameterStubImpl(parentStub, fqName, name, isMutable, hasValOrValNode, hasDefaultValue);
}
Also used : StringRef(com.intellij.util.io.StringRef) KotlinParameterStubImpl(org.jetbrains.kotlin.psi.stubs.impl.KotlinParameterStubImpl) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with KotlinParameterStubImpl

use of org.jetbrains.kotlin.psi.stubs.impl.KotlinParameterStubImpl 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());
}
Also used : FqName(org.jetbrains.kotlin.name.FqName) StringRef(com.intellij.util.io.StringRef) KotlinParameterStubImpl(org.jetbrains.kotlin.psi.stubs.impl.KotlinParameterStubImpl)

Aggregations

StringRef (com.intellij.util.io.StringRef)2 KotlinParameterStubImpl (org.jetbrains.kotlin.psi.stubs.impl.KotlinParameterStubImpl)2 NotNull (org.jetbrains.annotations.NotNull)1 FqName (org.jetbrains.kotlin.name.FqName)1