Methods Summary |
---|
public static oracle.toplink.essentials.platform.xml.XMLPlatformFactory | getInstance()INTERNAL:
Return the singleton instance of XMLPlatformContext.
if (null == instance) {
instance = new XMLPlatformFactory();
}
return instance;
|
public oracle.toplink.essentials.platform.xml.XMLPlatform | getXMLPlatform()INTERNAL:
Return the XMLPlatform based on the toplink.xml.platform System property.
try {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
return (XMLPlatform)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(getXMLPlatformClass()));
} catch (PrivilegedActionException exception) {
Exception throwableException = exception.getException();
if (throwableException instanceof InstantiationException) {
throw XMLPlatformException.xmlPlatformCouldNotInstantiate(getXMLPlatformClass().getName(), throwableException);
} else {
throw XMLPlatformException.xmlPlatformCouldNotInstantiate(getXMLPlatformClass().getName(), throwableException);
}
}
} else {
return (XMLPlatform)PrivilegedAccessHelper.newInstanceFromClass(getXMLPlatformClass());
}
} catch (IllegalAccessException e) {
throw XMLPlatformException.xmlPlatformCouldNotInstantiate(getXMLPlatformClass().getName(), e);
} catch (InstantiationException e) {
throw XMLPlatformException.xmlPlatformCouldNotInstantiate(getXMLPlatformClass().getName(), e);
}
|
public java.lang.Class | getXMLPlatformClass()INTERNAL:
Return the implementation class for the XMLPlatform.
if (null != xmlPlatformClass) {
return xmlPlatformClass;
}
String newXMLPlatformClassName = System.getProperty(XML_PLATFORM_PROPERTY);
if (null == newXMLPlatformClassName) {
newXMLPlatformClassName = JAXP_PLATFORM_CLASS_NAME;
}
try {
ClassLoader classLoader = null;
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try{
classLoader = (ClassLoader)AccessController.doPrivileged(new PrivilegedGetClassLoaderForClass(this.getClass()));
} catch (PrivilegedActionException exc){
// will not be thrown
}
} else {
classLoader = PrivilegedAccessHelper.getClassLoaderForClass(this.getClass());
}
// ClassLoader classLoader = ClassLoader.getSystemClassLoader();
// ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
Class newXMLPlatformClass = classLoader.loadClass(newXMLPlatformClassName);
setXMLPlatformClass(newXMLPlatformClass);
return xmlPlatformClass;
} catch (ClassNotFoundException e) {
throw XMLPlatformException.xmlPlatformClassNotFound(newXMLPlatformClassName, e);
}
|
public void | setXMLPlatformClass(java.lang.Class xmlPlatformClass)PUBLIC:
Set the implementation of XMLPlatform.
this.xmlPlatformClass = xmlPlatformClass;
|