// add isSetXXX and unsetXXX.
MethodWriter writer = outline.createMethodWriter();
JCodeModel codeModel = outline.parent().getCodeModel();
FieldAccessor acc = core.create(JExpr._this());
if( generateIsSetMethod ) {
// [RESULT] boolean isSetXXX()
JExpression hasSetValue = acc.hasSetValue();
if( hasSetValue==null ) {
// this field renderer doesn't support the isSet/unset methods generation.
// issue an error
throw new UnsupportedOperationException();
}
writer.declareMethod(codeModel.BOOLEAN,"isSet"+this.prop.getName(true))
.body()._return( hasSetValue );
}
if( generateUnSetMethod ) {
// [RESULT] void unsetXXX()
acc.unsetValues(
writer.declareMethod(codeModel.VOID,"unset"+this.prop.getName(true)).body() );
}
}