Package org.jibx.schema.elements

Examples of org.jibx.schema.elements.AnnotationElement


        }
       
        // add documentation if available
        List nodes = parm.getDocumentation();
        if (nodes != null) {
            AnnotationElement anno = new AnnotationElement();
            DocumentationElement doc = new DocumentationElement();
            for (Iterator iter = nodes.iterator(); iter.hasNext();) {
                Node node = (Node)iter.next();
                doc.addContent(node);
            }
            anno.getItemsList().add(doc);
            elem.setAnnotation(anno);
        }
        return elem;
    }
View Full Code Here


     */
    public void walkChildren(SchemaBase root, SchemaVisitor visitor) {
       
        // first expand the annotation, if present
        if (root instanceof AnnotatedBase) {
            AnnotationElement anno = ((AnnotatedBase)root).getAnnotation();
            if (anno != null) {
                walkElement(anno, visitor);
            }
        }
       
View Full Code Here

     * @return content of <b>documentation</b> elements, or <code>null</code> if none
     */
    protected String extractDocumentation(AnnotatedBase element) {
        if (m_schemaCustom.isJavaDocDocumentation()) {
            StringWriter writer = new StringWriter();
            AnnotationElement anno = element.getAnnotation();
            if (anno != null) {
                FilteredSegmentList items = anno.getItemsList();
                for (int i = 0; i < items.size(); i++) {
                    AnnotationItem item = (AnnotationItem)items.get(i);
                    if (item instanceof DocumentationElement) {
                        DocumentationElement doc = (DocumentationElement)item;
                        List contents = doc.getContent();
View Full Code Here

    private void addDocumentation(IClass info, AnnotatedBase root) {
        ClassCustom custom = m_custom.getClassCustomization(info.getName());
        if (info != null && custom.isUseJavaDocs()) {
            List nodes = m_formatCache.getFormatter(custom).getClassDocumentation(info);
            if (nodes != null) {
                AnnotationElement anno = new AnnotationElement();
                DocumentationElement doc = new DocumentationElement();
                for (Iterator iter = nodes.iterator(); iter.hasNext();) {
                    Node node = (Node)iter.next();
                    doc.addContent(node);
                }
                anno.getItemsList().add(doc);
                root.setAnnotation(anno);
            }
        }
    }
View Full Code Here

    private void setDocumentation(IClassItem item, AnnotatedBase elem) {
        ClassCustom custom = m_custom.getClassCustomization(item.getOwningClass().getName());
        if (custom != null && custom.isUseJavaDocs()) {
            List nodes = m_formatCache.getFormatter(custom).getItemDocumentation(item);
            if (nodes != null) {
                AnnotationElement anno = new AnnotationElement();
                DocumentationElement doc = new DocumentationElement();
                for (Iterator iter = nodes.iterator(); iter.hasNext();) {
                    Node node = (Node)iter.next();
                    doc.addContent(node);
                }
                anno.getItemsList().add(doc);
                elem.setAnnotation(anno);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jibx.schema.elements.AnnotationElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.