use of org.jetbrains.plugins.groovy.lang.psi.stubs.GrFieldStub 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);
}
use of org.jetbrains.plugins.groovy.lang.psi.stubs.GrFieldStub in project intellij-community by JetBrains.
the class GrFieldImpl method getNamedParameters.
@Override
@NotNull
public Map<String, NamedArgumentDescriptor> getNamedParameters() {
final GrFieldStub stub = getStub();
if (stub != null) {
String[] namedParameters = stub.getNamedParameters();
if (namedParameters.length == 0)
return Collections.emptyMap();
Map<String, NamedArgumentDescriptor> result = ContainerUtil.newHashMap();
for (String parameter : namedParameters) {
result.put(parameter, GrNamedArgumentSearchVisitor.CODE_NAMED_ARGUMENTS_DESCR);
}
return result;
}
return GrNamedArgumentSearchVisitor.find(this);
}
Aggregations