当前位置: 首页>>代码示例>>Java>>正文


Java StubInputStream.readBoolean方法代码示例

本文整理汇总了Java中com.intellij.psi.stubs.StubInputStream.readBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java StubInputStream.readBoolean方法的具体用法?Java StubInputStream.readBoolean怎么用?Java StubInputStream.readBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.psi.stubs.StubInputStream的用法示例。


在下文中一共展示了StubInputStream.readBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
public PyTargetExpressionStub deserialize(@NotNull final StubInputStream stream, final StubElement parentStub)
    throws IOException {
  String name = StringRef.toString(stream.readName());
  String docString = stream.readUTFFast();
  if (docString.isEmpty()) {
    docString = null;
  }
  PyTargetExpressionStub.InitializerType initializerType = PyTargetExpressionStub.InitializerType.fromIndex(stream.readVarInt());
  if (initializerType == PyTargetExpressionStub.InitializerType.Custom) {
    final String typeName = stream.readName().getString();
    for(CustomTargetExpressionStubType type: getCustomStubTypes()) {
      if (type.getClass().getCanonicalName().equals(typeName)) {
        CustomTargetExpressionStub stub = type.deserializeStub(stream);
        return new PyTargetExpressionStubImpl(name, docString, stub, parentStub);
      }
    }
    throw new IOException("Unknown custom stub type " + typeName);
  }
  QualifiedName initializer = QualifiedName.deserialize(stream);
  boolean isQualified = stream.readBoolean();
  return new PyTargetExpressionStubImpl(name, docString, initializerType, initializer, isQualified, parentStub);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:PyTargetExpressionElementType.java

示例2: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@Override
@Nullable
public LuaTableStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
    boolean hasType = dataStream.readBoolean();
    byte[] typedata = null;
    if (hasType)
    {
        int len = dataStream.readVarInt();
        if (len < 0) ((SerializationManagerEx) SerializationManagerEx.getInstance()).repairNameStorage();

        if (len <= 0) {
            return new LuaTableStubImpl(parentStub);
        }

        typedata = new byte[len];
        dataStream.read(typedata, 0, len);
    }

    return new LuaTableStubImpl(parentStub, typedata);
}
 
开发者ID:consulo,项目名称:consulo-lua,代码行数:21,代码来源:LuaTableStubType.java

示例3: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public AtParamStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub)
    throws IOException {
  final StringRef ref = dataStream.readName();
  final StringRef ref2 = dataStream.readName();
  return new AtParamStub(
      parentStub, ref.getString(), ref2.getString(), dataStream.readBoolean());
}
 
开发者ID:google,项目名称:bamboo-soy,代码行数:10,代码来源:AtParamStub.java

示例4: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@Override
public LuaCompoundIdentifierStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
    StringRef ref = dataStream.readName();

    final Pair<LuaType, byte[]> pair = LuaStubUtils.readSubstitutableType(dataStream);
    byte[] typedata = pair.getSecond();
    LuaType type = pair.first;

    boolean isDeclaration = dataStream.readBoolean();

    return new LuaCompoundIdentifierStubImpl(parentStub, ref, isDeclaration, typedata, type);
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:13,代码来源:LuaStubCompoundIdentifierType.java

示例5: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public PsiParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
  StringRef name = dataStream.readName();
  TypeInfo type = TypeInfo.readTYPE(dataStream);
  boolean isEllipsis = dataStream.readBoolean();
  return new PsiParameterStubImpl(parentStub, name, type, isEllipsis);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:JavaParameterElementType.java

示例6: readNullableList

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@Nullable
public static List<String> readNullableList(StubInputStream dataStream) throws IOException {
  boolean hasNames = dataStream.readBoolean();
  List<String> names = null;
  if (hasNames) {
    int size = dataStream.readVarInt();
    names = new ArrayList<String>(size);
    for (int i = 0; i < size; i++) {
      names.add(dataStream.readName().getString());
    }
  }
  return names;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:PyFileElementType.java

示例7: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
public PyFromImportStatementStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
  QualifiedName qName = QualifiedName.deserialize(dataStream);
  boolean isStarImport = dataStream.readBoolean();
  int relativeLevel = dataStream.readVarInt();
  return new PyFromImportStatementStubImpl(qName, isStarImport, relativeLevel, parentStub, getStubElementType());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:PyFromImportStatementElementType.java

示例8: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public CSharpReferenceExpressionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException
{
	StringRef referenceText = dataStream.readName();
	int kind = dataStream.readVarInt();
	int memberAccessType = dataStream.readVarInt();
	boolean global = dataStream.readBoolean();
	return new CSharpReferenceExpressionStub(parentStub, this, StringRef.toString(referenceText), kind, memberAccessType, global);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:11,代码来源:CSharpReferenceExpressionStubElementType.java

示例9: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public ElementStub deserialize(@NotNull StubInputStream dataStream, ElementStub parentStub) throws IOException
{
	return new ElementStub(parentStub, dataStream.readName(), dataStream.readName(), dataStream.readVarInt(), dataStream.readBoolean(),
			dataStream.readName());
}
 
开发者ID:consulo,项目名称:consulo-xml,代码行数:8,代码来源:ElementStubSerializer.java

示例10: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@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);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:JavaFileElementType.java

示例11: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public TemplateBlockStub deserialize(
    @NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
  return new TemplateBlockStub(parentStub, dataStream.readBoolean());
}
 
开发者ID:google,项目名称:bamboo-soy,代码行数:7,代码来源:TemplateBlockStub.java

示例12: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
public PyTupleParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
  boolean hasDefaultValue = dataStream.readBoolean();
  return new PyTupleParameterStubImpl(hasDefaultValue, parentStub);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:PyTupleParameterElementType.java

示例13: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public ElementStub deserialize(@NotNull StubInputStream dataStream, ElementStub parentStub) throws IOException {
  return new ElementStub(parentStub, dataStream.readName(), dataStream.readName(),
                         dataStream.readVarInt(), dataStream.readBoolean(), dataStream.readName(), dataStream.readUTFFast());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ElementStubSerializer.java

示例14: readNullableString

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@Nullable
public static String readNullableString(StubInputStream dataStream) throws IOException {
  final boolean hasTypeText = dataStream.readBoolean();
  return hasTypeText ? dataStream.readUTFFast() : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:GrStubUtils.java

示例15: deserializeNullable

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@Nullable
public static SerializedFqnTypeRef deserializeNullable(@NotNull StubInputStream stream) throws IOException {
  boolean b = stream.readBoolean();
  if (!b) return null;
  return deserialize(stream);
}
 
开发者ID:SumoLogic,项目名称:epigraph,代码行数:7,代码来源:SerializedFqnTypeRef.java


注:本文中的com.intellij.psi.stubs.StubInputStream.readBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。