Package com.helger.html.hc.impl
Class AbstractHCWrappingNode
- java.lang.Object
-
- com.helger.html.hc.impl.AbstractHCNode
-
- com.helger.html.hc.impl.AbstractHCWrappingNode
-
- All Implemented Interfaces:
com.helger.commons.hierarchy.IHasChildren<IHCNode>,com.helger.commons.hierarchy.IHasChildrenRecursive<IHCNode>,com.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>,IHCNode,IHCWrappingNode,Serializable
- Direct Known Subclasses:
HCConditionalCommentNode,HCOutOfBandNode
@NotThreadSafe public abstract class AbstractHCWrappingNode extends AbstractHCNode implements IHCWrappingNode
Abstract implementation ofIHCWrappingNode.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractHCWrappingNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanConvertToMicroNode(IHCConversionSettingsToNode aConversionSettings)This method checks whether the node is suitable for conversion to anIMicroNode.voidforAllChildren(Consumer<? super IHCNode> aConsumer)voidforAllChildren(Predicate<? super IHCNode> aFilter, Consumer<? super IHCNode> aConsumer)<DSTTYPE> voidforAllChildrenMapped(Predicate<? super IHCNode> aFilter, Function<? super IHCNode,? extends DSTTYPE> aMapper, Consumer<? super DSTTYPE> aConsumer)com.helger.commons.collection.impl.ICommonsList<? extends IHCNode>getAllChildren()IHCNodegetChildAtIndex(int nIndex)intgetChildCount()com.helger.commons.collection.impl.ICommonsIterable<? extends IHCNode>getChildren()IHCNodegetFirstChild()IHCNodegetLastChild()EHCNodeStategetNodeState()StringgetPlainText()booleanhasChildren()protected com.helger.xml.microdom.IMicroNodeinternalConvertToMicroNode(IHCConversionSettingsToNode aConversionSettings)protected voidonConsistencyCheck(IHCConversionSettingsToNode aConversionSettings)protected voidonCustomizeNode(IHCCustomizer aCustomizer, EHTMLVersion eHTMLVersion, IHCHasChildrenMutable<?,? super IHCNode> aTargetNode)protected voidonFinalizeNodeState(IHCConversionSettingsToNode aConversionSettings, IHCHasChildrenMutable<?,? super IHCNode> aTargetNode)Finalize the node by applying any internal state that was not yet converted to a HC element.protected voidonRegisterExternalResources(IHCConversionSettingsToNode aConversionSettings, boolean bForceRegistration)-
Methods inherited from class com.helger.html.hc.impl.AbstractHCNode
consistencyCheck, convertToMicroNode, customizeNode, finalizeNodeState, findFirstChild, findFirstChildMapped, forAllChildrenBreakable, internalSetNodeState, registerExternalResources, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildren
forAllChildrenBreakable, hasNoChildren
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenRecursive
forAllChildrenRecursive, forAllChildrenRecursive
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenSorted
findFirstChild, findFirstChildMapped
-
Methods inherited from interface com.helger.html.hc.IHCNode
consistencyCheck, convertToMicroNode, customizeNode, finalizeNodeState, registerExternalResources
-
Methods inherited from interface com.helger.html.hc.IHCWrappingNode
getWrappedNode
-
-
-
-
Method Detail
-
getNodeState
@Nonnull public EHCNodeState getNodeState()
- Specified by:
getNodeStatein interfaceIHCNode- Overrides:
getNodeStatein classAbstractHCNode- Returns:
- The current node state and never
null.
-
onCustomizeNode
@OverrideOnDemand @OverridingMethodsMustInvokeSuper protected void onCustomizeNode(@Nonnull IHCCustomizer aCustomizer, @Nonnull EHTMLVersion eHTMLVersion, @Nonnull IHCHasChildrenMutable<?,? super IHCNode> aTargetNode)
- Overrides:
onCustomizeNodein classAbstractHCNode
-
onFinalizeNodeState
@OverrideOnDemand @OverridingMethodsMustInvokeSuper protected void onFinalizeNodeState(@Nonnull IHCConversionSettingsToNode aConversionSettings, @Nonnull IHCHasChildrenMutable<?,? super IHCNode> aTargetNode)
Description copied from class:AbstractHCNodeFinalize the node by applying any internal state that was not yet converted to a HC element. This method is called at maximum once per IHCNode. It is safe to still add classes, style or children to this node in this method.- Overrides:
onFinalizeNodeStatein classAbstractHCNode- Parameters:
aConversionSettings- HC conversion settingsaTargetNode- The target node where additional nodes should be added
-
onConsistencyCheck
@OverrideOnDemand @OverridingMethodsMustInvokeSuper protected void onConsistencyCheck(@Nonnull IHCConversionSettingsToNode aConversionSettings)
- Overrides:
onConsistencyCheckin classAbstractHCNode- Parameters:
aConversionSettings- HC conversion settings
-
onRegisterExternalResources
@OverrideOnDemand @OverridingMethodsMustInvokeSuper protected void onRegisterExternalResources(@Nonnull IHCConversionSettingsToNode aConversionSettings, boolean bForceRegistration)
- Overrides:
onRegisterExternalResourcesin classAbstractHCNode- Parameters:
aConversionSettings- HC conversion settingsbForceRegistration-trueif the registration is forced by the caller.
-
canConvertToMicroNode
@OverrideOnDemand @OverridingMethodsMustInvokeSuper public boolean canConvertToMicroNode(@Nonnull IHCConversionSettingsToNode aConversionSettings)
Description copied from interface:IHCNodeThis method checks whether the node is suitable for conversion to anIMicroNode. If this node cannot be converted, no child node will be converted as well!- Specified by:
canConvertToMicroNodein interfaceIHCNode- Overrides:
canConvertToMicroNodein classAbstractHCNode- Parameters:
aConversionSettings- The conversion settings to be used- Returns:
trueif the node can be converted to a node,falseotherwise.
-
internalConvertToMicroNode
@Nullable @OverrideOnDemand @OverridingMethodsMustInvokeSuper protected com.helger.xml.microdom.IMicroNode internalConvertToMicroNode(@Nonnull IHCConversionSettingsToNode aConversionSettings)
- Specified by:
internalConvertToMicroNodein classAbstractHCNode
-
getPlainText
@Nonnull public String getPlainText()
- Specified by:
getPlainTextin interfaceIHCNode- Overrides:
getPlainTextin classAbstractHCNode- Returns:
- The plain text representation of this text. May not be
null.
-
getAllChildren
@Nullable public com.helger.commons.collection.impl.ICommonsList<? extends IHCNode> getAllChildren()
- Specified by:
getAllChildrenin interfacecom.helger.commons.hierarchy.IHasChildren<IHCNode>- Specified by:
getAllChildrenin interfacecom.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>- Overrides:
getAllChildrenin classAbstractHCNode
-
getChildren
@Nullable public com.helger.commons.collection.impl.ICommonsIterable<? extends IHCNode> getChildren()
- Specified by:
getChildrenin interfacecom.helger.commons.hierarchy.IHasChildren<IHCNode>- Overrides:
getChildrenin classAbstractHCNode
-
forAllChildren
public final void forAllChildren(@Nonnull Consumer<? super IHCNode> aConsumer)
- Specified by:
forAllChildrenin interfacecom.helger.commons.hierarchy.IHasChildren<IHCNode>- Overrides:
forAllChildrenin classAbstractHCNode
-
forAllChildren
public final void forAllChildren(@Nonnull Predicate<? super IHCNode> aFilter, @Nonnull Consumer<? super IHCNode> aConsumer)
- Specified by:
forAllChildrenin interfacecom.helger.commons.hierarchy.IHasChildren<IHCNode>- Overrides:
forAllChildrenin classAbstractHCNode
-
forAllChildrenMapped
public final <DSTTYPE> void forAllChildrenMapped(@Nonnull Predicate<? super IHCNode> aFilter, @Nonnull Function<? super IHCNode,? extends DSTTYPE> aMapper, @Nonnull Consumer<? super DSTTYPE> aConsumer)
- Specified by:
forAllChildrenMappedin interfacecom.helger.commons.hierarchy.IHasChildren<IHCNode>- Overrides:
forAllChildrenMappedin classAbstractHCNode
-
getChildAtIndex
@Nullable public IHCNode getChildAtIndex(int nIndex)
- Specified by:
getChildAtIndexin interfacecom.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>- Overrides:
getChildAtIndexin classAbstractHCNode
-
getFirstChild
@Nullable public IHCNode getFirstChild()
- Specified by:
getFirstChildin interfacecom.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>- Overrides:
getFirstChildin classAbstractHCNode
-
getLastChild
@Nullable public IHCNode getLastChild()
- Specified by:
getLastChildin interfacecom.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>- Overrides:
getLastChildin classAbstractHCNode
-
hasChildren
public boolean hasChildren()
- Specified by:
hasChildrenin interfacecom.helger.commons.hierarchy.IHasChildren<IHCNode>- Overrides:
hasChildrenin classAbstractHCNode
-
getChildCount
@Nonnegative public int getChildCount()
- Specified by:
getChildCountin interfacecom.helger.commons.hierarchy.IHasChildren<IHCNode>- Overrides:
getChildCountin classAbstractHCNode
-
-