org.apache.cxf.common.jaxb

## Class JAXBUtils

- java.lang.Object
- - org.apache.cxf.common.jaxb.JAXBUtils

-     public final class JAXBUtils
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `JAXBUtils.BridgeWrapper`
    `static class` | `JAXBUtils.DefaultClassNameAllocator`
    `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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `JAXB_URI`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `builtInTypeToJavaType(String type)`
    `static void` | `closeUnmarshaller(Unmarshaller u)`
    `static JAXBUtils.BridgeWrapper` | `createBridge(Set<Class<?>> ctxClasses, QName qname, Class<?> refcls, Annotation[] anns)`
    `static Object` | `createFileCodeWriter(File f)`
    `static Object` | `createFileCodeWriter(File f, String encoding)`
    `static JAXBContextProxy` | `createJAXBContextProxy(JAXBContext ctx)`
    `static JAXBContextProxy` | `createJAXBContextProxy(JAXBContext ctx, SchemaCollection collection, String defaultNs)`
    `static Object` | `createMininumEscapeHandler(Class<?> cls)`
    `static Object` | `createNoEscapeHandler(Class<?> cls)`
    `static JAXBUtils.SchemaCompiler` | `createSchemaCompiler()`
    `static JAXBUtils.SchemaCompiler` | `createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet)`
    `static List<DOMResult>` | `generateJaxbSchemas(JAXBContext context, Map<String,DOMResult> builtIns)`
    `static JAXBBeanInfo` | `getBeanInfo(JAXBContextProxy context, Class<?> cls)`
    `static List<String>` | `getGeneratedClassNames(JAXBUtils.JCodeModel codeModel)`
    `static String` | `getPackageNamespace(Class<?> cls)`
    `static Class<?>` | `getParamClass(JAXBUtils.SchemaCompiler sc, String method)`
    `static Class<?>` | `getValidClass(Class<?> cls)`
    `static Class<?>` | `holderClass(String type)`
    `protected static boolean` | `isJavaKeyword(String word)` Checks if the specified word is a Java keyword (as defined in JavaUtils).
    `static boolean` | `isJAXB22()`
    `static void` | `logGeneratedClassNames(Logger logger, JAXBUtils.JCodeModel codeModel)`
    `static String` | `namespaceURIToPackage(String namespaceURI)` Generates a Java package name from a URI according to the algorithm outlined in JAXB 2.0.
    `static String` | `nameSpaceURIToPackage(URI uri)` Generates a Java package name from a URI according to the algorithm outlined in Appendix D of JAXB (2.0+).
    `static String` | `nameToIdentifier(String name, JAXBUtils.IdentifierType type)` Converts an XML name to a Java identifier according to the mapping algorithm outlined in the JAXB specification
    `static void` | `scanPackages(Set<Class<?>> classes, Class<?>[] extraClass, Map<Package,CachedClass> objectFactoryCache)`
    `static void` | `scanPackages(Set<Class<?>> classes, Map<Package,CachedClass> objectFactoryCache)`
    `static void` | `setEscapeHandler(Marshaller marshaller, Object escapeHandler)`
    `static void` | `setMinimumEscapeHandler(Marshaller marshaller)`
    `static Object` | `setNamespaceMapper(Map<String,String> nspref, Marshaller marshaller)`
    `static void` | `setNoEscapeHandler(Marshaller marshaller)`
    `static Object` | `unmarshall(JAXBContext c, Element e)`
    `static <T> JAXBElement<T>` | `unmarshall(JAXBContext c, Element e, Class<T> cls)`
    `static Object` | `unmarshall(JAXBContext c, Source s)`
    `static Object` | `unmarshall(JAXBContext c, XMLStreamReader reader)`
    `static <T> JAXBElement<T>` | `unmarshall(JAXBContext c, XMLStreamReader reader, Class<T> cls)`

    - ### 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 String JAXB_URI

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### closeUnmarshaller

          public static void closeUnmarshaller(Unmarshaller u)

    - #### unmarshall

          public static Object unmarshall(JAXBContext c,
                                          Element e)
                                   throws JAXBException

      Throws:
        `JAXBException`

    - #### unmarshall

          public static <T> JAXBElement<T> unmarshall(JAXBContext c,
                                                      Element e,
                                                      Class<T> cls)
                                               throws JAXBException

      Throws:
        `JAXBException`

    - #### unmarshall

          public static Object unmarshall(JAXBContext c,
                                          Source s)
                                   throws JAXBException

      Throws:
        `JAXBException`

    - #### unmarshall

          public static <T> JAXBElement<T> unmarshall(JAXBContext c,
                                                      XMLStreamReader reader,
                                                      Class<T> cls)
                                               throws JAXBException

      Throws:
        `JAXBException`

    - #### unmarshall

          public static Object unmarshall(JAXBContext c,
                                          XMLStreamReader reader)
                                   throws JAXBException

      Throws:
        `JAXBException`

    - #### builtInTypeToJavaType

          public static String builtInTypeToJavaType(String type)

    - #### holderClass

          public static Class<?> holderClass(String type)

    - #### isJavaKeyword

          protected static boolean isJavaKeyword(String word)

      Checks if the specified word is a Java keyword (as defined in JavaUtils).
      Parameters:
        `word` - the word to check.
      Returns:
        true if the word is a keyword.
      See Also:
        `JavaUtils`

    - #### namespaceURIToPackage

          public static String namespaceURIToPackage(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 String nameSpaceURIToPackage(URI uri)

      Generates a Java package name from a URI according to the algorithm outlined in Appendix D of JAXB (2.0+).
      Parameters:
        `uri` - the namespace URI.
      Returns:
        the package name.

    - #### nameToIdentifier

          public static String nameToIdentifier(String name,
                                                JAXBUtils.IdentifierType type)

      Converts an XML name to a Java identifier according to the mapping algorithm outlined in the JAXB specification
      Parameters:
        `name` - the XML name
      Returns:
        the Java identifier

    - #### getValidClass

          public static Class<?> getValidClass(Class<?> cls)

    - #### setNamespaceMapper

          public static Object setNamespaceMapper(Map<String,String> nspref,
                                                  Marshaller marshaller)
                                           throws PropertyException

      Throws:
        `PropertyException`

    - #### createBridge

          public static JAXBUtils.BridgeWrapper createBridge(Set<Class<?>> ctxClasses,
                                                             QName qname,
                                                             Class<?> refcls,
                                                             Annotation[] anns)
                                                      throws JAXBException

      Throws:
        `JAXBException`

    - #### createSchemaCompiler

          public static JAXBUtils.SchemaCompiler createSchemaCompiler()
                                                               throws JAXBException

      Throws:
        `JAXBException`

    - #### createSchemaCompilerWithDefaultAllocator

          public static JAXBUtils.SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet)

    - #### logGeneratedClassNames

          public static void logGeneratedClassNames(Logger logger,
                                                    JAXBUtils.JCodeModel codeModel)

    - #### getGeneratedClassNames

          public static List<String> getGeneratedClassNames(JAXBUtils.JCodeModel codeModel)

    - #### createFileCodeWriter

          public static Object createFileCodeWriter(File f)
                                             throws JAXBException

      Throws:
        `JAXBException`

    - #### createFileCodeWriter

          public static Object createFileCodeWriter(File f,
                                                    String encoding)
                                             throws JAXBException

      Throws:
        `JAXBException`

    - #### getParamClass

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

    - #### generateJaxbSchemas

          public static List<DOMResult> generateJaxbSchemas(JAXBContext context,
                                                            Map<String,DOMResult> builtIns)
                                                     throws IOException

      Throws:
        `IOException`

    - #### getPackageNamespace

          public static String getPackageNamespace(Class<?> cls)

    - #### scanPackages

          public static void scanPackages(Set<Class<?>> classes,
                                          Map<Package,CachedClass> objectFactoryCache)

    - #### scanPackages

          public static void scanPackages(Set<Class<?>> classes,
                                          Class<?>[] extraClass,
                                          Map<Package,CachedClass> objectFactoryCache)

    - #### isJAXB22

          public static boolean isJAXB22()

    - #### createJAXBContextProxy

          public static JAXBContextProxy createJAXBContextProxy(JAXBContext ctx)

    - #### createJAXBContextProxy

          public static JAXBContextProxy createJAXBContextProxy(JAXBContext ctx,
                                                                SchemaCollection collection,
                                                                String defaultNs)

    - #### getBeanInfo

          public static JAXBBeanInfo getBeanInfo(JAXBContextProxy context,
                                                 Class<?> cls)

    - #### setMinimumEscapeHandler

          public static void setMinimumEscapeHandler(Marshaller marshaller)

    - #### setNoEscapeHandler

          public static void setNoEscapeHandler(Marshaller marshaller)

    - #### setEscapeHandler

          public static void setEscapeHandler(Marshaller marshaller,
                                              Object escapeHandler)

    - #### createMininumEscapeHandler

          public static Object createMininumEscapeHandler(Class<?> cls)

    - #### createNoEscapeHandler

          public static Object createNoEscapeHandler(Class<?> cls)

Apache CXF