Package org.apache.beehive.netui.compiler.schema.annotations

Examples of org.apache.beehive.netui.compiler.schema.annotations.AnnotationAttribute


    {
        AnnotationAttribute[] attrs = ann.getAnnotationAttributeArray();
       
        for ( int i = 0; i < attrs.length; i++ )
        {
            AnnotationAttribute attr = attrs[i];
           
            if ( attr.getAttributeName().equals( attrName ) )
            {
                String value = attr.getStringValue1();
                assert value != null : "attribute " + attrName + " did not have a String value";
                return value;
            }
        }
       
View Full Code Here


    {
        AnnotationAttribute[] attrs = ann.getAnnotationAttributeArray();
       
        for ( int i = 0; i < attrs.length; i++ )
        {
            AnnotationAttribute attr = attrs[i];
           
            if ( attr.getAttributeName().equals( attrName ) )
            {
                ProcessedAnnotation[] array = attr.getAnnotationValueArray();
                assert array != null : "attribute " + attrName + " did not have an array of annotations.";
                return array;
            }
        }
       
View Full Code Here

            AnnotationTypeElementDeclaration elementDecl = ( AnnotationTypeElementDeclaration ) entry.getKey();
            AnnotationValue annotationValue = ( AnnotationValue ) entry.getValue();
           
            String name = elementDecl.getSimpleName();
            Object value = annotationValue.getValue();
            AnnotationAttribute xmlAttr = xmlAnnotation.addNewAnnotationAttribute();
            xmlAttr.setAttributeName( name );
           
            if ( value instanceof List )
            {
                for ( Iterator j = ( ( List ) value ).iterator(); j.hasNext(); )
                {
                    Object o = j.next();
                    assert o instanceof AnnotationValue : o.getClass().getName();
                    Object listVal = ( ( AnnotationValue ) o ).getValue();
                   
                    // we only handle lists of annotations at the moment
                    assert listVal instanceof AnnotationInstance : listVal.getClass().getName();
                    include( xmlAttr.addNewAnnotationValue(), ( AnnotationInstance ) listVal );
                }
            }
            else
            {
                // we only support a few types at the moment
                assert value instanceof TypeInstance || value instanceof String : value.getClass().getName();
                xmlAttr.setStringValue1( value.toString() );
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.beehive.netui.compiler.schema.annotations.AnnotationAttribute

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.