Examples of PathTokenizer


Examples of com.jayway.jsonpath.internal.PathTokenizer


        int filterCountInPath = Utils.countMatches(jsonPath, "[?]");
        isTrue(filterCountInPath == filters.length, "Filters in path ([?]) does not match provided filters.");

        this.tokenizer = new PathTokenizer(jsonPath);

        if(LOG.isDebugEnabled()){
            LOG.debug("New JsonPath:\n{}", this.tokenizer.toString());
        }
View Full Code Here

Examples of com.jayway.jsonpath.internal.PathTokenizer

    private LinkedList<PathToken> getPathTokensFrom(JsonPath jsonPathObject) {
        try {
            Field tokenizerField = JsonPath.class.getDeclaredField("tokenizer");
            tokenizerField.setAccessible(true);
            PathTokenizer tokenizer = (PathTokenizer) tokenizerField.get(jsonPathObject);
            Field pathTokensField = PathTokenizer.class.getDeclaredField("pathTokens");
            pathTokensField.setAccessible(true);
            return (LinkedList<PathToken>) pathTokensField.get(tokenizer);
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of jfun.util.os.PathTokenizer

   * @throws MalformedURLException if any sub-string is not convertible to URL.
   */
  public static URL[] toUrls(File basedir, String str)
  throws MalformedURLException{
    final List result = new ArrayList();
    PathTokenizer tok = new PathTokenizer(str);
    while (tok.hasMoreTokens()) {
      final String element = tok.nextToken();
      result.add(toUrl(basedir, element));
    }
    final URL[] ret = new URL[result.size()];
    result.toArray(ret);
    return ret;
View Full Code Here

Examples of org.apache.tools.ant.PathTokenizer

    public static String[] translatePath(Project project, String source) {
        final Vector result = new Vector();
        if (source == null) {
            return new String[0];
        }
        PathTokenizer tok = new PathTokenizer(source);
        StringBuffer element = new StringBuffer();
        while (tok.hasMoreTokens()) {
            String pathElement = tok.nextToken();
            try {
                element.append(resolveFile(project, pathElement).getPath());
            } catch (BuildException e) {
                project.log("Dropping path element " + pathElement
                    + " as it is not valid relative to the project",
View Full Code Here

Examples of org.apache.tools.ant.PathTokenizer

        final Vector result = new Vector();
        if (source == null) {
          return new String[0];
        }

        PathTokenizer tok = new PathTokenizer(source);
        StringBuffer element = new StringBuffer();
        while (tok.hasMoreTokens()) {
            element.setLength(0);
            String pathElement = tok.nextToken();
            try {
                element.append(resolveFile(project, pathElement));
            } catch (BuildException e) {
                project.log("Dropping path element " + pathElement
                    + " as it is not valid relative to the project",
View Full Code Here

Examples of org.apache.tools.ant.PathTokenizer

            }
            jdepend.setWriter(new PrintWriter(fw));
            log("Output to be stored in " + getOutputFile().getPath());
        }

        PathTokenizer sourcesPath
            = new PathTokenizer(getSourcespath().toString());
        while (sourcesPath.hasMoreTokens()) {
            File f = new File(sourcesPath.nextToken());

            // not necessary as JDepend would fail, but why loose some time?
            if (!f.exists() || !f.isDirectory()) {
                String msg = "\"" + f.getPath() + "\" does not represent a valid"
                    + " directory. JDepend would fail.";
View Full Code Here

Examples of org.apache.tools.ant.PathTokenizer

            commandline.createArgument().setValue("-file");
            commandline.createArgument().setValue(_outputFile.getPath());
            // we have to find a cleaner way to put this output
        }

        PathTokenizer sourcesPath
            = new PathTokenizer(getSourcespath().toString());
        while (sourcesPath.hasMoreTokens()) {
            File f = new File(sourcesPath.nextToken());

            // not necessary as JDepend would fail, but why loose some time?
            if (!f.exists() || !f.isDirectory()) {
                throw new BuildException("\"" + f.getPath() + "\" does not "
                    + "represent a valid directory. JDepend would fail.");
View Full Code Here

Examples of org.apache.tools.ant.PathTokenizer

        final Vector result = new Vector();
        if (source == null) {
          return new String[0];
        }

        PathTokenizer tok = new PathTokenizer(source);
        StringBuffer element = new StringBuffer();
        while (tok.hasMoreTokens()) {
            String pathElement = tok.nextToken();
            try {
                element.append(resolveFile(project, pathElement));
            } catch (BuildException e) {
                project.log("Dropping path element " + pathElement
                    + " as it is not valid relative to the project",
View Full Code Here

Examples of org.apache.tools.ant.PathTokenizer

        } else {
            extn = new String[] {""};
        }

        // PathTokenizer
        PathTokenizer strTok = new PathTokenizer(path);

        while (strTok.hasMoreTokens()) {
            String mytoken = strTok.nextToken();

            mytoken = mytoken.replace('/', File.separatorChar);
            mytoken = mytoken.replace('\\', File.separatorChar);

            // Append Executable
View Full Code Here

Examples of org.apache.tools.ant.PathTokenizer

    public static String translatePath(String toProcess) {
        if (toProcess == null || toProcess.length() == 0) {
            return "";
        }
        StringBuffer path = new StringBuffer(toProcess.length() + EXPAND_SPACE);
        PathTokenizer tokenizer = new PathTokenizer(toProcess);
        while (tokenizer.hasMoreTokens()) {
            String pathComponent = tokenizer.nextToken();
            pathComponent = pathComponent.replace('/', File.separatorChar);
            pathComponent = pathComponent.replace('\\', File.separatorChar);
            if (path.length() != 0) {
                path.append(File.pathSeparatorChar);
            }
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.