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


Java StubInputStream.readVarInt方法代码示例

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


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

示例1: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:QualifiedName.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 PsiClassReferenceListStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
  byte role = dataStream.readByte();

  int len = dataStream.readVarInt();
  StringRef[] names = StringRef.createArray(len);
  for (int i = 0; i < names.length; i++) {
    names[i] = dataStream.readName();
  }

  PsiReferenceList.Role decodedRole = decodeRole(role);
  return new PsiClassReferenceListStubImpl(roleToElementType(decodedRole), parentStub, names, decodedRole);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:JavaClassReferenceListElementType.java

示例4: 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

示例5: 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

示例6: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public CSharpAttributeListStub deserialize(@NotNull StubInputStream stubInputStream, StubElement stubElement) throws IOException
{
	int targetIndex = stubInputStream.readVarInt();
	return new CSharpAttributeListStub(stubElement, this, targetIndex);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:8,代码来源:CSharpAttributeListStubElementType.java

示例7: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public CSharpWithIntValueStub<CSharpArrayType> deserialize(@NotNull StubInputStream stubInputStream, StubElement stubElement) throws IOException
{
	int i = stubInputStream.readVarInt();
	return new CSharpWithIntValueStub<CSharpArrayType>(stubElement, this, i);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:8,代码来源:CSharpArrayTypeStubElementType.java

示例8: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public CSharpVariableDeclStub<P> deserialize(@NotNull StubInputStream stubInputStream, StubElement stubElement) throws IOException
{
	int otherModifierMask = stubInputStream.readVarInt();
	return new CSharpVariableDeclStub<P>(stubElement, this, null, otherModifierMask);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:8,代码来源:CSharpVariableStubElementType.java

示例9: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public CSharpVariableDeclStub<P> deserialize(@NotNull StubInputStream stubInputStream, StubElement stubElement) throws IOException
{
	StringRef parentQName = stubInputStream.readName();
	int otherModifierMask = stubInputStream.readVarInt();
	return new CSharpVariableDeclStub<P>(stubElement, this, StringRef.toString(parentQName), otherModifierMask);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:9,代码来源:CSharpQVariableStubElementType.java

示例10: 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

示例11: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public CSharpWithIntValueStub<CSharpNativeType> deserialize(@NotNull StubInputStream stubInputStream, StubElement stubElement) throws IOException
{
	int index = stubInputStream.readVarInt();
	return new CSharpWithIntValueStub<CSharpNativeType>(stubElement, this, index);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:8,代码来源:CSharpNativeTypeStubElementType.java

示例12: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public CSharpWithIntValueStub<CSharpGenericConstraintKeywordValue> deserialize(@NotNull StubInputStream stubInputStream,
		StubElement stubElement) throws IOException
{
	int index = stubInputStream.readVarInt();
	return new CSharpWithIntValueStub<CSharpGenericConstraintKeywordValue>(stubElement, this, index);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:9,代码来源:CSharpGenericConstraintKeywordValueStubElementType.java

示例13: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public CSharpMethodDeclStub deserialize(@NotNull StubInputStream stubInputStream, StubElement stubElement) throws IOException
{
	StringRef qname = stubInputStream.readName();
	int otherModifierMask = stubInputStream.readVarInt();
	return new CSharpMethodDeclStub(stubElement, this, StringRef.toString(qname), otherModifierMask, -1);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:9,代码来源:CSharpConstructorStubElementType.java

示例14: deserialize

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

示例15: deserialize

import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public MsilGenericParameterStub deserialize(@NotNull StubInputStream inputStream, StubElement stubElement) throws IOException
{
	StringRef ref = inputStream.readName();
	int mod = inputStream.readVarInt();
	int typeKindIndex = inputStream.readVarInt();
	return new MsilGenericParameterStub(stubElement, this, ref, mod, typeKindIndex);
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:10,代码来源:MsilGenericParameterStubElementType.java


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