public class LogicalPath extends Object
Path within the context of a specific project module.
To obtain the physical location on the file system, pass an instance of this
class to the PathResolver.
| Modifier and Type | Field and Description |
|---|---|
static String |
MODULE_PATH_SEPARATOR
The character that appears between the module name and the path name in
the textual representation of a
LogicalPath. |
static String |
PATH_SEPARATOR
The character that separates "folders" in the textual representation of a
LogicalPath. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(LogicalPath o) |
boolean |
equals(Object obj) |
static LogicalPath |
getInstance(Path path,
String module)
Creates an instance with the given path in the given module
|
static LogicalPath |
getInstance(String modulePlusPath)
Creates a
LogicalPath by parsing the given concatenation of
optional module name and mandatory path name. |
String |
getModule()
Returns the name of the module containing this path, if any
|
String |
getName()
Returns the display name of this
LogicalPath. |
Path |
getPath()
Returns the path component of this
LogicalPath |
String |
getPathRelativeToPom(Pom pom)
Returns the physical path of this logical path relative to the given POM
|
int |
hashCode() |
boolean |
isModuleRoot()
Indicates whether this is the root of the owning module.
|
boolean |
isProjectRoot()
Indicates whether this is the root of the entire user project.
|
String |
toString() |
public static final String MODULE_PATH_SEPARATOR
LogicalPath. This cannot be any
character that could feasibly occur in a module name or Path
name.public static final String PATH_SEPARATOR
LogicalPath.public static LogicalPath getInstance(Path path, String module)
path - the path to set (required)module - can be blank for nonenull instancepublic static LogicalPath getInstance(String modulePlusPath)
LogicalPath by parsing the given concatenation of
optional module name and mandatory path name.modulePlusPath - a string consisting of an optional module name plus
the MODULE_PATH_SEPARATOR plus the path, or more
precisely:
[module_name":"]pathpublic int compareTo(LogicalPath o)
public String getModule()
null name (might be empty)public String getName()
LogicalPath.public Path getPath()
LogicalPathnull pathpublic String getPathRelativeToPom(Pom pom)
pom - can be nullnull pathpublic boolean isModuleRoot()
public boolean isProjectRoot()
Copyright © 2009–2017 Pivotal Software, Inc.. All rights reserved.