Package org.apache.cxf.common.jaxb
Class JAXBUtils
- java.lang.Object
- 
- org.apache.cxf.common.jaxb.JAXBUtils
 
- 
 public final class JAXBUtils extends Object 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceJAXBUtils.BridgeWrapperstatic classJAXBUtils.DefaultClassNameAllocatorstatic classJAXBUtils.IdentifierTypestatic interfaceJAXBUtils.JCodeModelstatic interfaceJAXBUtils.JDefinedClassstatic interfaceJAXBUtils.JPackagestatic interfaceJAXBUtils.JTypestatic interfaceJAXBUtils.Mappingstatic interfaceJAXBUtils.Optionsstatic interfaceJAXBUtils.S2JJAXBModelstatic interfaceJAXBUtils.SchemaCompilerstatic interfaceJAXBUtils.TypeAndAnnotation
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbuiltInTypeToJavaType(String type)static voidcloseUnmarshaller(javax.xml.bind.Unmarshaller u)static JAXBUtils.BridgeWrappercreateBridge(Set<Class<?>> ctxClasses, QName qname, Class<?> refcls, Annotation[] anns)static ObjectcreateFileCodeWriter(File f)static ObjectcreateFileCodeWriter(File f, String encoding)static JAXBContextProxycreateJAXBContextProxy(javax.xml.bind.JAXBContext ctx)static JAXBContextProxycreateJAXBContextProxy(javax.xml.bind.JAXBContext ctx, SchemaCollection collection, String defaultNs)static ObjectcreateMininumEscapeHandler(Class<?> cls)static ObjectcreateNoEscapeHandler(Class<?> cls)static JAXBUtils.SchemaCompilercreateSchemaCompiler()static JAXBUtils.SchemaCompilercreateSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet)static List<DOMResult>generateJaxbSchemas(javax.xml.bind.JAXBContext context, Map<String,DOMResult> builtIns)static JAXBBeanInfogetBeanInfo(JAXBContextProxy context, Class<?> cls)static List<String>getGeneratedClassNames(JAXBUtils.JCodeModel codeModel)static StringgetPackageNamespace(Class<?> cls)static Class<?>getParamClass(JAXBUtils.SchemaCompiler sc, String method)static Class<?>getValidClass(Class<?> cls)static Class<?>holderClass(String type)protected static booleanisJavaKeyword(String word)Checks if the specified word is a Java keyword (as defined in JavaUtils).static booleanisJAXB22()static voidlogGeneratedClassNames(Logger logger, JAXBUtils.JCodeModel codeModel)static StringnamespaceURIToPackage(String namespaceURI)Generates a Java package name from a URI according to the algorithm outlined in JAXB 2.0.static StringnameSpaceURIToPackage(URI uri)Generates a Java package name from a URI according to the algorithm outlined in Appendix D of JAXB (2.0+).static StringnameToIdentifier(String name, JAXBUtils.IdentifierType type)Converts an XML name to a Java identifier according to the mapping algorithm outlined in the JAXB specificationstatic voidscanPackages(Set<Class<?>> classes, Class<?>[] extraClass, Map<Package,CachedClass> objectFactoryCache)static voidscanPackages(Set<Class<?>> classes, Map<Package,CachedClass> objectFactoryCache)static voidsetEscapeHandler(javax.xml.bind.Marshaller marshaller, Object escapeHandler)static voidsetMinimumEscapeHandler(javax.xml.bind.Marshaller marshaller)static ObjectsetNamespaceMapper(Bus bus, Map<String,String> nspref, javax.xml.bind.Marshaller marshaller)static voidsetNoEscapeHandler(javax.xml.bind.Marshaller marshaller)static Objectunmarshall(javax.xml.bind.JAXBContext c, XMLStreamReader reader)static <T> javax.xml.bind.JAXBElement<T>unmarshall(javax.xml.bind.JAXBContext c, XMLStreamReader reader, Class<T> cls)static Objectunmarshall(javax.xml.bind.JAXBContext c, Source s)static Objectunmarshall(javax.xml.bind.JAXBContext c, Element e)static <T> javax.xml.bind.JAXBElement<T>unmarshall(javax.xml.bind.JAXBContext c, Element e, Class<T> cls)
 
- 
- 
- 
Field Detail- 
JAXB_URIpublic static final String JAXB_URI - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
closeUnmarshallerpublic static void closeUnmarshaller(javax.xml.bind.Unmarshaller u) 
 - 
