public class RootPackages
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
mappings |
protected java.util.Map<java.lang.String,java.lang.String> |
packagePaths |
protected java.lang.String[] |
packages |
Constructor and Description |
---|
RootPackages() |
Modifier and Type | Method and Description |
---|---|
void |
addRootPackage(java.lang.String rootPackage)
Adds root package with no additional mapping.
|
void |
addRootPackage(java.lang.String rootPackage,
java.lang.String mapping)
Adds root package and its path mapping.
|
void |
addRootPackageOf(java.lang.Class actionClass)
Sets root package to package of given class.
|
void |
addRootPackageOf(java.lang.Class actionClass,
java.lang.String mapping)
Sets root package to package of given class.
|
java.lang.String |
findPackagePathForActionPackage(java.lang.String actionPackage)
Finds mapping for given action class.
|
java.lang.String |
findRootPackageForActionPath(java.lang.String actionPath)
Finds closest root package for the given action path.
|
java.lang.String |
toString() |
protected java.lang.String[] packages
protected java.lang.String[] mappings
protected java.util.Map<java.lang.String,java.lang.String> packagePaths
public void addRootPackage(java.lang.String rootPackage)
public void addRootPackageOf(java.lang.Class actionClass)
public void addRootPackage(java.lang.String rootPackage, java.lang.String mapping)
public void addRootPackageOf(java.lang.Class actionClass, java.lang.String mapping)
public java.lang.String findRootPackageForActionPath(java.lang.String actionPath)
public java.lang.String findPackagePathForActionPackage(java.lang.String actionPackage)
null
if no mapping is found. If there is more then one matching root
package, the closest one will be returned.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2003-present Jodd Team