If not already created, a new <code>icon</code> element will be created and returned.
Otherwise, the first existing <code>icon</code> element will be returned.
@return the instance defined for the element <code>icon</code>
4868
public IconType<WebFragmentDescriptor> getOrCreateIcon()
   {
      List<Node> nodeList = model.get("icon");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new IconTypeImpl<WebFragmentDescriptor>(this, "icon", model, nodeList.get(0));
      }
      return createIcon();
   }
1328891
public Version<Attributes<T>> getOrCreateVersion()
   {
      List<Node> nodeList = childNode.get("version");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new VersionImpl<Attributes<T>>(this, "version", childNode, nodeList.get(0));
      }
      return createVersion();
   }
422901
public FacesConfigLifecycleType<FacesConfigType<T>> getOrCreateLifecycle()
   {
      List<Node> nodeList = childNode.get("lifecycle");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigLifecycleTypeImpl<FacesConfigType<T>>(this, "lifecycle", childNode, nodeList.get(0));
      }
      return createLifecycle();
   }
156461
public ColumnResult<ConstructorResult<T>> getOrCreateColumn()
   {
      List<Node> nodeList = childNode.get("column");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ColumnResultImpl<ConstructorResult<T>>(this, "column", childNode, nodeList.get(0));
      }
      return createColumn();
   }
633472
private Drawable getDefaultIcon1(Cursor cursor) {
        // Check the component that gave us the suggestion
        Drawable drawable = getActivityIconWithCache(mSearchable.getSearchActivity());
        if (drawable != null) {
            return drawable;
        }

        // Fall back to a default icon
        return mContext.getPackageManager().getDefaultActivityIcon();
    }
695395
protected T createInstance() {
        try {
            Constructor<T> ctor = clazz.getDeclaredConstructor();
            ctor.setAccessible(true);
            return ctor.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (SecurityException e) {
            throw new RuntimeException(e);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        }
    }
405627
public Selector createSelector()
    {
        selectorSync.lock();
        try {
            Selector selector = Selector.open();
            assert (selector != null);
            selectors.add(selector);
            return selector;
        }
        catch (IOException e) {
            throw new ZError.IOException(e);
        }
        finally {
            selectorSync.unlock();
        }
    }
1327528
public static RecurrenceUtil getInstance() {

    if (instance == null) {
      synchronized (RecurrenceUtilImpl.class) {
        if (instance == null) {
          RecurrenceUtilImpl impl = new RecurrenceUtilImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
626963
public Node<T> add(T element) {
		Node<T> node = new Node<>(this, element);
		nodes.add(node);
		return node;
	}
891261
public FacesConfigFlowDefinitionViewType<FacesConfigFlowDefinitionType<T>> getOrCreateView()
   {
      List<Node> nodeList = childNode.get("view");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigFlowDefinitionViewTypeImpl<FacesConfigFlowDefinitionType<T>>(this, "view", childNode, nodeList.get(0));
      }
      return createView();
   }
1335177
private T getOrCreate() throws E {
    try {
      T client = elements.poll();
      // a client was available, all good. otherwise, create one
      if (client != null) {
        return client;
      }
      return create();
    } catch (Exception e) {
      // if an exception is thrown after acquiring the semaphore, release the
      // semaphore before propagating the exception
      semaphore.release();
      throw e;
    }
  }
1297168
public static SOAPElementFactory newInstance() throws SOAPException {
        try {
            return new SOAPElementFactory(SOAPFactory.newInstance());
        } catch (Exception ex) {
            throw new SOAPException(
                "Unable to create SOAP Element Factory: " + ex.getMessage());
        }
    }
1188225
private Object getPreviousElement() {
        Object element = null;
        while (currentIndex >= startIndex && element == null) {
            currentIndex--;
            element = getElement();
        }
        return element;
    }
533906
public FacesConfigRenderKitType<FacesConfigType<T>> getOrCreateRenderKit()
   {
      List<Node> nodeList = childNode.get("render-kit");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigRenderKitTypeImpl<FacesConfigType<T>>(this, "render-kit", childNode, nodeList.get(0));
      }
      return createRenderKit();
   }
660734
public EjbLocalRefType<WebFragmentType<T>> getOrCreateEjbLocalRef()
   {
      List<Node> nodeList = childNode.get("ejb-local-ref");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new EjbLocalRefTypeImpl<WebFragmentType<T>>(this, "ejb-local-ref", childNode, nodeList.get(0));
      }
      return createEjbLocalRef();
   }
453726
protected Icon getDefaultIcon(AbstractButton b) {
        SeaGlassContext context = getContext(b);
        Icon            icon    = context.getStyle().getIcon(context, getPropertyPrefix() + "icon");

        context.dispose();
        return icon;
    }
380729
public SupportProvider newDefaultInstance() {
        try {
            return clazz.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException("Failed to instantiate " + clazz, e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException("Failed to instantiate " + clazz, e);
        }
    }