|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.aries.blueprint.parser.ParserContextImpl
public class ParserContextImpl
A simple ParserContext implementation. This class is supposed to be short lived and only used for calling a given namespace handler.
| Constructor Summary | |
|---|---|
ParserContextImpl(Parser parser,
ComponentDefinitionRegistry componentDefinitionRegistry,
ComponentMetadata enclosingComponent,
Node sourceNode)
|
|
| Method Summary | ||
|---|---|---|
|
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 |
|
ComponentMetadata |
getEnclosingComponent()
Retrieve the ComponentMetadata of the component that
encloses the current Node that is to be parsed by a
namespace handler. |
|
Parser |
getParser()
|
|
Node |
getSourceNode()
Returns the DOM Node that was passed to the NamespaceHandler call for which this ParserContext instance was created. |
|
|
parseElement(Class<T> type,
ComponentMetadata enclosingComponent,
Element element)
Invoke the blueprint parser to parse a DOM element. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ParserContextImpl(Parser parser,
ComponentDefinitionRegistry componentDefinitionRegistry,
ComponentMetadata enclosingComponent,
Node sourceNode)
| Method Detail |
|---|
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 Node getSourceNode()
ParserContext
getSourceNode in interface ParserContextpublic <T extends Metadata> T createMetadata(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 create
public <T> T parseElement(Class<T> type,
ComponentMetadata enclosingComponent,
Element element)
ParserContext
parseElement 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 String generateId()
ParserContext
generateId in interface ParserContextpublic String getDefaultActivation()
ParserContext
getDefaultActivation in interface ParserContextpublic String getDefaultAvailability()
ParserContext
getDefaultAvailability in interface ParserContextpublic String getDefaultTimeout()
ParserContext
getDefaultTimeout in interface ParserContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||