Package org.apache.beehive.netui.compiler.typesystem.declaration

Examples of org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationValue


                {
                    String attrName = ( String ) j.next();
                    AnnotationTypeElementDeclaration memberDecl = decl.getMember( attrName );
                    SourcePositionImpl pos = SourcePositionImpl.get( tag, attrName, element );
                    Object val = parseValue( memberDecl, tag.getAttributeValue( attrName ), pos );
                    AnnotationValue value = new AnnotationValueImpl( val, pos, memberDecl );
                    elementValues.put( memberDecl, value );
                }
               
                AnnotationInstanceImpl ann = new AnnotationInstanceImpl( tag, element, type, elementValues );
               
View Full Code Here


        for ( Iterator i = elementValues.entrySet().iterator(); i.hasNext(); )
        {
            Map.Entry entry = ( Map.Entry ) i.next();
            AnnotationTypeElementDeclaration elementDecl = ( AnnotationTypeElementDeclaration ) entry.getKey();
            AnnotationValue annotationValue = ( AnnotationValue ) entry.getValue();

            String name = elementDecl.getSimpleName();
            Object value = annotationValue.getValue();
            Element xmlAttr = _xw.addElement(xmlAnnotation, "annotation-attribute");
            _xw.addElementWithText(xmlAttr, "attribute-name", name);

            if ( value instanceof List )
            {
View Full Code Here

        Map valuesPresent = rulesContainerAnnotation.getElementValues();
       
        for ( Iterator ii = valuesPresent.entrySet().iterator(); ii.hasNext();
        {
            Map.Entry entry = ( Map.Entry ) ii.next();
            AnnotationValue value = ( AnnotationValue ) entry.getValue();
            Object val = value.getValue();
           
            if ( val instanceof AnnotationInstance )
            {
                addFieldRuleFromAnnotation( ruleInfo, ( AnnotationInstance ) val, locale, applyToAllLocales );
            }
View Full Code Here

                                    TypeDeclaration baseType, boolean isError )
            throws FatalCompileTimeException
    {
        if ( ann != null )
        {
            AnnotationValue pathVal = CompilerUtils.getAnnotationValue( ann, memberName, true );
           
            if ( pathVal != null )
            {
                String path = ( String ) pathVal.getValue();
               
                if ( path.charAt( 0 ) != '/' && ! WebappPathType.relativePathExists( path, jclass, getEnv() ) )
                {
                    String[] args = {
                        path,
View Full Code Here

                                    TypeDeclaration jclass, TypeDeclaration baseType, boolean isError )
            throws FatalCompileTimeException
    {
        if ( ann != null )
        {
            AnnotationValue pathVal = CompilerUtils.getAnnotationValue( ann, memberName, true );
           
            if ( pathVal != null )
            {
                String path = ( String ) pathVal.getValue();
               
                if ( path.charAt( 0 ) != '/' && ! WebappPathType.relativePathExists( path, jclass, getEnv() ) )
                {
                    String[] args = {
                        path,
View Full Code Here

                                    TypeDeclaration baseType, boolean isError )
            throws FatalCompileTimeException
    {
        if ( ann != null )
        {
            AnnotationValue pathVal = CompilerUtils.getAnnotationValue( ann, memberName, true );
           
            if ( pathVal != null )
            {
                String path = ( String ) pathVal.getValue();
               
                if ( path.charAt( 0 ) != '/' && ! WebappPathType.relativePathExists( path, jclass, getEnv() ) )
                {
                    String[] args = {
                        path,
View Full Code Here

                                    TypeDeclaration jclass, TypeDeclaration baseType, boolean isError )
            throws FatalCompileTimeException
    {
        if ( ann != null )
        {
            AnnotationValue pathVal = CompilerUtils.getAnnotationValue( ann, memberName, true );
           
            if ( pathVal != null )
            {
                String path = ( String ) pathVal.getValue();
               
                if ( path.charAt( 0 ) != '/' && ! WebappPathType.relativePathExists( path, jclass, getEnv() ) )
                {
                    String[] args = {
                        path,
View Full Code Here

       
        for ( Iterator ii = valuesPresent.entrySet().iterator(); ii.hasNext();
        {
            Map.Entry i = ( Map.Entry ) ii.next();
            AnnotationTypeElementDeclaration decl = ( AnnotationTypeElementDeclaration ) i.getKey();
            AnnotationValue value = ( AnnotationValue ) i.getValue();
            String memberName = decl.getSimpleName();
           
            wasPresent.add( memberName );
            onCheckMember( decl, value, annotation, parentAnnotations, classMember );
            Object grammarOrType = null;
           
            if ( ( grammarOrType = _memberGrammars.get( memberName ) ) != null )
            {
                AnnotationGrammar childGrammar = ( AnnotationGrammar ) grammarOrType;
               
                if ( childGrammar != null )   // it will be non-null unless there are other, more basic, errors
                {
                    Object result =
                        childGrammar.check( ( AnnotationInstance ) value.getValue(), parentsIncludingMe, classMember );
                   
                    if ( result != null )
                    {
                        checkResults.put( memberName, result );
                    }
View Full Code Here

       
        for ( Iterator i = elementValues.entrySet().iterator(); i.hasNext(); )
        {
            Map.Entry entry = ( Map.Entry ) i.next();
            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 )
            {
View Full Code Here

               
                // Check for duplicates *within* within the list of additional annotations.
                for ( int i = 0; i < additionalAnnsToCheck.size(); ++i )
                {
                    AnnotationInstance ann = ( AnnotationInstance ) additionalAnnsToCheck.get( i );
                    AnnotationValue valueToCheck = CompilerUtils.getAnnotationValue( ann, valueName, true );
                    checkForDuplicates( valueToCheck, valueName, ann, classMember, additionalAnnsToCheck, true, -1 );
                }
            }
        }
       
View Full Code Here

TOP

Related Classes of org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationValue

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.