Description
... such that this would be an error, showing up as a ValidationFailure in the MetaModelValidator:
// {{ Gender (attribute)
private PersonGenderType gender;
@MemberOrder(sequence = "4")
public PersonGenderType getGender()
public void setGender(final PersonGenderType gender) { this.gender = gender; }
// }}
but this would be ok, because the programmer has provided an explicit default method:
// {{ Gender (attribute)
private PersonGenderType gender;
@MemberOrder(sequence = "4")
public PersonGenderType getGender() { return gender; }
public void setGender(final PersonGenderType gender)
{ this.gender = gender; }public PersonGenderType defaultGender() { return PersonGenderType.UNKNOWN; }
// }}
and this would be ok, because the property is optional
// {{ Gender (attribute)
private PersonGenderType gender;
@MemberOrder(sequence = "4")
@Optional
public PersonGenderType getGender() { return gender; }
public void setGender(final PersonGenderType gender) { this.gender = gender; }
// }}