/** * Gets a check instance by first checking the entity dictionary for a mapping on the provided identifier. * In the event that no such mapping is found the identifier is used as a canonical name. * @param dictionary the entity dictionary to search for a mapping * @param checkName the identifier of the check to instantiate * @return the check instance * @throws IllegalArgumentException if there is no mapping for {@code checkName} and {@code checkName} is not * a canonical identifier */ default Check getCheck(EntityDictionary dictionary, String checkName) { Class<? extends Check> checkCls = dictionary.getCheck(checkName); return instantiateCheck(checkCls); }
/** * Gets a check instance by first checking the entity dictionary for a mapping on the provided identifier. * In the event that no such mapping is found the identifier is used as a canonical name. * @param dictionary the entity dictionary to search for a mapping * @param checkName the identifier of the check to instantiate * @return the check instance * @throws IllegalArgumentException if there is no mapping for {@code checkName} and {@code checkName} is not * a canonical identifier */ default Check getCheck(EntityDictionary dictionary, String checkName) { Class<? extends Check> checkCls = dictionary.getCheck(checkName); return instantiateCheck(checkCls); }