public final class Packages extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
absolutePath(Class<?> p,
String relativePath)
Takes a package and a relative path to a resource and returns an absolute path to the
resource.
|
static String |
absolutePath(Package p,
String relativePath)
Takes a package and a relative path to a resource and returns an absolute path to the
resource.
|
static String |
absolutePath(String packageName,
String relativePath)
Takes a package and a relative path to a resource and returns an absolute path to the
resource.
|
static String |
extractPackageName(Class<?> forClass)
Determines the package name for the given class.
|
static String |
parent(String packageName)
Gets the parent package name.
|
static String |
resolveScope(Class<?> forClass)
Resolve scope for the given class by extracting it's package name and converting all dots to
slashes.
|
public static String absolutePath(Class<?> p, String relativePath)
p - The package to start atrelativePath - The relative path to the classpublic static String absolutePath(Package p, String relativePath)
p - The package to start atrelativePath - The relative path to the classpublic static String absolutePath(String packageName, String relativePath)
packageName - The package to start atrelativePath - The relative path to the classpublic static String extractPackageName(Class<?> forClass)
forClass - the classpublic static String parent(String packageName)
packageName - The Package nameCopyright © 2006-2012 Apache Software Foundation. All Rights Reserved.