/** * If not already created, a new <code>pre-destroy</code> element will be created and returned. * Otherwise, the first existing <code>pre-destroy</code> element will be returned. * @return the instance defined for the element <code>pre-destroy</code> */ public LifecycleCallbackType<WebAppDescriptor> getOrCreatePreDestroy() { List<Node> nodeList = model.get("pre-destroy"); if (nodeList != null && nodeList.size() > 0) { return new LifecycleCallbackTypeImpl<WebAppDescriptor>(this, "pre-destroy", model, nodeList.get(0)); } return createPreDestroy(); }
/** * If not already created, a new <code>pre-destroy</code> element will be created and returned. * Otherwise, the first existing <code>pre-destroy</code> element will be returned. * @return the instance defined for the element <code>pre-destroy</code> */ public LifecycleCallbackType<WebAppDescriptor> getOrCreatePreDestroy() { List<Node> nodeList = model.get("pre-destroy"); if (nodeList != null && nodeList.size() > 0) { return new LifecycleCallbackTypeImpl<WebAppDescriptor>(this, "pre-destroy", model, nodeList.get(0)); } return createPreDestroy(); }