Top Description Inners Fields Constructors Methods
com.ctc.wstx.compat

public final Class QNameCreator

extends Object
Class Inheritance
Imports
java.util.logging.Logger, javax.xml.namespace.QName

Helper class used to solve [WSTX-174]: some older AppServers were shipped with incompatible version of QName class, which is missing the 3 argument constructor. To address this, we'll use bit of ClassLoader hacker to gracefully (?) downgrade to using 2 arg alternatives if necessary.

Note

choice of java.util.logging logging is only based on the fact that it is guaranteed to be present (we have JDK 1.4 baseline requirement) so that we do not add external dependencies. It is not a recommendation for using JUL per se; most users would do well to just use slf4j or log4j directly instead.

Author
Tatu Saloranta
Since
3.2.8

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
QNameCreator.Helper

Helper class used to encapsulate calls to the missing method.

Field Summary

Modifier and TypeField and Description
private static final QNameCreator.Helper
_helper

Creator object that creates QNames using proper 3-arg constructor.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static QName
create(String uri, String localName, String prefix)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_helperback to summary
private static final QNameCreator.Helper _helper

Creator object that creates QNames using proper 3-arg constructor. If dynamic class loading fails

Constructor Detail

QNameCreatorback to summary
public QNameCreator()

Method Detail

createback to summary
public static QName create(String uri, String localName, String prefix)
com.ctc.wstx.compat back to summary

private final Class QNameCreator.Helper

extends Object
Class Inheritance

Helper class used to encapsulate calls to the missing method.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public QName
create(String localName, String nsURI, String prefix)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Helperback to summary
public Helper()

Method Detail

createback to summary
public QName create(String localName, String nsURI, String prefix)