org.apache.cxf.jaxb
Class JAXBUtils

java.lang.Object
  extended by org.apache.cxf.jaxb.JAXBUtils

public final class JAXBUtils
extends java.lang.Object


Nested Class Summary
static interface JAXBUtils.BridgeWrapper
           
static class JAXBUtils.IdentifierType
           
static interface JAXBUtils.JCodeModel
           
static interface JAXBUtils.JDefinedClass
           
static interface JAXBUtils.JPackage
           
static interface JAXBUtils.JType
           
static interface JAXBUtils.Mapping
           
static interface JAXBUtils.Options
           
static interface JAXBUtils.S2JJAXBModel
           
static interface JAXBUtils.SchemaCompiler
           
static interface JAXBUtils.TypeAndAnnotation
           
 
Field Summary
static java.lang.String JAXB_URI
           
 
Method Summary
static java.lang.String builtInTypeToJavaType(java.lang.String type)
           
static JAXBUtils.BridgeWrapper createBridge(java.util.Set<java.lang.Class<?>> ctxClasses, javax.xml.namespace.QName qname, java.lang.Class<?> refcls, java.lang.annotation.Annotation[] anns)
           
static java.lang.Object createFileCodeWriter(java.io.File f)
           
static javax.xml.bind.JAXBContext createRIContext(java.lang.Class<?>[] clss, java.lang.String defaultNS)
           
static JAXBUtils.SchemaCompiler createSchemaCompiler()
           
static java.lang.Class<?> getParamClass(JAXBUtils.SchemaCompiler sc, java.lang.String method)
           
static java.lang.Class<?> getValidClass(java.lang.Class<?> cls)
           
static java.lang.Class<?> holderClass(java.lang.String type)
           
static boolean isJavaKeyword(java.lang.String word)
          Checks if the specified word is a Java keyword (as of 1.5).
static java.lang.String namespaceURIToPackage(java.lang.String namespaceURI)
          Generates a Java package name from a URI according to the algorithm outlined in JAXB 2.0.
static java.lang.String nameSpaceURIToPackage(java.net.URI uri)
          Generates a Java package name from a URI according to the algorithm outlined in JAXB 2.0.
static java.lang.String nameToIdentifier(java.lang.String name, JAXBUtils.IdentifierType type)
          Converts an XML name to a Java identifier according to the mapping algorithm outlines in the JAXB specification
static void setNamespaceWrapper(java.util.Map<java.lang.String,java.lang.String> nspref, javax.xml.bind.Marshaller marshaller)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAXB_URI

public static final java.lang.String JAXB_URI
See Also:
Constant Field Values
Method Detail

builtInTypeToJavaType

public static java.lang.String builtInTypeToJavaType(java.lang.String type)

holderClass

public static java.lang.Class<?> holderClass(java.lang.String type)

isJavaKeyword

public static boolean isJavaKeyword(java.lang.String word)
Checks if the specified word is a Java keyword (as of 1.5).

Parameters:
word - the word to check.
Returns:
true if the word is a keyword.

namespaceURIToPackage

public static java.lang.String namespaceURIToPackage(java.lang.String namespaceURI)
Generates a Java package name from a URI according to the algorithm outlined in JAXB 2.0.

Parameters:
namespaceURI - the namespace URI.
Returns:
the package name.

nameSpaceURIToPackage

public static java.lang.String nameSpaceURIToPackage(java.net.URI uri)
Generates a Java package name from a URI according to the algorithm outlined in JAXB 2.0.

Parameters:
namespaceURI - the namespace URI.
Returns:
the package name.

nameToIdentifier

public static java.lang.String nameToIdentifier(java.lang.String name,
                                                JAXBUtils.IdentifierType type)
Converts an XML name to a Java identifier according to the mapping algorithm outlines in the JAXB specification

Parameters:
name - the XML name
Returns:
the Java identifier

getValidClass

public static java.lang.Class<?> getValidClass(java.lang.Class<?> cls)

createRIContext

public static javax.xml.bind.JAXBContext createRIContext(java.lang.Class<?>[] clss,
                                                         java.lang.String defaultNS)
                                                  throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

setNamespaceWrapper

public static void setNamespaceWrapper(java.util.Map<java.lang.String,java.lang.String> nspref,
                                       javax.xml.bind.Marshaller marshaller)
                                throws javax.xml.bind.PropertyException
Throws:
javax.xml.bind.PropertyException

createBridge

public static JAXBUtils.BridgeWrapper createBridge(java.util.Set<java.lang.Class<?>> ctxClasses,
                                                   javax.xml.namespace.QName qname,
                                                   java.lang.Class<?> refcls,
                                                   java.lang.annotation.Annotation[] anns)
                                            throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

createSchemaCompiler

public static JAXBUtils.SchemaCompiler createSchemaCompiler()
                                                     throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

createFileCodeWriter

public static java.lang.Object createFileCodeWriter(java.io.File f)
                                             throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

getParamClass

public static java.lang.Class<?> getParamClass(JAXBUtils.SchemaCompiler sc,
                                               java.lang.String method)


Apache CXF