class ConsistentReferenceNameValidator implements ConstraintValidator<ConsistentReferenceName, ReferenceElement>,
        ValidationErrorDescriptorBuilder {

    protected String getReferencedResourceName(String referencePath){
        return referencePath.substring(referencePath.lastIndexOf(".") + 1);
    }

}