Package org.apache.maven.usability.plugin

Examples of org.apache.maven.usability.plugin.ExpressionDocumentation


     * @return ExpressionDocumentation
     */
    private ExpressionDocumentation parseExpressionDocumentation( String tagName, XmlPullParser parser, boolean strict )
        throws IOException, XmlPullParserException
    {
        ExpressionDocumentation expressionDocumentation = new ExpressionDocumentation();
        java.util.Set parsed = new java.util.HashSet();
        int eventType = parser.getEventType();
        boolean foundRoot = false;
        expressionDocumentation.setModelEncoding( parser.getInputEncoding() );
        while ( eventType != XmlPullParser.END_DOCUMENT )
        {
            if ( eventType == XmlPullParser.START_TAG )
            {
                if ( parser.getName().equals( tagName ) )
                {
                    foundRoot = true;
                }
                else if ( strict && ! foundRoot )
                {
                    throw new XmlPullParserException( "Expected root element '" + tagName + "' but found '" + parser.getName() + "'", parser, null );
                }
                else if ( checkFieldWithDuplicate( parser, "expressions", null, parsed ) )
                {
                    java.util.List expressions = new java.util.ArrayList/*<Expression>*/();
                    expressionDocumentation.setExpressions( expressions );
                    while ( parser.nextTag() == XmlPullParser.START_TAG )
                    {
                        if ( parser.getName().equals( "expression" ) )
                        {
                            expressions.add( parseExpression( "expression", parser, strict ) );
View Full Code Here


     * @param parser
     */
    private ExpressionDocumentation parseExpressionDocumentation(String tagName, XmlPullParser parser, boolean strict, String encoding)
        throws IOException, XmlPullParserException
    {
        ExpressionDocumentation expressionDocumentation = new ExpressionDocumentation();
        expressionDocumentation.setModelEncoding( encoding );
        java.util.Set parsed = new java.util.HashSet();
        int eventType = parser.getEventType();
        boolean foundRoot = false;
        while ( eventType != XmlPullParser.END_DOCUMENT )
        {
            if ( eventType == XmlPullParser.START_TAG )
            {
                if ( parser.getName().equals( tagName ) )
                {
                    foundRoot = true;
                }
                else if ( parser.getName().equals( "expressions" )  )
                {
                    if ( parsed.contains( "expressions" ) )
                    {
                        throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                    }
                    parsed.add( "expressions" );
                    java.util.List expressions = new java.util.ArrayList();
                    expressionDocumentation.setExpressions( expressions );
                    while ( parser.nextTag() == XmlPullParser.START_TAG )
                    {
                        if ( parser.getName().equals( "expression" ) )
                        {
                            expressions.add( parseExpression( "expression", parser, strict, encoding ) );
View Full Code Here

TOP

Related Classes of org.apache.maven.usability.plugin.ExpressionDocumentation

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.