本文整理汇总了Java中com.intellij.psi.stubs.StubInputStream.readByte方法的典型用法代码示例。如果您正苦于以下问题:Java StubInputStream.readByte方法的具体用法?Java StubInputStream.readByte怎么用?Java StubInputStream.readByte使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.psi.stubs.StubInputStream
的用法示例。
在下文中一共展示了StubInputStream.readByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public PsiClassStub deserialize(@NotNull final StubInputStream dataStream, final StubElement parentStub) throws IOException {
byte flags = dataStream.readByte();
boolean isAnonymous = PsiClassStubImpl.isAnonymous(flags);
boolean isEnumConst = PsiClassStubImpl.isEnumConstInitializer(flags);
JavaClassElementType type = typeForClass(isAnonymous, isEnumConst);
if (!isAnonymous) {
StringRef name = dataStream.readName();
StringRef qname = dataStream.readName();
int languageLevelId = dataStream.readByte();
StringRef sourceFileName = dataStream.readName();
PsiClassStubImpl classStub = new PsiClassStubImpl(type, parentStub, qname, name, null, flags);
classStub.setLanguageLevel(LanguageLevel.values()[languageLevelId]);
classStub.setSourceFileName(sourceFileName);
return classStub;
}
else {
StringRef baseRef = dataStream.readName();
return new PsiClassStubImpl(type, parentStub, null, null, baseRef, flags);
}
}
示例2: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public PsiClassStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException
{
byte flags = dataStream.readByte();
boolean isAnonymous = PsiClassStubImpl.isAnonymous(flags);
if(!isAnonymous)
{
StringRef name = dataStream.readName();
StringRef qname = dataStream.readName();
StringRef sourceFileName = dataStream.readName();
PsiClassStubImpl classStub = new PsiClassStubImpl(this, parentStub, StringRef.toString(qname), StringRef.toString(name), null, flags);
classStub.setSourceFileName(StringRef.toString(sourceFileName));
return classStub;
}
else
{
StringRef baseRef = dataStream.readName();
return new PsiClassStubImpl(this, parentStub, null, null, StringRef.toString(baseRef), flags);
}
}
示例3: readTYPE
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
public static TypeInfo readTYPE(@NotNull StubInputStream record) throws IOException
{
int flags = 0xFF & record.readByte();
if(flags == FREQUENT_INDEX_MASK)
{
return NULL;
}
int frequentIndex = FREQUENT_INDEX_MASK & flags;
byte arrayCount = isSet(flags, HAS_ARRAY_COUNT) ? record.readByte() : 0;
boolean hasEllipsis = isSet(flags, HAS_ELLIPSIS);
String text = frequentIndex == 0 ? StringRef.toString(record.readName()) : ourIndexFrequentType[frequentIndex];
return new TypeInfo(text, arrayCount, hasEllipsis, PsiAnnotationStub.EMPTY_ARRAY);
}
示例4: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@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));
}
示例5: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public PsiFieldStub deserialize(@NotNull final StubInputStream dataStream, final StubElement parentStub) throws IOException {
final StringRef name = dataStream.readName();
final TypeInfo type = TypeInfo.readTYPE(dataStream);
final StringRef initializerText = dataStream.readName();
final byte flags = dataStream.readByte();
return new PsiFieldStubImpl(parentStub, name, type, initializerText, flags);
}
示例6: 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);
}
示例7: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@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);
}
示例8: readTYPE
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
public static TypeInfo readTYPE(@NotNull StubInputStream record) throws IOException {
int flags = 0xFF & record.readByte();
if (flags == FREQUENT_INDEX_MASK) {
return NULL;
}
int frequentIndex = FREQUENT_INDEX_MASK & flags;
byte arrayCount = isSet(flags, HAS_ARRAY_COUNT) ? record.readByte() : 0;
boolean hasEllipsis = isSet(flags, HAS_ELLIPSIS);
String text = frequentIndex == 0 ? StringRef.toString(record.readName()) : ourIndexFrequentType[frequentIndex];
return new TypeInfo(text, arrayCount, hasEllipsis, PsiAnnotationStub.EMPTY_ARRAY);
}
示例9: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
public PyNamedParameterStub deserialize(@NotNull final StubInputStream dataStream, final StubElement parentStub) throws IOException {
String name = StringRef.toString(dataStream.readName());
byte flags = dataStream.readByte();
return new PyNamedParameterStubImpl(name,
(flags & POSITIONAL_CONTAINER) != 0,
(flags & KEYWORD_CONTAINER) != 0,
(flags & HAS_DEFAULT_VALUE) != 0,
parentStub,
getStubElementType());
}
示例10: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@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);
}
示例11: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public GrImportStatementStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
String referenceText = GrStubUtils.readNullableString(dataStream);
String aliasName = GrStubUtils.readNullableString(dataStream);
byte flags = dataStream.readByte();
return new GrImportStatementStub(parentStub, this, referenceText, aliasName, flags);
}
示例12: deserializeFieldStub
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
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);
}
示例13: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@Override
@NotNull
public GrTypeDefinitionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
String name = StringRef.toString(dataStream.readName());
String qname = StringRef.toString(dataStream.readName());
byte flags = dataStream.readByte();
String[] superClasses = readStringArray(dataStream);
String[] annos = readStringArray(dataStream);
return new GrTypeDefinitionStub(parentStub, name, superClasses, this, qname, annos, flags);
}
示例14: readStringArray
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
private static String[] readStringArray(StubInputStream dataStream) throws IOException {
byte supersNumber = dataStream.readByte();
String[] superClasses = new String[supersNumber];
for (int i = 0; i < supersNumber; i++) {
superClasses[i] = StringRef.toString(dataStream.readName());
}
return superClasses;
}
示例15: readStringArray
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
public static String[] readStringArray(StubInputStream dataStream) throws IOException {
int length = dataStream.readByte();
if (length == TOO_LONG) {
length = dataStream.readInt();
}
final String[] annNames = new String[length];
for (int i = 0; i < length; i++) {
annNames[i] = dataStream.readName().toString();
}
return annNames;
}