Declaration decl = klass.getMember(name, null, false);
boolean foundGetter = false;
// skip Java fields, which we only get if there is no getter method, in that case just add the setter method
if (decl instanceof Value && decl instanceof FieldValue == false) {
Value value = (Value)decl;
VariableMirror setterParam = setter.getParameters().get(0);
ProducedType paramType = obtainType(setterParam.getType(), setterParam, klass, Decl.getModuleContainer(klass), VarianceLocation.INVARIANT,
"setter '"+setter.getName()+"'", klass);
// only add the setter if it has exactly the same type as the getter
if(paramType.isExactly(value.getType())){
foundGetter = true;
value.setVariable(true);