public interface ParserContext
Modifier and Type | Method and Description |
---|---|
<T extends org.osgi.service.blueprint.reflect.Metadata> |
createMetadata(Class<T> type)
Create a new metadata instance of the given type.
|
String |
generateId()
Generate a unique id following the same scheme that the blueprint container
uses internally
|
ComponentDefinitionRegistry |
getComponentDefinitionRegistry() |
String |
getDefaultActivation()
Get the default activation setting for the current blueprint file
|
String |
getDefaultAvailability()
Get the default availability setting for the current blueprint file
|
String |
getDefaultTimeout()
Get the default timeout setting for the current blueprint file
|
org.osgi.service.blueprint.reflect.ComponentMetadata |
getEnclosingComponent()
Retrieve the
ComponentMetadata of the component that
encloses the current Node that is to be parsed by a
namespace handler. |
NamespaceHandler |
getNamespaceHandler(URI namespaceUri)
Retrieve the namespace handler for the given uri
|
Node |
getSourceNode()
Returns the DOM Node that was passed to the NamespaceHandler call for which
this ParserContext instance was created.
|
<T> T |
parseElement(Class<T> type,
org.osgi.service.blueprint.reflect.ComponentMetadata enclosingComponent,
Element element)
Invoke the blueprint parser to parse a DOM element.
|
Node getSourceNode()
ComponentDefinitionRegistry getComponentDefinitionRegistry()
org.osgi.service.blueprint.reflect.ComponentMetadata getEnclosingComponent()
ComponentMetadata
of the component that
encloses the current Node
that is to be parsed by a
namespace handler.
In case of top-level components this method will return null
.<T extends org.osgi.service.blueprint.reflect.Metadata> T createMetadata(Class<T> type)
MutableComponentMetadata
interface, so as to allow the caller to set the properties of the
metadata.
Note that the returned object may not be initialised, so callers
should take care to assure every property needed by the blueprint
extender is set.T
- The expected Metadata type to be createdtype
- the class of the Metadata object to create<T> T parseElement(Class<T> type, org.osgi.service.blueprint.reflect.ComponentMetadata enclosingComponent, Element element)
T
- The expected metadata type to be parsedtype
- the class of the Metadata type to be parsedenclosingComponent
- The component metadata that contains the Element
to be parsedelement
- The DOM element that is to be parsedString generateId()
String getDefaultActivation()
String getDefaultAvailability()
String getDefaultTimeout()
NamespaceHandler getNamespaceHandler(URI namespaceUri)
Copyright © 2016. All rights reserved.