Search in sources :

Example 21 with StringRef

use of com.intellij.util.io.StringRef in project intellij-community by JetBrains.

the class GrStubFileElementType method deserialize.

@NotNull
@Override
public GrFileStub deserialize(@NotNull final StubInputStream dataStream, final StubElement parentStub) throws IOException {
    StringRef name = dataStream.readName();
    boolean isScript = dataStream.readBoolean();
    return new GrFileStub(name, isScript, GrStubUtils.readStringArray(dataStream));
}
Also used : StringRef(com.intellij.util.io.StringRef) GrFileStub(org.jetbrains.plugins.groovy.lang.psi.stubs.GrFileStub) NotNull(org.jetbrains.annotations.NotNull)

Example 22 with StringRef

use of com.intellij.util.io.StringRef in project intellij-community by JetBrains.

the class JavaImportStatementElementType method deserialize.

@NotNull
@Override
public PsiImportStatementStub deserialize(@NotNull final StubInputStream dataStream, final StubElement parentStub) throws IOException {
    final byte flags = dataStream.readByte();
    final StringRef refText = dataStream.readName();
    return new PsiImportStatementStubImpl(parentStub, refText, flags);
}
Also used : PsiImportStatementStubImpl(com.intellij.psi.impl.java.stubs.impl.PsiImportStatementStubImpl) StringRef(com.intellij.util.io.StringRef) NotNull(org.jetbrains.annotations.NotNull)

Example 23 with StringRef

use of com.intellij.util.io.StringRef in project intellij-community by JetBrains.

the class JavaMethodElementType method deserialize.

@NotNull
@Override
public PsiMethodStub deserialize(@NotNull final StubInputStream dataStream, final StubElement parentStub) throws IOException {
    StringRef name = dataStream.readName();
    final TypeInfo type = TypeInfo.readTYPE(dataStream);
    byte flags = dataStream.readByte();
    final StringRef defaultMethodValue = PsiMethodStubImpl.isAnnotationMethod(flags) ? dataStream.readName() : null;
    return new PsiMethodStubImpl(parentStub, StringRef.toString(name), type, flags, StringRef.toString(defaultMethodValue));
}
Also used : PsiMethodStubImpl(com.intellij.psi.impl.java.stubs.impl.PsiMethodStubImpl) StringRef(com.intellij.util.io.StringRef) TypeInfo(com.intellij.psi.impl.cache.TypeInfo) NotNull(org.jetbrains.annotations.NotNull)

Example 24 with StringRef

use of com.intellij.util.io.StringRef in project intellij-community by JetBrains.

the class QualifiedName method deserialize.

@Nullable
public static QualifiedName deserialize(StubInputStream dataStream) throws IOException {
    QualifiedName qName;
    int size = dataStream.readVarInt();
    if (size == 0) {
        qName = null;
    } else {
        qName = new QualifiedName(size);
        for (int i = 0; i < size; i++) {
            final StringRef name = dataStream.readName();
            qName.myComponents.add(name == null ? null : name.getString());
        }
    }
    return qName;
}
Also used : StringRef(com.intellij.util.io.StringRef) Nullable(org.jetbrains.annotations.Nullable)

Example 25 with StringRef

use of com.intellij.util.io.StringRef in project intellij-community by JetBrains.

the class GrMethodElementType method deserialize.

@Override
@NotNull
public GrMethodStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
    StringRef ref = dataStream.readName();
    final String[] annNames = GrStubUtils.readStringArray(dataStream);
    String[] namedParameters = GrStubUtils.readStringArray(dataStream);
    String typeText = GrStubUtils.readNullableString(dataStream);
    final byte flags = dataStream.readByte();
    return new GrMethodStub(parentStub, ref, annNames, namedParameters, this, typeText, flags);
}
Also used : StringRef(com.intellij.util.io.StringRef) GrMethodStub(org.jetbrains.plugins.groovy.lang.psi.stubs.GrMethodStub) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

StringRef (com.intellij.util.io.StringRef)32 NotNull (org.jetbrains.annotations.NotNull)24 FqName (org.jetbrains.kotlin.name.FqName)6 TypeInfo (com.intellij.psi.impl.cache.TypeInfo)3 QualifiedName (com.intellij.psi.util.QualifiedName)2 IOException (java.io.IOException)2 Nullable (org.jetbrains.annotations.Nullable)2 KotlinImportDirectiveStubImpl (org.jetbrains.kotlin.psi.stubs.impl.KotlinImportDirectiveStubImpl)2 KotlinParameterStubImpl (org.jetbrains.kotlin.psi.stubs.impl.KotlinParameterStubImpl)2 PsiClassStubImpl (com.intellij.psi.impl.java.stubs.impl.PsiClassStubImpl)1 PsiFieldStubImpl (com.intellij.psi.impl.java.stubs.impl.PsiFieldStubImpl)1 PsiImportStatementStubImpl (com.intellij.psi.impl.java.stubs.impl.PsiImportStatementStubImpl)1 PsiJavaFileStubImpl (com.intellij.psi.impl.java.stubs.impl.PsiJavaFileStubImpl)1 PsiMethodStubImpl (com.intellij.psi.impl.java.stubs.impl.PsiMethodStubImpl)1 PsiParameterStubImpl (com.intellij.psi.impl.java.stubs.impl.PsiParameterStubImpl)1 PyFileStubImpl (com.jetbrains.python.psi.impl.stubs.PyFileStubImpl)1 ArrayList (java.util.ArrayList)1 BitSet (java.util.BitSet)1 JvmFileClassInfo (org.jetbrains.kotlin.fileClasses.JvmFileClassInfo)1 KotlinAnnotationEntryStubImpl (org.jetbrains.kotlin.psi.stubs.impl.KotlinAnnotationEntryStubImpl)1