Forge - Shell API 1.2.0.Final

org.jboss.forge.shell.util
Class JavaPathspecParser

java.lang.Object
  extended by org.jboss.forge.shell.util.JavaPathspecParser

public class JavaPathspecParser
extends Object

Parser accepts a Java path, and provides a result set of resources based on the relative path provided.

Example:
List> res = new PathspecParser(factoryInstance, javaSourceFacet, "~.project.shell"); Where factoryInstance is an instance of ResourceFactory, javaSourceFacet is a JavaSourceFacet instance, from the current project, with which the relative result for ~.* will be calculated.

Wildcards * and ? are accepted.

Author:
Lincoln Baxter

Constructor Summary
JavaPathspecParser(JavaSourceFacet java, String path)
           
 
Method Summary
 List<? extends Resource<?>> resolve()
           
 List<Resource<?>> resolve(ResourceFilter filter)
          Resolve the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaPathspecParser

public JavaPathspecParser(JavaSourceFacet java,
                          String path)
Method Detail

resolve

public List<Resource<?>> resolve(ResourceFilter filter)
Resolve the results.

Returns:
A list of resources that match the path. Empty if there are no matches.

resolve

public List<? extends Resource<?>> resolve()

Forge - Shell API 1.2.0.Final

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.