If not already created, a new <code>flow-return</code> element will be created and returned.
Otherwise, the first existing <code>flow-return</code> element will be returned.
@return the instance defined for the element <code>flow-return</code>
352801
public FacesConfigFlowDefinitionFlowReturnType<FacesConfigFlowDefinitionType<T>> getOrCreateFlowReturn()
   {
      List<Node> nodeList = childNode.get("flow-return");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigFlowDefinitionFlowReturnTypeImpl<FacesConfigFlowDefinitionType<T>>(this, "flow-return", childNode, nodeList.get(0));
      }
      return createFlowReturn();
   }
540322
public ClientConnection createFlow(final Flow flow, final ReplyProcessor rp) {
        Exceptions.checkNotClosed(closed.get(), this);
        Preconditions.checkState(!disableFlow.get(), "Ensure flows are enabled.");
        log.info("Creating Flow {} for endpoint {}. The current Channel is {}.", flow.getFlowId(), connectionName, channel.get());
        if (flowIdReplyProcessorMap.put(flow.getFlowId(), rp) != null) {
            throw new IllegalArgumentException("Multiple flows cannot be created with the same Flow id " + flow.getFlowId());
        }
        return new ClientConnectionImpl(connectionName, flow.getFlowId(), batchSizeTracker, this);
    }
171328
public FlowController getFlowControllerInstance( Class flowControllerClass )
        throws InstantiationException, IllegalAccessException
    {
        assert FlowController.class.isAssignableFrom( flowControllerClass )
                : "Class " + flowControllerClass.getName() + " does not extend " + FlowController.class.getName();
        return ( FlowController ) flowControllerClass.newInstance();
    }
669713
public T nextElement() {
        T rc = null;
        if (null == this.myIterator) {
            rc = this.singleton;
            this.singleton = null;
        } else {
            rc = this.myIterator.next();
        }
        return rc;
    }
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;
   }
1187612
public FacesConfigRendererType<FacesConfigRenderKitType<T>> getOrCreateRenderer()
   {
      List<Node> nodeList = childNode.get("renderer");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigRendererTypeImpl<FacesConfigRenderKitType<T>>(this, "renderer", childNode, nodeList.get(0));
      }
      return createRenderer();
   }
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();
   }
378738
public Transient<EmbeddableAttributes<T>> getOrCreateTransient()
   {
      List<Node> nodeList = childNode.get("transient");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new TransientImpl<EmbeddableAttributes<T>>(this, "transient", childNode, nodeList.get(0));
      }
      return createTransient();
   }
1018415
public FlowElement getCurrentFlowElement() {
    if (currentFlowElement == null) {
      String processDefinitionId = getProcessDefinitionId();
      if (processDefinitionId != null) {
        org.activiti.bpmn.model.Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
        currentFlowElement = process.getFlowElement(getCurrentActivityId(), true);
      }
    }
    return currentFlowElement;
  }
1186971
public Flowable<Tree<T>> parents() {
    return Flowable.generate(() -> Wrapper.of(this), (n, e) -> {
      Tree<T> parent = n.get().getParent();
      if (parent != null) {
        e.onNext(parent);
        n.set(parent);
      } else {
        e.onComplete();
      }
    });
  }
522767
public FacesConfigFlowDefinitionType<FacesConfigType<T>> getOrCreateFlowDefinition()
   {
      List<Node> nodeList = childNode.get("flow-definition");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigFlowDefinitionTypeImpl<FacesConfigType<T>>(this, "flow-definition", childNode, nodeList.get(0));
      }
      return createFlowDefinition();
   }
1345826
public Stop<Flow<T>> getOrCreateStop()
   {
      List<Node> nodeList = childNode.get("stop");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new StopImpl<Flow<T>>(this, "stop", childNode, nodeList.get(0));
      }
      return createStop();
   }
56792
@Override
  public Table<Node, String, Set<QueueSpecification>> create(FlowSpecification input) {
    Table<Node, String, Set<QueueSpecification>> table = HashBasedTable.create();

    String flow = input.getName();
    Map<String, FlowletDefinition> flowlets = input.getFlowlets();

    // Iterate through connections of a flow.
    for (FlowletConnection connection : input.getConnections()) {
      final String source = connection.getSourceName();
      final String target = connection.getTargetName();
      final Node sourceNode = new Node(connection.getSourceType(), source);

      Set<QueueSpecification> queueSpec = generateQueueSpecification(flow, connection, flowlets.get(target).getInputs(),
                                                                     flowlets.get(source).getOutputs());

      Set<QueueSpecification> queueSpecifications = table.get(sourceNode, target);
      if (queueSpecifications == null) {
        queueSpecifications = Sets.newHashSet();
        table.put(sourceNode, target, queueSpecifications);
      }
      queueSpecifications.addAll(queueSpec);
    }
    return table;
  }
163231
public Id<Attributes<T>> getOrCreateId()
   {
      List<Node> nodeList = childNode.get("id");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new IdImpl<Attributes<T>>(this, "id", childNode, nodeList.get(0));
      }
      return createId();
   }
1252079
public FacesConfigComponentType<FacesConfigType<T>> getOrCreateComponent()
   {
      List<Node> nodeList = childNode.get("component");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigComponentTypeImpl<FacesConfigType<T>>(this, "component", childNode, nodeList.get(0));
      }
      return createComponent();
   }
251161
public static WebElementFinder create() {
		return new WebElementFinder(null, null, 0L, 0L, null, null, null, null, false);
	}
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);
        }
    }