public static void writePropertySetter( Property prop, String setterDefensiveCopyExpression, IndentedWriter iw ) throws IOException { String setVal = setterDefensiveCopyExpression; if (setVal == null) setVal = prop.getName(); String usualGetExpression = ("this." + prop.getName()); String usualSetStatement = ("this." + prop.getName() + " = " + setVal + ';'); writePropertySetterWithGetExpressionSetStatement(prop, usualGetExpression, usualSetStatement, iw); }
protected void writePropertySetter( Property prop, Class propType ) throws IOException BeangenUtils.writePropertySetter( prop, this.getSetterDefensiveCopyExpression( prop, propType ), iw );
public static void writePropertySetter( Property prop, String setterDefensiveCopyExpression, IndentedWriter iw ) throws IOException { String setVal = setterDefensiveCopyExpression; if (setVal == null) setVal = prop.getName(); String usualGetExpression = ("this." + prop.getName()); String usualSetStatement = ("this." + prop.getName() + " = " + setVal + ';'); writePropertySetterWithGetExpressionSetStatement(prop, usualGetExpression, usualSetStatement, iw); }
protected void writePropertySetter( Property prop, Class propType ) throws IOException BeangenUtils.writePropertySetter( prop, this.getSetterDefensiveCopyExpression( prop, propType ), iw );
public static void writePropertySetter( Property prop, String setterDefensiveCopyExpression, IndentedWriter iw ) throws IOException { String setVal = setterDefensiveCopyExpression; if (setVal == null) setVal = prop.getName(); String usualGetExpression = ("this." + prop.getName()); String usualSetStatement = ("this." + prop.getName() + " = " + setVal + ';'); writePropertySetterWithGetExpressionSetStatement(prop, usualGetExpression, usualSetStatement, iw); }
protected void writePropertySetter( Property prop, Class propType ) throws IOException BeangenUtils.writePropertySetter( prop, this.getSetterDefensiveCopyExpression( prop, propType ), iw );
public void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException { int num_props = props.length; Property[] masked = new Property[ num_props ]; for (int i = 0; i < num_props; ++i) masked[i] = new SimplePropertyMask( props[i] ); iw.println("protected static class SimpleStateBean implements ExportedState"); iw.println("{"); iw.upIndent(); for (int i = 0; i < num_props; ++i) { masked[i] = new SimplePropertyMask( props[i] ); BeangenUtils.writePropertyMember( masked[i], iw ); iw.println(); BeangenUtils.writePropertyGetter( masked[i], iw ); iw.println(); BeangenUtils.writePropertySetter( masked[i], iw ); } iw.downIndent(); iw.println("}"); } }
public void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException { int num_props = props.length; Property[] masked = new Property[ num_props ]; for (int i = 0; i < num_props; ++i) masked[i] = new SimplePropertyMask( props[i] ); iw.println("protected static class SimpleStateBean implements ExportedState"); iw.println("{"); iw.upIndent(); for (int i = 0; i < num_props; ++i) { masked[i] = new SimplePropertyMask( props[i] ); BeangenUtils.writePropertyMember( masked[i], iw ); iw.println(); BeangenUtils.writePropertyGetter( masked[i], iw ); iw.println(); BeangenUtils.writePropertySetter( masked[i], iw ); } iw.downIndent(); iw.println("}"); } }
public void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException { int num_props = props.length; Property[] masked = new Property[ num_props ]; for (int i = 0; i < num_props; ++i) masked[i] = new SimplePropertyMask( props[i] ); iw.println("protected static class SimpleStateBean implements ExportedState"); iw.println("{"); iw.upIndent(); for (int i = 0; i < num_props; ++i) { masked[i] = new SimplePropertyMask( props[i] ); BeangenUtils.writePropertyMember( masked[i], iw ); iw.println(); BeangenUtils.writePropertyGetter( masked[i], iw ); iw.println(); BeangenUtils.writePropertySetter( masked[i], iw ); } iw.downIndent(); iw.println("}"); } }
BeangenUtils.writePropertyGetter( masked[i], iw ); iw.println(); BeangenUtils.writePropertySetter( masked[i], iw );