|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.roo.project.AbstractPathResolver
public abstract class AbstractPathResolver
Abstract PathResolver
implementation.
Subclasses should be created for common build system structures.
Constructor Summary | |
---|---|
AbstractPathResolver()
|
Method Summary | |
---|---|
String |
getFriendlyName(String identifier)
Converts the presented canonical path into a human-friendly name. |
String |
getIdentifier(Path path,
String relativePath)
Produces a canonical path for the presented Path and relative path. |
List<Path> |
getNonSourcePaths()
Similar to PathResolver.getSourcePaths() , but only returns Path s which are not compiled. |
Path |
getPath(String identifier)
Attempts to determine which Path the specified canonical path falls under. |
protected abstract List<PathInformation> |
getPathInformation()
Called by the init() method when it wishes to obtain a list of paths to register. |
List<Path> |
getPaths()
Returns all paths supported by the implementation, in an order defined by the implementation. |
String |
getRelativeSegment(String identifier)
Attempts to determine which Path the specified canonical path falls under,
and then returns the relative portion of the file name. |
String |
getRoot(Path path)
Returns a canonical path that represents the root of the presented Path . |
List<Path> |
getSourcePaths()
Indicates all the source code Path s known to this PathResolver . |
protected void |
init()
Called by the subclass when they are ready to complete initialization. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractPathResolver()
Method Detail |
---|
protected abstract List<PathInformation> getPathInformation()
init()
method when it wishes to obtain a list of paths to register.
protected void init()
getPathInformation()
method is ready to be called.
public String getFriendlyName(String identifier)
PathResolver
getFriendlyName
in interface PathResolver
identifier
- to resolve (required)
public String getRoot(Path path)
PathResolver
Path
.
getRoot
in interface PathResolver
path
- to lookup (required)
public List<Path> getPaths()
PathResolver
By default this method will return, in the following order:
Path.SRC_MAIN_JAVA
Path.SRC_MAIN_RESOURCES
Path.SRC_MAIN_WEBAPP
Path.SRC_TEST_JAVA
Path.SRC_TEST_RESOURCES
Path.ROOT
Path.SPRING_CONFIG_ROOT
getPaths
in interface PathResolver
public List<Path> getNonSourcePaths()
PathResolver
PathResolver.getSourcePaths()
, but only returns Path
s which are not compiled.
By default this method will return, in the following order:
getNonSourcePaths
in interface PathResolver
public List<Path> getSourcePaths()
PathResolver
Path
s known to this PathResolver
.
Whilst generally add-ons should know which paths contain source and which do not, this method abstracts add-ons from direct knowledge of available paths.
By default this method will return, in the following order:
getSourcePaths
in interface PathResolver
public Path getPath(String identifier)
PathResolver
Path
the specified canonical path falls under.
getPath
in interface PathResolver
identifier
- to lookup (required)
Path
, or null if the identifier refers to a location not under a know path.public String getRelativeSegment(String identifier)
PathResolver
Path
the specified canonical path falls under,
and then returns the relative portion of the file name.
See FileDetails.getRelativeSegment(String)
for related information.
getRelativeSegment
in interface PathResolver
identifier
- to resolve (required)
Path
directly), or null if the identifier does not have a corresponding Path
public String getIdentifier(Path path, String relativePath)
PathResolver
Path
and relative path.
getIdentifier
in interface PathResolver
path
- to use (required)relativePath
- to use (cannot be null, but may be empty if referring to the path itself)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |