In those examples, we assume calling the builder from a form type class definition or a controller, using help of this closure :
$class = function ($object) {
$FQCN = get_class($object);
$class = explode('\\', $FQCN);
return end($class);