If not already created, a new <code>flow-definition</code> element will be created and returned.
Otherwise, the first existing <code>flow-definition</code> element will be returned.
@return the instance defined for the element <code>flow-definition</code>
965216
public FacesConfigFlowDefinitionType<WebFacesConfigDescriptor> getOrCreateFlowDefinition()
   {
      List<Node> nodeList = model.get("flow-definition");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigFlowDefinitionTypeImpl<WebFacesConfigDescriptor>(this, "flow-definition", model, nodeList.get(0));
      }
      return createFlowDefinition();
   }
677032
public static Flow create() {
        return new Flow(ID_GENERATOR.updateAndGet(i -> i == Integer.MAX_VALUE ? 0 : i + 1), 0);
    }
636331
public List<Flow<JobXMLDescriptor>> getAllFlow()
   {
      List<Flow<JobXMLDescriptor>> list = new ArrayList<Flow<JobXMLDescriptor>>();
      List<Node> nodeList = model.get("flow");
      for(Node node: nodeList)
      {
         Flow<JobXMLDescriptor>  type = new FlowImpl<JobXMLDescriptor>(this, "flow", model, node);
         list.add(type);
      }
      return list;
   }
324534
protected T createInstance() {
		try {
			return targetClass.newInstance();
		} catch (InstantiationException e) {
			throw new RuntimeException(e);
		} catch (IllegalAccessException e) {
			throw new RuntimeException(e);
		}
	}
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);
        }
    }
1026659
public static TrieNodeFactory<Boolean> getInstance() {
        return new TrieNodeFactory<Boolean>() {
            @Override
            public TrieNode<Boolean> create() {
                return new BooleanTrieNode();
            }
        };
    }
1232018
public T addElement(T element) {
		// make sure that elements are initialized
		getElements();
		if (!containsElement(this.elements, element)) {
			this.elements.add(element);
			element.addChangeListener(this.elementChangeListener);
			element.notifyState();
			return element;
		}
		throw new RuntimeException(element.toString() + " already exists");
	}
251161
public static WebElementFinder create() {
		return new WebElementFinder(null, null, 0L, 0L, null, null, null, null, false);
	}
246570
public Object createInstanceQuietly() {
      try {
         return clazz.newInstance();
      } catch (InstantiationException e) {
         log.finest(e);
         return null;
      } catch (IllegalAccessException e) {
         log.finest(e);
         return null;
      }
   }
948285
public static JusFragment newInstance() {
		JusFragment fragment = new JusFragment();
		Bundle args = new Bundle();
		fragment.setArguments(args);
		return fragment;
	}
508006
public T requestInstance() {
		T a;
		if( unused.size() > 0 ) {
			a = unused.pop();
		} else {
			a = createInstance();
		}
		return a;
	}
547719
public static BlankFragment newInstance() {
        BlankFragment fragment = new BlankFragment();
        Bundle args = new Bundle();

        fragment.setArguments(args);
        return fragment;
    }
835168
public FilterChain create() throws FilterConfigurationException {
        Preconditions.checkState(filters != null, "list of filters must be set");
        Preconditions.checkState(inputType != null, "inputType must be set");
        Preconditions.checkState(outputType != null, "outputType must be set");

        Preconditions.checkState(filters.size() > 0, "need at least one filter");
        validateFiltersList();

        Iterator<Object> iterator = filters.iterator();

        FilterChainElement firstInstance = getInstanceFromListElement(iterator.next());
        if (!firstInstance.getSupportedInputType().isAssignableFrom(inputType)
                || !firstInstance.getSupportedOutputType().isAssignableFrom(outputType)) {
            throw new FilterConfigurationException(String.format(
                "incompatible Filtertype (%s) should be (%s->%s) - is (%s->%s)",
                firstInstance.getClass(), inputType, outputType, firstInstance.getSupportedInputType(),
                firstInstance.getSupportedOutputType()));
        }
        FilterChainElement current = firstInstance;
        while (iterator.hasNext()) {
            Object next = iterator.next();
            FilterChainElement nextFilterElement = getInstanceFromListElement(next);
            if (nextFilterElement == null) {
                current.setNext((FilterAction) next);
                break;
            }
            current.setNext(nextFilterElement);
            current = nextFilterElement;
        }
        return new FilterChain(firstInstance);
    }
1184751
public OrderingOrderingType<OrderingType<T>> getOrCreateAfter()
   {
      Node node = childNode.getOrCreate("after");
      OrderingOrderingType<OrderingType<T>> after = new OrderingOrderingTypeImpl<OrderingType<T>>(this, "after", childNode, node);
      return after;
   }
1084696
public SubscriptionDefinition createSubscriptionDefinition()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "createSubscriptionDefinition");

    SubscriptionDefinition subDef = new SubscriptionDefinitionImpl();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "createSubscriptionDefinition", subDef);

    return subDef;
  }
184717
public OrderingOrderingType<OrderingType<T>> getOrCreateBefore()
   {
      Node node = childNode.getOrCreate("before");
      OrderingOrderingType<OrderingType<T>> before = new OrderingOrderingTypeImpl<OrderingType<T>>(this, "before", childNode, node);
      return before;
   }
1362521
public Decision<Flow<T>> getOrCreateDecision()
   {
      List<Node> nodeList = childNode.get("decision");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new DecisionImpl<Flow<T>>(this, "decision", childNode, nodeList.get(0));
      }
      return createDecision();
   }