code: public static boolean isNew(UIComponent component) {
          
          UIComponent c = component;
          if (c != null) {
              UIComponent parent = c.getParent();
              if (parent != null) {
                  if (UIComponent.isCompositeComponent(parent)) {
                      c = parent;
                  }
              }
              return c.getParent() == null;
          } else {
              return false;
          }
  
      }
docs: <p class="changed_added_2_0">Determine if the passed component is
  not null and if it's new to the tree.  This operation can be used for determining if attributes
  should be wired to the component.</p>
  
  @param component the component you wish to modify
  @since 2.0