/** * If not already created, a new <code>class</code> element with the given value will be created. * Otherwise, the existing <code>class</code> element will be returned. * @return a new or existing instance of <code>ClassType<BeanType<T>></code> */ public ClassType<BeanType<T>> getOrCreateClazz() { Node node = childNode.getOrCreate("class"); ClassType<BeanType<T>> clazz = new ClassTypeImpl<BeanType<T>>(this, "class", childNode, node); return clazz; }
/** * If not already created, a new <code>constraint</code> element will be created and returned. * Otherwise, the first existing <code>constraint</code> element will be returned. * @return the instance defined for the element <code>constraint</code> */ public ConstraintType<ClassType<T>> getOrCreateConstraint() { List<Node> nodeList = childNode.get("constraint"); if (nodeList != null && nodeList.size() > 0) { return new ConstraintTypeImpl<ClassType<T>>(this, "constraint", childNode, nodeList.get(0)); } return createConstraint(); }
/** * If not already created, a new <code>constraint</code> element will be created and returned. * Otherwise, the first existing <code>constraint</code> element will be returned. * @return the instance defined for the element <code>constraint</code> */ public ConstraintType<ClassType<T>> getOrCreateConstraint() { List<Node> nodeList = childNode.get("constraint"); if (nodeList != null && nodeList.size() > 0) { return new ConstraintTypeImpl<ClassType<T>>(this, "constraint", childNode, nodeList.get(0)); } return createConstraint(); }
/** * If not already created, a new <code>class</code> element with the given value will be created. * Otherwise, the existing <code>class</code> element will be returned. * @return a new or existing instance of <code>ClassType<BeanType<T>></code> */ public ClassType<BeanType<T>> getOrCreateClazz() { Node node = childNode.getOrCreate("class"); ClassType<BeanType<T>> clazz = new ClassTypeImpl<BeanType<T>>(this, "class", childNode, node); return clazz; }