|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.bind.ContextFinder
class ContextFinder
This class is package private and therefore is not exposed as part of the JAXB API. This code is designed to implement the JAXB 1.0 spec pluggability feature
JAXBContext
Field Summary | |
---|---|
private static java.util.logging.Logger |
logger
|
private static java.lang.String |
PLATFORM_DEFAULT_FACTORY_CLASS
When JAXB is in J2SE, rt.jar has to have a JAXB implementation. |
Constructor Summary | |
---|---|
ContextFinder()
|
Method Summary | |
---|---|
(package private) static JAXBContext |
find(java.lang.Class[] classes,
java.util.Map properties)
|
(package private) static JAXBContext |
find(java.lang.String factoryId,
java.lang.String contextPath,
java.lang.ClassLoader classLoader,
java.util.Map properties)
|
private static JAXBException |
handleClassCastException(java.lang.Class originalType,
java.lang.Class targetType)
Determine if two types (JAXBContext in this case) will generate a ClassCastException. |
private static void |
handleInvocationTargetException(java.lang.reflect.InvocationTargetException x)
If the InvocationTargetException wraps an exception that shouldn't be wrapped,
throw the wrapped exception. |
private static java.util.Properties |
loadJAXBProperties(java.lang.ClassLoader classLoader,
java.lang.String propFileName)
|
(package private) static JAXBContext |
newInstance(java.lang.Class[] classes,
java.util.Map properties,
java.lang.String className)
Create an instance of a class using the specified ClassLoader |
(package private) static JAXBContext |
newInstance(java.lang.String contextPath,
java.lang.String className,
java.lang.ClassLoader classLoader,
java.util.Map properties)
Create an instance of a class using the specified ClassLoader |
(package private) static java.net.URL |
which(java.lang.Class clazz)
Get the URL for the Class from it's ClassLoader. |
(package private) static java.net.URL |
which(java.lang.Class clazz,
java.lang.ClassLoader loader)
Search the given ClassLoader for an instance of the specified class and return a string representation of the URL that points to the resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.logging.Logger logger
private static final java.lang.String PLATFORM_DEFAULT_FACTORY_CLASS
When the user bundles his own JAXB implementation, we'd like to use it, and we want the platform default to be used only when there's no other JAXB provider.
For this reason, we have to hard-code the class name into the API.
Constructor Detail |
---|
ContextFinder()
Method Detail |
---|
private static void handleInvocationTargetException(java.lang.reflect.InvocationTargetException x) throws JAXBException
InvocationTargetException
wraps an exception that shouldn't be wrapped,
throw the wrapped exception.
JAXBException
private static JAXBException handleClassCastException(java.lang.Class originalType, java.lang.Class targetType)
originalType
- The Class object of the type being casttargetType
- The Class object of the type that is being cast to
static JAXBContext newInstance(java.lang.String contextPath, java.lang.String className, java.lang.ClassLoader classLoader, java.util.Map properties) throws JAXBException
JAXBException
static JAXBContext newInstance(java.lang.Class[] classes, java.util.Map properties, java.lang.String className) throws JAXBException
JAXBException
static JAXBContext find(java.lang.String factoryId, java.lang.String contextPath, java.lang.ClassLoader classLoader, java.util.Map properties) throws JAXBException
JAXBException
static JAXBContext find(java.lang.Class[] classes, java.util.Map properties) throws JAXBException
JAXBException
private static java.util.Properties loadJAXBProperties(java.lang.ClassLoader classLoader, java.lang.String propFileName) throws JAXBException
JAXBException
static java.net.URL which(java.lang.Class clazz, java.lang.ClassLoader loader)
clazz
- The class to search forloader
- The ClassLoader to search. If this parameter is null, then the
system class loader will be searched
static java.net.URL which(java.lang.Class clazz)
which(Class, ClassLoader)
.
Equivalent to calling: which(clazz, clazz.getClassLoader())
clazz
- The class to search for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |