public FieldOutline generate(ClassOutlineImpl outline, CPropertyInfo prop) { if(prop.defaultValue.compute(outline.parent())==null) return fallback.generate(outline, prop); else return new ConstField(outline,prop); } }
ConstField( ClassOutlineImpl outline, CPropertyInfo prop ) { super(outline,prop); // we only support value constraints for a single-value property. assert !prop.isCollection(); JPrimitiveType ptype = implType.boxify().getPrimitiveType(); // generate the constant JExpression defaultValue = null; if(prop.defaultValue!=null) defaultValue = prop.defaultValue.compute(outline.parent()); $ref = outline.ref.field(JMod.PUBLIC|JMod.STATIC|JMod.FINAL, ptype!=null?ptype:implType, prop.getName(true), defaultValue ); $ref.javadoc().append(prop.javadoc); annotate($ref); }
ConstField( ClassOutlineImpl outline, CPropertyInfo prop ) { super(outline,prop); // we only support value constraints for a single-value property. assert !prop.isCollection(); JPrimitiveType ptype = implType.boxify().getPrimitiveType(); // generate the constant JExpression defaultValue = null; if(prop.defaultValue!=null) defaultValue = prop.defaultValue.compute(outline.parent()); $ref = outline.ref.field(JMod.PUBLIC|JMod.STATIC|JMod.FINAL, ptype!=null?ptype:implType, prop.getName(true), defaultValue ); $ref.javadoc().append(prop.javadoc); annotate($ref); }
public FieldOutline generate(ClassOutlineImpl outline, CPropertyInfo prop) { if(prop.defaultValue.compute(outline.parent())==null) return fallback.generate(outline, prop); else return new ConstField(outline,prop); } }
ConstField( ClassOutlineImpl outline, CPropertyInfo prop ) { super(outline,prop); // we only support value constraints for a single-value property. assert !prop.isCollection(); JPrimitiveType ptype = implType.boxify().getPrimitiveType(); // generate the constant JExpression defaultValue = null; if(prop.defaultValue!=null) defaultValue = prop.defaultValue.compute(outline.parent()); $ref = outline.ref.field(JMod.PUBLIC|JMod.STATIC|JMod.FINAL, ptype!=null?ptype:implType, prop.getName(true), defaultValue ); $ref.javadoc().append(prop.javadoc); annotate($ref); }
public FieldOutline generate(ClassOutlineImpl outline, CPropertyInfo prop) { if(prop.defaultValue.compute(outline.parent())==null) return fallback.generate(outline, prop); else return new ConstField(outline,prop); } }
ConstField( ClassOutlineImpl outline, CPropertyInfo prop ) { super(outline,prop); // we only support value constraints for a single-value property. assert !prop.isCollection(); JPrimitiveType ptype = implType.boxify().getPrimitiveType(); // generate the constant JExpression defaultValue = null; if(prop.defaultValue!=null) defaultValue = prop.defaultValue.compute(outline.parent()); $ref = outline.ref.field(JMod.PUBLIC|JMod.STATIC|JMod.FINAL, ptype!=null?ptype:implType, prop.getName(true), defaultValue ); $ref.javadoc().append(prop.javadoc); annotate($ref); }
public FieldOutline generate(ClassOutlineImpl outline, CPropertyInfo prop) { if(prop.defaultValue.compute(outline.parent())==null) return fallback.generate(outline, prop); else return new ConstField(outline,prop); } }
ConstField( ClassOutlineImpl outline, CPropertyInfo prop ) { super(outline,prop); // we only support value constraints for a single-value property. assert !prop.isCollection(); JPrimitiveType ptype = implType.boxify().getPrimitiveType(); // generate the constant JExpression defaultValue = null; if(prop.defaultValue!=null) defaultValue = prop.defaultValue.compute(outline.parent()); $ref = outline.ref.field(JMod.PUBLIC|JMod.STATIC|JMod.FINAL, ptype!=null?ptype:implType, prop.getName(true), defaultValue ); $ref.javadoc().append(prop.javadoc); annotate($ref); }
public FieldOutline generate(ClassOutlineImpl outline, CPropertyInfo prop) { if(prop.defaultValue.compute(outline.parent())==null) return fallback.generate(outline, prop); else return new ConstField(outline,prop); } }