final protected function getCompositeWidgets($class_name = null)
    {
        $this->confirmCompositeWidgets();

        if (
            !(
                $class_name === null ||
                class_exists($class_name) ||
                interface_exists($class_name)
            )
        ) {
            return array();
        }

        $out = array();

        foreach ($this->composite_widgets as $key => $widget) {
            if ($class_name === null || $widget instanceof $class_name) {
                $out[$key] = $widget;
            }
        }

        return $out;
    }