Accessor( JExpression $target ) { super($target); this.core = IsSetField.this.core.create($target); }
Accessor( JExpression $target ) { super($target); this.core = IsSetField.this.core.create($target); }
Accessor( JExpression $target ) { super($target); this.core = IsSetField.this.core.create($target); }
Accessor( JExpression $target ) { super($target); this.core = IsSetField.this.core.create($target); }
Accessor( JExpression $target ) { super($target); this.core = IsSetField.this.core.create($target); }
public FieldAccessorImpl(JExpression target) { acc = core.create(target); }
public FieldAccessorImpl(JExpression target) { acc = core.create(target); }
public FieldAccessorImpl(JExpression target) { acc = core.create(target); }
public FieldAccessorImpl(JExpression target) { acc = core.create(target); }
public FieldAccessorImpl(JExpression target) { acc = core.create(target); }
private void generate( ClassOutlineImpl outline, CPropertyInfo prop ) { // 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() ); } }
private void generate( ClassOutlineImpl outline, CPropertyInfo prop ) { // 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() ); } }
private void generate( ClassOutlineImpl outline, CPropertyInfo prop ) { // 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() ); } }
private void generate( ClassOutlineImpl outline, CPropertyInfo prop ) { // 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() ); } }
private void generate( ClassOutlineImpl outline, CPropertyInfo prop ) { // 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() ); } }
public PropertyFieldAccessor(final FieldOutline fieldOutline, JExpression targetObject) { super(); this.fieldOutline = fieldOutline; this.targetObject = targetObject; this.fieldAccessor = fieldOutline.create(targetObject); final String publicName = fieldOutline.getPropertyInfo().getName(true); final JDefinedClass theClass = fieldOutline.parent().implClass; final String getterName = "get" + publicName; final String setterName = "set" + publicName; this.getter = theClass.getMethod(getterName, ABSENT); // fieldOutline.getRawType(); final JType rawType = fieldOutline.getRawType(); final JMethod boxifiedSetter = theClass .getMethod(setterName, new JType[]{ rawType.boxify() }); final JMethod unboxifiedSetter = theClass.getMethod(setterName, new JType[]{ rawType .unboxify() }); this.setter = boxifiedSetter != null ? boxifiedSetter : unboxifiedSetter; this.isSetter = theClass.getMethod("isSet" + publicName, ABSENT); this.unSetter = theClass.getMethod("unset" + publicName, ABSENT); }
public PropertyFieldAccessor(final FieldOutline fieldOutline, JExpression targetObject) { super(); this.fieldOutline = fieldOutline; this.targetObject = targetObject; this.fieldAccessor = fieldOutline.create(targetObject); final String publicName = fieldOutline.getPropertyInfo().getName( true); final JDefinedClass theClass = fieldOutline.parent().implClass; final String getterName = "get" + publicName; final String setterName = "set" + publicName; this.getter = theClass.getMethod(getterName, ABSENT); // fieldOutline.getRawType(); final JType rawType = fieldOutline.getRawType(); final JMethod boxifiedSetter = theClass.getMethod(setterName, new JType[] { rawType.boxify() }); final JMethod unboxifiedSetter = theClass.getMethod(setterName, new JType[] { rawType.unboxify() }); this.setter = boxifiedSetter != null ? boxifiedSetter : unboxifiedSetter; this.isSetter = theClass.getMethod("isSet" + publicName, ABSENT); this.unSetter = theClass.getMethod("unset" + publicName, ABSENT); }
public PropertyFieldAccessor(final FieldOutline fieldOutline, JExpression targetObject) { super(); this.fieldOutline = fieldOutline; this.targetObject = targetObject; this.fieldAccessor = fieldOutline.create(targetObject); final String publicName = fieldOutline.getPropertyInfo().getName( true); final JDefinedClass theClass = fieldOutline.parent().implClass; final String getterName = "get" + publicName; final String setterName = "set" + publicName; this.getter = theClass.getMethod(getterName, ABSENT); // fieldOutline.getRawType(); final JType rawType = fieldOutline.getRawType(); final JMethod boxifiedSetter = theClass.getMethod(setterName, new JType[] { rawType.boxify() }); final JMethod unboxifiedSetter = theClass.getMethod(setterName, new JType[] { rawType.unboxify() }); this.setter = boxifiedSetter != null ? boxifiedSetter : unboxifiedSetter; this.isSetter = theClass.getMethod("isSet" + publicName, ABSENT); this.unSetter = theClass.getMethod("unset" + publicName, ABSENT); }
this.fieldOutline = fieldOutline; this.targetObject = targetObject; this.fieldAccessor = fieldOutline.create(targetObject); final String publicName = fieldOutline.getPropertyInfo().getName( true);
FieldAccessor accessor = fo.create(JExpr._this());