Search in sources :

Example 16 with StringRef

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

the class JavaFieldStubElementType method deserialize.

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

Example 17 with StringRef

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

the class JavaFileElementType method deserialize.

@NotNull
@Override
public PsiJavaFileStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
    boolean compiled = dataStream.readBoolean();
    int level = dataStream.readByte();
    StringRef packageName = dataStream.readName();
    return new PsiJavaFileStubImpl(null, StringRef.toString(packageName), level >= 0 ? LanguageLevel.values()[level] : null, compiled);
}
Also used : PsiJavaFileStubImpl(com.intellij.psi.impl.java.stubs.impl.PsiJavaFileStubImpl) StringRef(com.intellij.util.io.StringRef) NotNull(org.jetbrains.annotations.NotNull)

Example 18 with StringRef

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

the class JavaParameterElementType method deserialize.

@NotNull
@Override
public PsiParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
    StringRef name = dataStream.readName();
    if (name == null)
        throw new IOException("corrupted indices");
    TypeInfo type = TypeInfo.readTYPE(dataStream);
    byte flags = dataStream.readByte();
    return new PsiParameterStubImpl(parentStub, name.toString(), type, flags);
}
Also used : PsiParameterStubImpl(com.intellij.psi.impl.java.stubs.impl.PsiParameterStubImpl) StringRef(com.intellij.util.io.StringRef) IOException(java.io.IOException) TypeInfo(com.intellij.psi.impl.cache.TypeInfo) NotNull(org.jetbrains.annotations.NotNull)

Example 19 with StringRef

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

the class GrVariableElementType method deserialize.

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

Example 20 with StringRef

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

the class GrFieldElementType method deserializeFieldStub.

static GrFieldStub deserializeFieldStub(StubInputStream dataStream, StubElement parentStub) throws IOException {
    StringRef ref = dataStream.readName();
    final String[] annNames = GrStubUtils.readStringArray(dataStream);
    final String[] namedParameters = GrStubUtils.readStringArray(dataStream);
    byte flags = dataStream.readByte();
    final String typeText = GrStubUtils.readNullableString(dataStream);
    return new GrFieldStub(parentStub, ref, annNames, namedParameters, GrFieldStub.isEnumConstant(flags) ? GroovyElementTypes.ENUM_CONSTANT : GroovyElementTypes.FIELD, flags, typeText);
}
Also used : GrFieldStub(org.jetbrains.plugins.groovy.lang.psi.stubs.GrFieldStub) StringRef(com.intellij.util.io.StringRef)

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