Examples of QuotedStringTokenizer


Examples of com.facebook.presto.jdbc.internal.jetty.util.QuotedStringTokenizer

                while (e.hasMoreElements())
                {
                    String value = e.nextElement();
                    if (value!=null)
                    {
                        tok = new QuotedStringTokenizer(value, separators, false, false);
                        if (tok.hasMoreElements()) return true;
                    }
                }
                tok = null;
                return false;
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jetty.util.QuotedStringTokenizer

        int i = value.indexOf(';');
        if (i < 0) return value;
        if (parameters == null) return value.substring(0, i).trim();

        StringTokenizer tok1 = new QuotedStringTokenizer(value.substring(i), ";", false, true);
        while (tok1.hasMoreTokens())
        {
            String token = tok1.nextToken();
            StringTokenizer tok2 = new QuotedStringTokenizer(token, "= ");
            if (tok2.hasMoreTokens())
            {
                String paramName = tok2.nextToken();
                String paramVal = null;
                if (tok2.hasMoreTokens()) paramVal = tok2.nextToken();
                parameters.put(paramName, paramVal);
            }
        }

        return value.substring(0, i).trim();
View Full Code Here

Examples of com.sun.enterprise.admin.util.QuotedStringTokenizer

    private Set tokenizeJvmOptions(String[] options) {
        final Set optionsSet = new LinkedHashSet();
        final String DELIM = " \t";
        for (int i = 0; i < options.length; i++) {
            QuotedStringTokenizer strTok = new QuotedStringTokenizer(
                                                options[i], DELIM);
            while (strTok.hasMoreTokens()) {
                optionsSet.add(strTok.nextToken());
            }
        }
        return Collections.unmodifiableSet(optionsSet);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.QuotedStringTokenizer

        if (null == options)
        {
            throw new IllegalArgumentException();
        }
        //4923404
        QuotedStringTokenizer strTok = new QuotedStringTokenizer(options, " \t");
        //4923404
        while (strTok.hasMoreTokens())
        {
            String option = strTok.nextToken();
            checkValidOption(option);
            jvmOptions.add(option);
        }
        next = DEFAULT;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.QuotedStringTokenizer

    {
        Set s = new LinkedHashSet();
        //4923404
        for (int i = 0; i < options.length; i++)
        {
            QuotedStringTokenizer strTok = new QuotedStringTokenizer(
                                                options[i], " \t");
            while (strTok.hasMoreTokens())
            {
                s.add(strTok.nextToken());
            }
        }
        //4923404
        return toStringArray(s);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.QuotedStringTokenizer

    {
        Set s = new LinkedHashSet();
        //4923404
        for (int i = 0; i < options.length; i++)
        {
            QuotedStringTokenizer strTok = new QuotedStringTokenizer(
                                                options[i], " \t");
            while (strTok.hasMoreTokens())
            {
                s.add(strTok.nextToken());
            }
        }
        //4923404
        return toStringArray(s);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.QuotedStringTokenizer

        //Otherwise performance tuner breaks saying that noop=true is not valid
        //because it does not begin with a '-'.
        String gogoArgs = "-Dgosh.args=--noshutdown -c noop=true";
        if (!options.equals(gogoArgs)) {
            //4923404
            QuotedStringTokenizer strTok = new QuotedStringTokenizer(options, " \t");
            //4923404
            while (strTok.hasMoreTokens())
            {
                String option = strTok.nextToken();
                checkValidOption(option);
                jvmOptions.add(option);
            }
        } else {
            jvmOptions.add(gogoArgs);
View Full Code Here

Examples of hudson.util.QuotedStringTokenizer

     */
    public static Set<LabelAtom> parse(String labels) {
        Set<LabelAtom> r = new TreeSet<LabelAtom>();
        labels = fixNull(labels);
        if(labels.length()>0)
            for( String l : new QuotedStringTokenizer(labels).toArray())
                r.add(Jenkins.getInstance().getLabelAtom(l));
        return r;
    }
View Full Code Here

Examples of net.sf.jabref.util.QuotedStringTokenizer

      throw new Exception(
          "Internal error: KeywordGroup cannot be created from \""
              + s
              + "\". "
              + "Please report this on www.sf.net/projects/jabref");
    QuotedStringTokenizer tok = new QuotedStringTokenizer(s.substring(ID
        .length()), SEPARATOR, QUOTE_CHAR);
    switch (version) {
    case 0: {
      String name = tok.nextToken();
      String field = tok.nextToken();
      String expression = tok.nextToken();
      // assume caseSensitive=false and regExp=true for old groups
      return new KeywordGroup(Util.unquote(name, QUOTE_CHAR), Util
          .unquote(field, QUOTE_CHAR), Util.unquote(expression,
          QUOTE_CHAR), false, true, AbstractGroup.INDEPENDENT);
    }
    case 1:
    case 2: {
      String name = tok.nextToken();
      String field = tok.nextToken();
      String expression = tok.nextToken();
      boolean caseSensitive = Integer.parseInt(tok.nextToken()) == 1;
      boolean regExp = Integer.parseInt(tok.nextToken()) == 1;
      return new KeywordGroup(Util.unquote(name, QUOTE_CHAR), Util
          .unquote(field, QUOTE_CHAR), Util.unquote(expression,
          QUOTE_CHAR), caseSensitive, regExp,
          AbstractGroup.INDEPENDENT);
    }
    case 3: {
      String name = tok.nextToken();
      int context = Integer.parseInt(tok.nextToken());
      String field = tok.nextToken();
      String expression = tok.nextToken();
      boolean caseSensitive = Integer.parseInt(tok.nextToken()) == 1;
      boolean regExp = Integer.parseInt(tok.nextToken()) == 1;
      return new KeywordGroup(Util.unquote(name, QUOTE_CHAR), Util
          .unquote(field, QUOTE_CHAR), Util.unquote(expression,
          QUOTE_CHAR), caseSensitive, regExp, context);
    }
    default:
View Full Code Here

Examples of net.sf.jabref.util.QuotedStringTokenizer

    if (!s.startsWith(ID))
      throw new Exception(
          "Internal error: SearchGroup cannot be created from \"" + s
          + "\". "
          + "Please report this on www.sf.net/projects/jabref");
    QuotedStringTokenizer tok = new QuotedStringTokenizer(s.substring(ID
        .length()), SEPARATOR, QUOTE_CHAR);
    switch (version) {
    case 0:
    case 1:
    case 2: {
      String name = tok.nextToken();
      String expression = tok.nextToken();
      boolean caseSensitive = Integer.parseInt(tok.nextToken()) == 1;
      boolean regExp = Integer.parseInt(tok.nextToken()) == 1;
      // version 0 contained 4 additional booleans to specify search
      // fields; these are ignored now, all fields are always searched
      return new SearchGroup(Util.unquote(name, QUOTE_CHAR), Util
          .unquote(expression, QUOTE_CHAR), caseSensitive, regExp,
          AbstractGroup.INDEPENDENT);
    }
    case 3: {
      String name = tok.nextToken();
      int context = Integer.parseInt(tok.nextToken());
      String expression = tok.nextToken();
      boolean caseSensitive = Integer.parseInt(tok.nextToken()) == 1;
      boolean regExp = Integer.parseInt(tok.nextToken()) == 1;
      // version 0 contained 4 additional booleans to specify search
      // fields; these are ignored now, all fields are always searched
      return new SearchGroup(Util.unquote(name, QUOTE_CHAR), Util
          .unquote(expression, QUOTE_CHAR), caseSensitive, regExp,
          context);
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.