Similar to @Owner, provide an annotation that provides the name of the field in the owner containing this field.
Example:
@DSL class Service {
User readOnly
User admin
}
@DSL class User {
@Owner service
@OwnerName role
@Key name
}
def service = Service.create {
readOnly("User")
admin("superuser")
}
assert service.admin.role == "admin"
assert service.readOnly.role == "readOnly"
This could also be name @Role which would be more in accordance to UML
Similar to
@Owner
, provide an annotation that provides the name of the field in the owner containing this field. Example:This could also be name
@Role
which would be more in accordance to UML