Examples of ParseSelectorException


Examples of org.skyscreamer.yoga.exceptions.ParseSelectorException

                        openParenthesis );

                if (selectorBuff.length() > matchIndex + 1
                        && selectorBuff.charAt( matchIndex + 1 ) != ',')
                {
                    throw new ParseSelectorException( "A nested selector not at the end of its parent must be followed by a comma" );
                }
                index = matchIndex + 1;
            }
            else
            {
View Full Code Here

Examples of org.skyscreamer.yoga.exceptions.ParseSelectorException

            return null;
        }

        if ( _disableExplicitSelectors && !selectorExpression.startsWith( ALIAS_SELECTOR_PREFIX ) )
        {
            throw new ParseSelectorException( "Explicit selectors have been disabled" );
        }

        if ( selectorExpression.startsWith( ALIAS_SELECTOR_PREFIX ) )
        {
            selectorExpression = _aliasSelectorResolver.resolveSelector( selectorExpression );
View Full Code Here

Examples of org.skyscreamer.yoga.exceptions.ParseSelectorException

                    _properties.load( _propertyFile );
                    _nextReloadTime = milliseconds + (_reloadIntervalSeconds * 1000);
                }
                catch ( IOException e )
                {
                    throw new ParseSelectorException( "Could not load property file" );
                }
            }
        }

        String result = _properties.getProperty( aliasSelectorExpression );
        if ( result == null )
        {
            throw new ParseSelectorException( "No selector defined for " + aliasSelectorExpression );
        }

        return result;
    }
View Full Code Here

Examples of org.skyscreamer.yoga.exceptions.ParseSelectorException

        }

        if (!selectorExpression.startsWith( EXPLICIT_SELECTOR_PREFIX ))
        {
            String message = "Selector must start with " + EXPLICIT_SELECTOR_PREFIX;
            throw new ParseSelectorException( message );
        }

        if ( ParenthesisUtil.getMatchingParenthesisIndex( selectorExpression, 1 ) != (selectorExpression.length() - 1) )
        {
            throw new ParseSelectorException( "Selector must end with a parenthesis" );
        }

        String rawSelectorExpression = selectorExpression.substring( 2, selectorExpression.length() - 1 );
        String openParenthesis = ":(";
View Full Code Here

Examples of org.skyscreamer.yoga.exceptions.ParseSelectorException

    public String resolveSelector( String aliasSelectorExpression ) throws ParseSelectorException
    {
        String result = _definedSelectors.get( aliasSelectorExpression );
        if ( result == null )
        {
            throw new ParseSelectorException( "No selector defined for " + aliasSelectorExpression );
        }

        return result;
    }
View Full Code Here

Examples of org.skyscreamer.yoga.exceptions.ParseSelectorException

    private static int getMatchingBracketIndex( CharSequence selector, int index, char openBracket, char closeBracket )
            throws ParseSelectorException
    {
        if ( selector.charAt( index ) != openBracket )
        {
            throw new ParseSelectorException( "Selector does not have an opening bracket at index " + index );
        }
        int parenthesesCount = 1;
        while ( parenthesesCount > 0 && index < selector.length() - 1 )
        {
            index++;
            if ( selector.charAt( index ) == openBracket )
            {
                parenthesesCount++;
            }
            if ( selector.charAt( index ) == closeBracket )
            {
                parenthesesCount--;
            }
        }

        if ( parenthesesCount > 0 )
        {
            throw new ParseSelectorException( "More opening brackets than closing brackets" );
        }
        return index;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.