Package org.osgi.framework

Examples of org.osgi.framework.InvalidSyntaxException


              break parseloop;
            }

          case '(' :
            {
              throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_INVALID_VALUE, String.valueOf(pos)), filterstring);
            }

          case '\\' :
            {
              pos++;
              c = filter[pos];
              /* fall through into default */
            }

          default :
            {
              sb.append(c);
              pos++;
              break;
            }
        }
      }

      if (sb.length() == 0) {
        throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_MISSING_VALUE, String.valueOf(pos)), filterstring);
      }

      return sb.toString();
    }
View Full Code Here


              break parseloop;
            }

          case '(' :
            {
              throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_INVALID_VALUE, String.valueOf(pos)), filterstring);
            }

          case '*' :
            {
              if (sb.length() > 0) {
                operands.add(sb.toString());
              }

              sb.setLength(0);

              operands.add(null);
              pos++;

              break;
            }

          case '\\' :
            {
              pos++;
              c = filter[pos];
              /* fall through into default */
            }

          default :
            {
              sb.append(c);
              pos++;
              break;
            }
        }
      }

      int size = operands.size();

      if (size == 0) {
        throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_MISSING_VALUE, String.valueOf(pos)), filterstring);
      }

      if (size == 1) {
        Object single = operands.get(0);

View Full Code Here

    String filterString = content.getAttribute(FILTER);
    if (filterString != null) {
      try {
        this.filter = FrameworkUtil.createFilter(filterString);
      } catch (InvalidSyntaxException ise) {       
        throw new InvalidSyntaxException("Failed to create filter for " + service, ise.getFilter(), ise.getCause());
      }
    }
  }
View Full Code Here

                }
            }
        }
        catch (StringIndexOutOfBoundsException e)
        {
            throw new InvalidSyntaxException("Invalid escaping of value", expression);
        }

        values.add(builder.toString());

        if (values.size() == 1)
View Full Code Here

        {
            return parseFilter(new State(expression));
        }
        catch (StringIndexOutOfBoundsException e)
        {
            throw new InvalidSyntaxException("Rolled off the end of the string while parsing the expression", expression);
        }
    }
View Full Code Here

            if (state.peek() == ')') break;

            expression = parseFilter(state);
        }

        if (result.isEmpty()) throw new InvalidSyntaxException("Empty & expression", state.getExpression());

        return new And(result.toArray(new Expr[result.size()]));
    }
View Full Code Here

            if (state.peek() == ')') break;

            expression = parseFilter(state);
        }

        if (result.isEmpty()) throw new InvalidSyntaxException("Empty | expression", state.getExpression());

        return new Or(result.toArray(new Expr[result.size()]));
    }
View Full Code Here

    Not parseNot(State state) throws InvalidSyntaxException
    {
        Expr expression = parseFilter(state);

        if (expression == null) throw new InvalidSyntaxException("Empty ! expression", state.getExpression());

        return new Not(expression);
    }
View Full Code Here

        {
            return new Approx(attribute, (String) value, approxAlgorithm);
        }
        else
        {
            throw new InvalidSyntaxException("Did not expect substr value", state.getExpression());
        }

    }
View Full Code Here

        {
            return new Greater(attribute, (String) value);
        }
        else
        {
            throw new InvalidSyntaxException("Did not expect substr value", state.getExpression());
        }
    }
View Full Code Here

TOP

Related Classes of org.osgi.framework.InvalidSyntaxException

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.