public boolean isProperty() { final GrFieldStub stub = getStub(); if (stub != null) { return stub.isProperty(); } return PsiUtil.isProperty(this); }
public boolean isDeprecated() { final GrFieldStub stub = getStub(); if (stub != null) { return stub.isDeprecatedByDocTag() || PsiImplUtil.isDeprecatedByAnnotation(this); } return PsiImplUtil.isDeprecatedByDocTag(this) || PsiImplUtil.isDeprecatedByAnnotation(this); }
@NotNull @Override public String getName() { final GrFieldStub stub = getStub(); if (stub != null) { return stub.getName(); } return super.getName(); }
@Override public GrTypeElement getTypeElementGroovy() { final GrFieldStub stub = getStub(); if (stub != null) { final String typeText = stub.getTypeText(); if (typeText == null) { return null; } return GroovyPsiElementFactory.getInstance(getProject()).createTypeElement(typeText, this); } return super.getTypeElementGroovy(); }
@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); }