protected class StaticMetawidget.Pipeline extends W3CPipeline<StaticWidget,StaticWidget,StaticMetawidget>
We must use <StaticWidget, StaticWidget, StaticMetawidget> because that is what org.metawidget.statically.layout.SimpleLayout uses. Therefore we must expose setLayout(<StaticWidget, StaticWidget, StaticMetawidget>).
We also need subclasses such as setLayout(<StaticXmlWidget, StaticXmlWidget, StaticXmlMetawidget>). So we must allow extensions of StaticWidget (eg. W extends StaticWidget) during setLayout.
However this causes problems because if W extends StaticWidget then we cannot guarantee that M extends W and also extends StaticMetawidget. Java Generics cannot express this, even with Bounded Type Parameters. Hence some SuppressWarnings above.
Modifier | Constructor and Description |
---|---|
protected |
StaticMetawidget.Pipeline() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildCompoundWidget(Element element)
Build a compound widget by iterating through children of the given
element, calling
buildWidget and addWidget on
each. |
protected StaticMetawidget |
buildNestedMetawidget(Map<String,String> attributes) |
protected Map<String,String> |
getAdditionalAttributes(StaticWidget tag)
Returns additional attributes associated with the widget.
|
protected String |
getDefaultConfiguration() |
protected StaticMetawidget |
getPipelineOwner() |
protected void |
startBuild() |
configure, configureDefaults, elementToString, getAttributesAsMap, getConfig, getConfigReader, getElementName, getFirstChildElement, getInspectionResultProcessor, getNextSiblingElement, getWidgetProcessor, initNestedPipeline, setConfig, setConfigReader, stringToElement
addInspectionResultProcessor, addWidgetProcessor, buildWidget, buildWidgets, configureOnce, endBuild, getInspectionResultProcessors, getInspector, getLayout, getMaximumInspectionDepth, getWidgetBuilder, getWidgetProcessors, inspect, inspectAsDom, isReadOnly, layoutWidget, processInspectionResult, processWidget, removeInspectionResultProcessor, removeWidgetProcessor, setInspectionResultProcessors, setInspector, setLayout, setMaximumInspectionDepth, setNeedsConfiguring, setReadOnly, setWidgetBuilder, setWidgetProcessors
protected String getDefaultConfiguration()
getDefaultConfiguration
in class W3CPipeline<StaticWidget,StaticWidget,StaticMetawidget>
protected Map<String,String> getAdditionalAttributes(StaticWidget tag)
BasePipeline
At the very least, this method should be implemented to support returning additional attributes from stubs.
getAdditionalAttributes
in class BasePipeline<StaticWidget,StaticWidget,Element,StaticMetawidget>
protected void startBuild()
startBuild
in class BasePipeline<StaticWidget,StaticWidget,Element,StaticMetawidget>
protected void buildCompoundWidget(Element element) throws Exception
BasePipeline
buildWidget
and addWidget
on
each.buildCompoundWidget
in class BasePipeline<StaticWidget,StaticWidget,Element,StaticMetawidget>
Exception
protected StaticMetawidget buildNestedMetawidget(Map<String,String> attributes) throws Exception
buildNestedMetawidget
in class BasePipeline<StaticWidget,StaticWidget,Element,StaticMetawidget>
Exception
protected StaticMetawidget getPipelineOwner()
getPipelineOwner
in class BasePipeline<StaticWidget,StaticWidget,Element,StaticMetawidget>
Copyright © 2015. All Rights Reserved.