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

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


            AnnotationInstance annotation = ( AnnotationInstance ) annotationsToCheck.get( i );
           
            if ( ( annotationArrayIndex != -1 && annotationArrayIndex != i ) ||
                 ! CompilerUtils.annotationsAreEqual( annotation, parentAnnotation, allowExactDuplicates(), getEnv() ) )
            {
                AnnotationValue valueToCheck =
                        CompilerUtils.getAnnotationValue( annotation, memberName, _checkDefaultValues );
               
                if ( valueToCheck != null && ! valueToCheck.equals( member )
                     && valueToCheck.getValue().equals( memberValue ) )
                {
                    if ( alreadyAddedErrorForValue( classMember, parentAnnotation, memberValue, getEnv() ) ) return;
                   
                    String annotationName =
                            CompilerUtils.getDeclaration( parentAnnotation.getAnnotationType() ).getSimpleName();
View Full Code Here


        if ( values != null )
        {
            for ( Iterator ii = values.iterator(); ii.hasNext();
            {
                AnnotationValue pathValue = ( AnnotationValue ) ii.next();

                if ( pathValue != null )
                {
                    String filePath = ( String ) pathValue.getValue();
                    if ( filePath == null || filePath.length() == 0 || filePath.charAt( 0 ) != '/' )
                    {
                        addError( value, "error.absolute-path-required-for-tiles-def" );
                    }
                }
View Full Code Here

            rule = new ValidatorRule( RULENAME_DATE );
            rule.setVar( strict ? VARNAME_DATE_PATTERN_STRICT : VARNAME_DATE_PATTERN, pattern );
        }
        else if ( annName.equals( VALIDATE_TYPE_TAG_NAME ) )
        {
            AnnotationValue annotationValue = CompilerUtils.getAnnotationValue( ruleAnnotation, TYPE_ATTR, true );
            assert annotationValue != null;
            Object value = annotationValue.getValue();
            assert value instanceof PrimitiveType : value.getClass().getName()// TODO: checker enforces this
            String typeName = ( String ) VALIDATE_TYPE_RULES.get( ( ( PrimitiveType ) value ).getKind() );
            assert typeName != null : ( ( PrimitiveType ) value ).getKind().toString()// TODO: checker enforces this
            rule = new ValidatorRule( typeName );
        }
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

                {
                    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

               
                // 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

            AnnotationInstance annotation = ( AnnotationInstance ) annotationsToCheck.get( i );
           
            if ( ( annotationArrayIndex != -1 && annotationArrayIndex != i ) ||
                 ! CompilerUtils.annotationsAreEqual( annotation, parentAnnotation, allowExactDuplicates(), getEnv() ) )
            {
                AnnotationValue valueToCheck =
                        CompilerUtils.getAnnotationValue( annotation, memberName, _checkDefaultValues );
               
                if ( valueToCheck != null && ! valueToCheck.equals( member )
                     && valueToCheck.getValue().equals( memberValue ) )
                {
                    if ( alreadyAddedErrorForValue( classMember, parentAnnotation, memberValue, getEnv() ) ) return;
                   
                    String annotationName =
                            CompilerUtils.getDeclaration( parentAnnotation.getAnnotationType() ).getSimpleName();
View Full Code Here

            rule = new ValidatorRule( RULENAME_DATE );
            rule.setVar( strict ? VARNAME_DATE_PATTERN_STRICT : VARNAME_DATE_PATTERN, pattern );
        }
        else if ( annName.equals( VALIDATE_TYPE_TAG_NAME ) )
        {
            AnnotationValue annotationValue = CompilerUtils.getAnnotationValue( ruleAnnotation, TYPE_ATTR, true );
            assert annotationValue != null;
            Object value = annotationValue.getValue();
            assert value instanceof PrimitiveType : value.getClass().getName()// TODO: checker enforces this
            String typeName = ( String ) VALIDATE_TYPE_RULES.get( ( ( PrimitiveType ) value ).getKind() );
            assert typeName != null : ( ( PrimitiveType ) value ).getKind().toString()// TODO: checker enforces this
            rule = new ValidatorRule( typeName );
        }
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

        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

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.