code: public static boolean isCompositeComponent(UIComponent component) {
  
          if (component == null) {
              throw new NullPointerException();
          }
          boolean result = false;
          if (null != component.isCompositeComponent) {
              result = component.isCompositeComponent.booleanValue();
          } else {
              result = component.isCompositeComponent =
                      (component.getAttributes().containsKey(
                                 Resource.COMPONENT_RESOURCE_KEY));
          }
          return result;
  
      }
docs: <p class="changed_added_2_0">Return <code>true</code> if
  <code>component</code> is a composite component, otherwise
  <code>false</code>.</p>
  
  @param component the {@link UIComponent} to test
  
  @throws NullPointerException if <code>component</code> is <code>null</code>
  @since 2.0