public class ParserContextImpl extends java.lang.Object implements ParserContext
| Constructor and Description |
|---|
ParserContextImpl(Parser parser,
ComponentDefinitionRegistry componentDefinitionRegistry,
ComponentMetadata enclosingComponent,
org.w3c.dom.Node sourceNode) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Metadata> |
createMetadata(java.lang.Class<T> type)
Create a new metadata instance of the given type.
|
java.lang.String |
generateId()
Generate a unique id following the same scheme that the blueprint container
uses internally
|
ComponentDefinitionRegistry |
getComponentDefinitionRegistry() |
java.lang.String |
getDefaultActivation()
Get the default activation setting for the current blueprint file
|
java.lang.String |
getDefaultAvailability()
Get the default availability setting for the current blueprint file
|
java.lang.String |
getDefaultTimeout()
Get the default timeout setting for the current blueprint file
|
ComponentMetadata |
getEnclosingComponent()
Retrieve the
ComponentMetadata of the component that
encloses the current Node that is to be parsed by a
namespace handler. |
Parser |
getParser() |
org.w3c.dom.Node |
getSourceNode()
Returns the DOM Node that was passed to the NamespaceHandler call for which
this ParserContext instance was created.
|
<T> T |
parseElement(java.lang.Class<T> type,
ComponentMetadata enclosingComponent,
org.w3c.dom.Element element)
Invoke the blueprint parser to parse a DOM element.
|
public ParserContextImpl(Parser parser, ComponentDefinitionRegistry componentDefinitionRegistry, ComponentMetadata enclosingComponent, org.w3c.dom.Node sourceNode)
public ComponentDefinitionRegistry getComponentDefinitionRegistry()
getComponentDefinitionRegistry in interface ParserContextpublic ComponentMetadata getEnclosingComponent()
ParserContextComponentMetadata 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.getEnclosingComponent in interface ParserContextpublic org.w3c.dom.Node getSourceNode()
ParserContextgetSourceNode in interface ParserContextpublic <T extends Metadata> T createMetadata(java.lang.Class<T> type)
ParserContextMutableComponentMetadata
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.createMetadata in interface ParserContextT - The expected Metadata type to be createdtype - the class of the Metadata object to createpublic <T> T parseElement(java.lang.Class<T> type,
ComponentMetadata enclosingComponent,
org.w3c.dom.Element element)
ParserContextparseElement in interface ParserContextT - 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 parsedpublic Parser getParser()
public java.lang.String generateId()
ParserContextgenerateId in interface ParserContextpublic java.lang.String getDefaultActivation()
ParserContextgetDefaultActivation in interface ParserContextpublic java.lang.String getDefaultAvailability()
ParserContextgetDefaultAvailability in interface ParserContextpublic java.lang.String getDefaultTimeout()
ParserContextgetDefaultTimeout in interface ParserContextCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.