本文整理汇总了Java中com.intellij.psi.stubs.StubInputStream.readName方法的典型用法代码示例。如果您正苦于以下问题:Java StubInputStream.readName方法的具体用法?Java StubInputStream.readName怎么用?Java StubInputStream.readName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.psi.stubs.StubInputStream
的用法示例。
在下文中一共展示了StubInputStream.readName方法的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包/类
@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;
}
示例3: 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);
}
}
示例4: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public TemplateDefinitionStub deserialize(
@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
final StringRef ref = dataStream.readName();
return new TemplateDefinitionStub(parentStub, ref.getString());
}
示例5: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public NamespaceDeclarationStub deserialize(
@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
final StringRef ref = dataStream.readName();
return new NamespaceDeclarationStub(parentStub, ref.getString());
}
示例6: 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());
}
示例7: 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);
}
示例8: 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));
}
示例9: 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);
}
示例10: 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);
}
示例11: 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);
}
示例12: 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);
}
示例13: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@NotNull
@Override
public PyFileStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
List<String> all = readNullableList(dataStream);
BitSet future_features = readBitSet(dataStream);
StringRef deprecationMessage = dataStream.readName();
return new PyFileStubImpl(all, future_features, deprecationMessage);
}
示例14: deserialize
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
public static PropertyStubStorage deserialize(StubInputStream stream) throws IOException {
PropertyStubStorage me = new PropertyStubStorage();
me.myGetter = readOne(stream);
me.mySetter = readOne(stream);
me.myDeleter = readOne(stream);
//
StringRef ref = stream.readName();
me.myDoc = ref != null? ref.getString() : null;
return me;
}
示例15: readOne
import com.intellij.psi.stubs.StubInputStream; //导入方法依赖的package包/类
@Nullable
private static Maybe<String> readOne(StubInputStream stream) throws IOException {
StringRef ref = stream.readName();
if (ref == null) return none;
else {
String s = ref.getString();
if (IMPOSSIBLE_NAME.equals(s)) return unknown;
else return new Maybe<String>(s);
}
}