Package org.drools.lang.api

Examples of org.drools.lang.api.AnnotationDescrBuilder


                              null,
                              null,
                              DroolsEditorType.IDENTIFIER );
            if ( state.failed ) return;

            AnnotationDescrBuilder annotation = null;
            if ( state.backtracking == 0 ) {
                annotation = adb.newAnnotation( id.getText() );
                helper.setStart( annotation,
                                 at );
                helper.pushBuilderContext( annotation );
            }

            try {
                if ( input.LA( 1 ) == DRLLexer.LEFT_PAREN ) {
                    if ( speculateElementValuePairs() ) {
                        elementValuePairs( annotation );
                        if ( state.failed ) return;
                    } else {
                        String value = chunk( DRLLexer.LEFT_PAREN,
                                              DRLLexer.RIGHT_PAREN,
                                              -1 ).trim();
                        if ( state.failed ) return;
                        if ( state.backtracking == 0 ) {
                            if ( value.startsWith( "\"" ) && value.endsWith( "\"" ) ) {
                                value = StringUtils.unescapeJava( value );
                            }
                            annotation.value( value );
                        }
                    }
                }
            } finally {
                if ( state.backtracking == 0 ) {
View Full Code Here


                              null,
                              null,
                              DroolsEditorType.IDENTIFIER );
            if ( state.failed ) return;

            AnnotationDescrBuilder annotation = null;
            if ( state.backtracking == 0 ) {
                annotation = adb.newAnnotation( id.getText() );
                helper.setStart( annotation,
                                 at );
                helper.pushBuilderContext( annotation );
            }

            try {
                if ( input.LA( 1 ) == DRLLexer.LEFT_PAREN ) {
                    if ( speculateElementValuePairs() ) {
                        elementValuePairs( annotation );
                        if ( state.failed ) return;
                    } else {
                        String value = chunk( DRLLexer.LEFT_PAREN,
                                              DRLLexer.RIGHT_PAREN,
                                              -1 ).trim();
                        if ( state.failed ) return;
                        if ( state.backtracking == 0 ) {
                            if ( value.startsWith( "\"" ) && value.endsWith( "\"" ) ) {
                                value = StringUtils.unescapeJava( value );
                            }
                            annotation.value( value );
                        }
                    }
                }
            } finally {
                if ( state.backtracking == 0 ) {
View Full Code Here

TOP

Related Classes of org.drools.lang.api.AnnotationDescrBuilder

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.