@Singleton @Visibility(value=LOCAL) public class XmlServiceImpl extends Object implements XmlService
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG_PARSING |
DEFAULT_NAMESPACE| Constructor and Description |
|---|
XmlServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
createBean(Class<T> beanInterface)
This creates an instance of the given bean type
of with no fields of the bean filled
in.
|
<T> XmlRootHandle<T> |
createEmptyHandle(Class<T> jaxbAnnotationInterface)
This creates an empty handle (root will initially be null) corresponding to
the given interface class
|
<T> XmlRootHandle<T> |
createEmptyHandle(Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub)
This creates an empty handle (root will initially be null) corresponding to
the given interface class
|
ClassReflectionHelper |
getClassReflectionHelper() |
Map<String,String> |
getPackageNamespace(Class<?> clazz) |
XmlServiceParser |
getParser() |
ServiceLocator |
getServiceLocator() |
<T> void |
marshal(OutputStream outputStream,
XmlRootHandle<T> rootHandle)
Will marshal the given tree into the given stream.
|
<T> void |
marshal(OutputStream outputStream,
XmlRootHandle<T> rootHandle,
Map<String,Object> options)
Will marshal the given tree into the given stream.
|
<T> XmlRootHandle<T> |
unmarshal(InputStream input,
Class<T> jaxbAnnotatedInterface)
Unmarshals an XML stream using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(InputStream input,
Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub)
Unmarshals an XML stream using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(InputStream input,
Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub,
Map<String,Object> options)
Unmarshals an XML stream using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(URI uri,
Class<T> jaxbAnnotatedClassOrInterface)
Unmarshalls the given URI using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(URI uri,
Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub)
Unmarshalls the given URI using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(URI uri,
Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub,
Map<String,Object> options)
Unmarshalls the given URI using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(XMLStreamReader reader,
Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub)
Unmarshals an XML stream using the jaxb annotated interface.
|
<T> XmlRootHandle<T> |
unmarshal(XMLStreamReader reader,
Class<T> jaxbAnnotatedInterface,
boolean advertiseInRegistry,
boolean advertiseInHub,
Map<String,Object> options)
Unmarshals an XML stream using the jaxb annotated interface.
|
public <T> XmlRootHandle<T> unmarshal(URI uri, Class<T> jaxbAnnotatedClassOrInterface)
XmlServiceXmlServiceParser
to parse the file.unmarshal in interface XmlServiceuri - The non-null URI whereby to find the xml corresponding to the classpublic <T> XmlRootHandle<T> unmarshal(InputStream input, Class<T> jaxbAnnotatedInterface)
XmlServiceXmlServiceParser
to parse the file.
The beans will be included in the service registry and the configuration
hub as appropriateunmarshal in interface XmlServiceinput - The non-null input stream to read. Will not close this streampublic <T> XmlRootHandle<T> unmarshal(URI uri, Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub)
XmlServiceXmlServiceParser
to parse the file.unmarshal in interface XmlServiceuri - The non-null URI whereby to find the xml corresponding to the classadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)public <T> XmlRootHandle<T> unmarshal(URI uri, Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub, Map<String,Object> options)
XmlServiceXmlServiceParser
to parse the file.unmarshal in interface XmlServiceuri - The non-null URI whereby to find the xml corresponding to the classadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)options - optional (possibly null) options from the callerpublic <T> XmlRootHandle<T> unmarshal(XMLStreamReader reader, Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub)
XmlServiceunmarshal in interface XmlServicereader - The non-null XMLStreamReader representing the XML to be readadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)public <T> XmlRootHandle<T> unmarshal(XMLStreamReader reader, Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub, Map<String,Object> options)
XmlServiceunmarshal in interface XmlServicereader - The non-null XMLStreamReader representing the XML to be readadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)options - optional (possibly null) options from the callerpublic <T> XmlRootHandle<T> unmarshal(InputStream input, Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub)
XmlServiceXmlServiceParser
to parse the file.unmarshal in interface XmlServiceinput - The non-null input stream to read. Will not close this streamadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)public <T> XmlRootHandle<T> unmarshal(InputStream input, Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub, Map<String,Object> options)
XmlServiceXmlServiceParser
to parse the file.unmarshal in interface XmlServiceinput - The non-null input stream to read. Will not close this streamadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)options - optional (possibly null) options from the callerpublic <T> XmlRootHandle<T> createEmptyHandle(Class<T> jaxbAnnotatedInterface, boolean advertiseInRegistry, boolean advertiseInHub)
XmlServicecreateEmptyHandle in interface XmlServicejaxbAnnotatedInterface - The non-null interface class corresponding to
the XML to be parsedadvertiseInRegistry - if true the entire tree of parsed xml will be added to the
ServiceLocatoradvertiseInHub - if true the entire tree of parsed xml will be added to the
HK2 configuration Hub (as bean-like maps)public <T> XmlRootHandle<T> createEmptyHandle(Class<T> jaxbAnnotationInterface)
XmlServicecreateEmptyHandle in interface XmlServicejaxbAnnotationInterface - The non-null interface class corresponding to
the XML to be parsedpublic <T> T createBean(Class<T> beanInterface)
XmlServicecreateBean in interface XmlServicepublic <T> void marshal(OutputStream outputStream, XmlRootHandle<T> rootHandle) throws IOException
XmlServicemarshal in interface XmlServiceoutputStream - A non-closed output stream. This method will
not close the output streamrootHandle - A non-null root handle that may or may not
have been created with this XmlService implementationIOException - On any exception that might happenpublic <T> void marshal(OutputStream outputStream, XmlRootHandle<T> rootHandle, Map<String,Object> options) throws IOException
XmlServicemarshal in interface XmlServiceoutputStream - A non-closed output stream. This method will
not close the output streamrootHandle - A non-null root handle that may or may not
have been created with this XmlService implementationoptions - optional (possibly null) options from the callerIOException - On any exception that might happenpublic ClassReflectionHelper getClassReflectionHelper()
public ServiceLocator getServiceLocator()
public XmlServiceParser getParser()
Copyright © 2009–2019 Oracle Corporation. All rights reserved.