/** * Called when the content of this composite is requested for the first * time. * <p> * This method should initialize the component structure for the composite * and return the root component. * <p> * By default, this method uses reflection to instantiate the component * based on the generic type of the sub class. * * @return the root component which this composite wraps, never {@code null} */ @SuppressWarnings("unchecked") protected T initContent() { return (T) ReflectTools.createInstance( findContentType((Class<? extends Composite<?>>) getClass())); }