Package org.osgi.framework

Examples of org.osgi.framework.InvalidSyntaxException


                    case ')' : {
                        break parseloop;
                    }

                    case '(' : {
                        throw new InvalidSyntaxException("Invalid value: "
                                + filterstring.substring(pos), filterstring);
                    }

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

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

            if (sb.length() == 0) {
                throw new InvalidSyntaxException("Missing value: "
                        + filterstring.substring(pos), filterstring);
            }

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


                        break parseloop;
                    }

                    case '(' : {
                        throw new InvalidSyntaxException("Invalid value: "
                                + filterstring.substring(pos), filterstring);
                    }

                    case '*' : {
                        if (sb.length() > 0) {
View Full Code Here

    ApamFilter parse() throws InvalidSyntaxException {
      ApamFilter filter;
      try {
        filter = parseFilter();
      } catch (ArrayIndexOutOfBoundsException e) {
        throw new InvalidSyntaxException("Filter ended abruptly. Filter : " + filterstring, filterstring, e);
      }

      if (pos != filterChars.length) {
        throw new InvalidSyntaxException("Extraneous trailing characters: " + filterstring.substring(pos), filterstring);
      }
      return filter;
    }
View Full Code Here

      }

      int length = end - begin;

      if (length == 0) {
        throw new InvalidSyntaxException("Invalid syntax in filter: " + filterstring + " Missing attr: " + filterstring.substring(pos), filterstring);
      }

      String str = new String(filterChars, begin, length);
      if (ignoreCase) {
        str = str.toLowerCase();
View Full Code Here

    private ApamFilter parseFilter() throws InvalidSyntaxException {
      ApamFilter filter;
      skipWhiteSpace();

      if (filterChars[pos] != '(') {
        throw new InvalidSyntaxException("Missing '(': " + filterstring.substring(pos), filterstring);
      }

      pos++;

      filter = parseFiltercomp();

      skipWhiteSpace();

      if (filterChars[pos] != ')') {
        throw new InvalidSyntaxException("Missing ')': " + filterstring.substring(pos), filterstring);
      }

      pos++;

      skipWhiteSpace();
View Full Code Here

        }
        return new ApamFilter(ApamFilter.SUBSTRING, attr, string);
      }
      }

      throw new InvalidSyntaxException("Invalid operator: " + filterstring.substring(pos), filterstring);
    }
View Full Code Here

          break parseloop;
        }

        case '(': {
          throw new InvalidSyntaxException("Invalid value: " + filterstring.substring(pos), filterstring);
        }

        case '*': {
          if (sb.length() > 0) {
            operands.add(sb.toString());
View Full Code Here

        case ')': {
          break parseloop;
        }

        case '(': {
          throw new InvalidSyntaxException("Invalid value: " + filterstring.substring(pos), filterstring);
        }

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

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

      if (sb.length() == 0) {
        throw new InvalidSyntaxException("Missing value: " + filterstring.substring(pos), filterstring);
      }

      // TODO Substitute filter
      String ret = Util.toStringAttrValue(Substitute.substitute(null, sb.toString(), component));
      if (ret == null) {
        throw new InvalidSyntaxException("Substitution failed. Missing value: " + filterstring.substring(pos), filterstring);
      }
      return ret;

    }
View Full Code Here

            {
                filter = SimpleFilter.parse(expr);
            }
            catch (Exception ex)
            {
                throw new InvalidSyntaxException(ex.getMessage(), expr);
            }
        }

        // Ask the service registry for all matching service references.
        final List refList = m_registry.getServiceReferences(className, filter);
View Full Code Here

        {
            m_filter = SimpleFilter.parse(filterStr);
        }
        catch (Throwable th)
        {
            throw new InvalidSyntaxException(th.getMessage(), filterStr);
        }
    }
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.