if (element instanceof PropertyInducingElement) {
PropertyInducingElement variableElement = (PropertyInducingElement) element;
PropertyAccessorElementImpl getter = (PropertyAccessorElementImpl) variableElement.getGetter();
getter.setReturnType(declaredType);
FunctionTypeImpl getterType = new FunctionTypeImpl(getter);
ClassElement definingClass = element.getAncestor(ClassElement.class);
if (definingClass != null) {
getterType.setTypeArguments(definingClass.getType().getTypeArguments());
}
getter.setType(getterType);
PropertyAccessorElementImpl setter = (PropertyAccessorElementImpl) variableElement.getSetter();
if (setter != null) {
ParameterElement[] parameters = setter.getParameters();
if (parameters.length > 0) {
((ParameterElementImpl) parameters[0]).setType(declaredType);
}
setter.setReturnType(VoidTypeImpl.getInstance());
FunctionTypeImpl setterType = new FunctionTypeImpl(setter);
if (definingClass != null) {
setterType.setTypeArguments(definingClass.getType().getTypeArguments());
}
setter.setType(setterType);
}
}
} else {