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