/** * If not already created, a new <code>resource-env-ref</code> element will be created and returned. * Otherwise, the first existing <code>resource-env-ref</code> element will be returned. * @return the instance defined for the element <code>resource-env-ref</code> */ public ResourceEnvRefType<WebAppDescriptor> getOrCreateResourceEnvRef() { List<Node> nodeList = model.get("resource-env-ref"); if (nodeList != null && nodeList.size() > 0) { return new ResourceEnvRefTypeImpl<WebAppDescriptor>(this, "resource-env-ref", model, nodeList.get(0)); } return createResourceEnvRef(); }
/** * If not already created, a new <code>resource-env-ref</code> element will be created and returned. * Otherwise, the first existing <code>resource-env-ref</code> element will be returned. * @return the instance defined for the element <code>resource-env-ref</code> */ public ResourceEnvRefType<WebAppDescriptor> getOrCreateResourceEnvRef() { List<Node> nodeList = model.get("resource-env-ref"); if (nodeList != null && nodeList.size() > 0) { return new ResourceEnvRefTypeImpl<WebAppDescriptor>(this, "resource-env-ref", model, nodeList.get(0)); } return createResourceEnvRef(); }