/** * Get message reference of an entity property. * Messages pack part of the reference corresponds to the entity's package. * @param metaClass MetaClass containing the property * @param propertyName property's name * @return message key in the form {@code msg://message_pack/message_id} */ public String getMessageRef(MetaClass metaClass, String propertyName) { MetaProperty property = metaClass.getProperty(propertyName); if (property == null) { throw new RuntimeException("Property " + propertyName + " is wrong for metaclass " + metaClass); } return getMessageRef(property); }