public enum Path extends Enum<Path>
PathResolvers can convert these paths to and from physical locations.
| Enum Constant and Description |
|---|
ROOT
The module's root directory.
|
ROOT_ROO_CONFIG
The module's base directory for production Roo project
configuration-related resource files.
|
SPRING_CONFIG_ROOT
The module's base directory for production Spring-related resource files.
|
SRC_MAIN
Main path that will contain JAVA and RESOURCES folder
|
SRC_MAIN_JAVA
The module sub-path containing production Java source code.
|
SRC_MAIN_RES
Alternative to SRC_MAIN_RESOURCES
|
SRC_MAIN_RESOURCES
The module sub-path containing production resource files.
|
SRC_MAIN_WEBAPP
The module sub-path containing web resource files.
|
SRC_TEST_JAVA
The module sub-path containing test Java source code.
|
SRC_TEST_RESOURCES
The module sub-path containing test resource files.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultLocation()
Returns the default location of this path relative to the module's root
directory
|
PhysicalPath |
getModulePath(Pom pom)
Returns the
PhysicalPath of this Path within the module
to which the given POM belongs. |
LogicalPath |
getModulePathId(String moduleName)
Returns the
LogicalPath for this path in the given module |
String |
getPathRelativeToPom(Pom pom)
Returns the physical path of this logical
Path relative to the
given POM. |
PhysicalPath |
getRootModulePath(String projectDirectory)
Returns the
PhysicalPath of this Path within the root
module, when no POM exists to customise its location. |
boolean |
isJavaSource()
Indicates whether this path contains Java source code
|
static Path |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Path[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Path ROOT
public static final Path SPRING_CONFIG_ROOT
public static final Path ROOT_ROO_CONFIG
public static final Path SRC_MAIN
public static final Path SRC_MAIN_JAVA
public static final Path SRC_MAIN_RESOURCES
public static final Path SRC_MAIN_RES
public static final Path SRC_MAIN_WEBAPP
public static final Path SRC_TEST_JAVA
public static final Path SRC_TEST_RESOURCES
public static Path[] values()
for (Path c : Path.values()) System.out.println(c);
public static Path valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getDefaultLocation()
public PhysicalPath getModulePath(Pom pom)
PhysicalPath of this Path within the module
to which the given POM belongs.pom - the POM of the module in question (required)null instancepublic LogicalPath getModulePathId(String moduleName)
LogicalPath for this path in the given modulemoduleName - can be blank for the root or only modulenull instancepublic String getPathRelativeToPom(Pom pom)
Path relative to the
given POM. This implementation simply delegates to
getDefaultLocation(); individual enum values can override this.pom - can be nullpublic PhysicalPath getRootModulePath(String projectDirectory)
PhysicalPath of this Path within the root
module, when no POM exists to customise its location.projectDirectory - the root directory of the user projectnull instancepublic boolean isJavaSource()
false if it only contains other types of source
code, e.g. XML config files, JSPX files, property files, etc.Copyright © 2009–2017 Pivotal Software, Inc.. All rights reserved.