/** * Creates a new <code>annotation</code> element * @return the new created instance of <code>AnnotationType<ElementType<T>></code> */ public AnnotationType<ElementType<T>> createAnnotation() { return new AnnotationTypeImpl<ElementType<T>>(this, "annotation", childNode); }
/** * Creates a new <code>annotation</code> element * @return the new created instance of <code>AnnotationType<ElementType<T>></code> */ public AnnotationType<ElementType<T>> createAnnotation() { return new AnnotationTypeImpl<ElementType<T>>(this, "annotation", childNode); }
/** * Returns all <code>annotation</code> elements * @return list of <code>annotation</code> */ public List<AnnotationType<ElementType<T>>> getAllAnnotation() { List<AnnotationType<ElementType<T>>> list = new ArrayList<AnnotationType<ElementType<T>>>(); List<Node> nodeList = childNode.get("annotation"); for(Node node: nodeList) { AnnotationType<ElementType<T>> type = new AnnotationTypeImpl<ElementType<T>>(this, "annotation", childNode, node); list.add(type); } return list; }
/** * Returns all <code>annotation</code> elements * @return list of <code>annotation</code> */ public List<AnnotationType<ElementType<T>>> getAllAnnotation() { List<AnnotationType<ElementType<T>>> list = new ArrayList<AnnotationType<ElementType<T>>>(); List<Node> nodeList = childNode.get("annotation"); for(Node node: nodeList) { AnnotationType<ElementType<T>> type = new AnnotationTypeImpl<ElementType<T>>(this, "annotation", childNode, node); list.add(type); } return list; }
/** * If not already created, a new <code>annotation</code> element will be created and returned. * Otherwise, the first existing <code>annotation</code> element will be returned. * @return the instance defined for the element <code>annotation</code> */ public AnnotationType<ElementType<T>> getOrCreateAnnotation() { List<Node> nodeList = childNode.get("annotation"); if (nodeList != null && nodeList.size() > 0) { return new AnnotationTypeImpl<ElementType<T>>(this, "annotation", childNode, nodeList.get(0)); } return createAnnotation(); }
/** * If not already created, a new <code>annotation</code> element will be created and returned. * Otherwise, the first existing <code>annotation</code> element will be returned. * @return the instance defined for the element <code>annotation</code> */ public AnnotationType<ElementType<T>> getOrCreateAnnotation() { List<Node> nodeList = childNode.get("annotation"); if (nodeList != null && nodeList.size() > 0) { return new AnnotationTypeImpl<ElementType<T>>(this, "annotation", childNode, nodeList.get(0)); } return createAnnotation(); }