protected void createSetterMethod ( ClassNode declaringClass , PropertyNode propertyNode , String setterName , Statement setterBlock ) { MethodNode setter = new MethodNode ( setterName , propertyNode . getModifiers ( ) , ClassHelper . VOID_TYPE , params ( param ( propertyNode . getType ( ) , "value" ) ) , ClassNode . EMPTY_ARRAY , setterBlock ) ; setter . setSynthetic ( true ) ; // add it to the class declaringClass . addMethod ( setter ) ; }
Creates a setter method with the given body .