unmarshallpublic static Object unmarshall(javax.xml.bind.JAXBContext c, Element e) throws javax.xml.bind.JAXBException - Throws:
- javax.xml.bind.JAXBException
 
 - 
unmarshallpublic static <T> javax.xml.bind.JAXBElement<T> unmarshall(javax.xml.bind.JAXBContext c, Element e, Class<T> cls) throws javax.xml.bind.JAXBException- Throws:
- javax.xml.bind.JAXBException
 
 - 
unmarshallpublic static Object unmarshall(javax.xml.bind.JAXBContext c, Source s) throws javax.xml.bind.JAXBException - Throws:
- javax.xml.bind.JAXBException
 
 - 
unmarshallpublic static <T> javax.xml.bind.JAXBElement<T> unmarshall(javax.xml.bind.JAXBContext c, XMLStreamReader reader, Class<T> cls) throws javax.xml.bind.JAXBException- Throws:
- javax.xml.bind.JAXBException
 
 - 
unmarshallpublic static Object unmarshall(javax.xml.bind.JAXBContext c, XMLStreamReader reader) throws javax.xml.bind.JAXBException - Throws:
- javax.xml.bind.JAXBException
 
 - 
isJavaKeywordprotected 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
 
 - 
namespaceURIToPackagepublic 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.
 
 - 
nameSpaceURIToPackagepublic 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.
 
 - 
nameToIdentifierpublic 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
 
 - 
setNamespaceMapperpublic static Object setNamespaceMapper(Bus bus, Map<String,String> nspref, javax.xml.bind.Marshaller marshaller) throws javax.xml.bind.PropertyException - Throws:
- javax.xml.bind.PropertyException
 
 - 
createBridgepublic static JAXBUtils.BridgeWrapper createBridge(Set<Class<?>> ctxClasses, QName qname, Class<?> refcls, Annotation[] anns) throws javax.xml.bind.JAXBException - Throws:
- javax.xml.bind.JAXBException
 
 - 
createSchemaCompilerpublic static JAXBUtils.SchemaCompiler createSchemaCompiler() throws javax.xml.bind.JAXBException - Throws:
- javax.xml.bind.JAXBException
 
 - 
createSchemaCompilerWithDefaultAllocatorpublic static JAXBUtils.SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) 
 - 
logGeneratedClassNamespublic static void logGeneratedClassNames(Logger logger, JAXBUtils.JCodeModel codeModel) 
 - 
getGeneratedClassNamespublic static List<String> getGeneratedClassNames(JAXBUtils.JCodeModel codeModel) 
 - 
createFileCodeWriterpublic static Object createFileCodeWriter(File f) throws javax.xml.bind.JAXBException - Throws:
- javax.xml.bind.JAXBException
 
 - 
createFileCodeWriterpublic static Object createFileCodeWriter(File f, String encoding) throws javax.xml.bind.JAXBException - Throws:
- javax.xml.bind.JAXBException
 
 - 
getParamClasspublic static Class<?> getParamClass(JAXBUtils.SchemaCompiler sc, String method) 
 - 
generateJaxbSchemaspublic static List<DOMResult> generateJaxbSchemas(javax.xml.bind.JAXBContext context, Map<String,DOMResult> builtIns) throws IOException - Throws:
- IOException
 
 - 
scanPackagespublic static void scanPackages(Set<Class<?>> classes, Map<Package,CachedClass> objectFactoryCache) 
 - 
scanPackagespublic static void scanPackages(Set<Class<?>> classes, Class<?>[] extraClass, Map<Package,CachedClass> objectFactoryCache) 
 - 
isJAXB22public static boolean isJAXB22() 
 - 
createJAXBContextProxypublic static JAXBContextProxy createJAXBContextProxy(javax.xml.bind.JAXBContext ctx) 
 - 
createJAXBContextProxypublic static JAXBContextProxy createJAXBContextProxy(javax.xml.bind.JAXBContext ctx, SchemaCollection collection, String defaultNs) 
 - 
getBeanInfopublic static JAXBBeanInfo getBeanInfo(JAXBContextProxy context, Class<?> cls) 
 - 
setMinimumEscapeHandlerpublic static void setMinimumEscapeHandler(javax.xml.bind.Marshaller marshaller) 
 - 
setNoEscapeHandlerpublic static void setNoEscapeHandler(javax.xml.bind.Marshaller marshaller) 
 - 
setEscapeHandlerpublic static void setEscapeHandler(javax.xml.bind.Marshaller marshaller, Object escapeHandler)
 
- 
 
-