|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.xml.util.resolvers.ResolveHelpers
public final class ResolveHelpers
Some helpers used by the resolver commands. This is a utility class which is NOT meant to be instantiated.
| Method Summary | |
|---|---|
static ClassLoader |
getClassLoader(ClassLoader loader)
Gets the ClassLoader that's actually to be used (e.g. for
loading resources). |
static String |
getPackageName(String className)
Gets the package name of the given class name. |
static String |
getQualifiedFileName(String fileName,
String packageName)
Qualifies the given fileName with the given
packageName and returns the resulting file path. |
static Class |
loadClass(ClassLoader classLoader,
String className)
Capsulates the ClassLoader.loadClass method to throw no exceptions but return null instead. |
static boolean |
namespaceEquals(String ns1,
String ns2)
Compares the two strings for equality. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getQualifiedFileName(String fileName,
String packageName)
fileName with the given
packageName and returns the resulting file path.packageName is null or a zero-length
String, this method will return fileName.
fileName - The file name to be qualified.packageName - The package name to be used for qualifying.
public static String getPackageName(String className)
className - The class name to retrieve the package name from.
className
is null or does not contain a package.
public static boolean namespaceEquals(String ns1,
String ns2)
public static ClassLoader getClassLoader(ClassLoader loader)
ClassLoader that's actually to be used (e.g. for
loading resources).ClassLoader is determined in the following way:
null, it
is used.
null,
it is used.
loader - The "preferred" ClassLoader.
public static Class loadClass(ClassLoader classLoader,
String className)
classLoader - the class loader to useclassName - the class to load
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||