Package com.helger.html.hc.ext
Class HCConditionalCommentNode
- java.lang.Object
-
- com.helger.html.hc.impl.AbstractHCNode
-
- com.helger.html.hc.impl.AbstractHCWrappingNode
-
- com.helger.html.hc.ext.HCConditionalCommentNode
-
- All Implemented Interfaces:
com.helger.commons.hierarchy.IHasChildren<IHCNode>,com.helger.commons.hierarchy.IHasChildrenRecursive<IHCNode>,com.helger.commons.hierarchy.IHasChildrenSorted<IHCNode>,IHCConditionalCommentNode,IHCNode,IHCWrappingNode,Serializable
@Immutable public class HCConditionalCommentNode extends AbstractHCWrappingNode implements IHCConditionalCommentNode
Represents an HTML conditional comment for IE specific usage. E.g.<!--[if IE 6]> Special instructions for IE 6 here <![endif]-->
Since 8.4.0 (dropping of IE support) this should not be needed anymore.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONDITION_IF_GT_IEstatic StringCONDITION_IF_GTE_IEstatic StringCONDITION_IF_IEstatic StringCONDITION_IF_IE_GENERICstatic StringCONDITION_IF_LT_IEstatic StringCONDITION_IF_LTE_IEstatic StringCONDITION_IF_NOT_IEstatic com.helger.commons.version.VersionIE10static com.helger.commons.version.VersionIE11static com.helger.commons.version.VersionIE5static com.helger.commons.version.VersionIE6static com.helger.commons.version.VersionIE7static com.helger.commons.version.VersionIE8static com.helger.commons.version.VersionIE9
-
Constructor Summary
Constructors Constructor Description HCConditionalCommentNode(String sCondition, IHCNode aWrappedNode)
-
Method Summary
-
Methods inherited from class com.helger.html.hc.impl.AbstractHCWrappingNode
canConvertToMicroNode, forAllChildren, forAllChildren, forAllChildrenMapped, getAllChildren, getChildAtIndex, getChildCount, getChildren, getFirstChild, getLastChild, getNodeState, getPlainText, hasChildren, onConsistencyCheck, onCustomizeNode, onFinalizeNodeState, onRegisterExternalResources
-
Methods inherited from class com.helger.html.hc.impl.AbstractHCNode
consistencyCheck, convertToMicroNode, customizeNode, finalizeNodeState, findFirstChild, findFirstChildMapped, forAllChildrenBreakable, internalSetNodeState, registerExternalResources
-
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
forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getChildCount, getChildren, hasChildren, hasNoChildren
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenRecursive
forAllChildrenRecursive, forAllChildrenRecursive
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenSorted
findFirstChild, findFirstChildMapped, getAllChildren, getChildAtIndex, getFirstChild, getLastChild
-
Methods inherited from interface com.helger.html.hc.IHCNode
canConvertToMicroNode, consistencyCheck, convertToMicroNode, customizeNode, finalizeNodeState, getNodeState, getPlainText, registerExternalResources
-
-
-
-
Field Detail
-
IE5
public static final com.helger.commons.version.Version IE5
-
IE6
public static final com.helger.commons.version.Version IE6
-
IE7
public static final com.helger.commons.version.Version IE7
-
IE8
public static final com.helger.commons.version.Version IE8
-
IE9
public static final com.helger.commons.version.Version IE9
-
IE10
public static final com.helger.commons.version.Version IE10
-
IE11
public static final com.helger.commons.version.Version IE11
-
CONDITION_IF_IE_GENERIC
public static final String CONDITION_IF_IE_GENERIC
- See Also:
- Constant Field Values
-
CONDITION_IF_IE
public static final String CONDITION_IF_IE
- See Also:
- Constant Field Values
-
CONDITION_IF_NOT_IE
public static final String CONDITION_IF_NOT_IE
- See Also:
- Constant Field Values
-
CONDITION_IF_LT_IE
public static final String CONDITION_IF_LT_IE
- See Also:
- Constant Field Values
-
CONDITION_IF_LTE_IE
public static final String CONDITION_IF_LTE_IE
- See Also:
- Constant Field Values
-
CONDITION_IF_GT_IE
public static final String CONDITION_IF_GT_IE
- See Also:
- Constant Field Values
-
CONDITION_IF_GTE_IE
public static final String CONDITION_IF_GTE_IE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCondition
@Nonnull @Nonempty public String getCondition()
- Specified by:
getConditionin interfaceIHCConditionalCommentNode- Returns:
- The condition for the conditional comment. Neither
nullnor empty.
-
getWrappedNode
@Nonnull public IHCNode getWrappedNode()
- Specified by:
getWrappedNodein interfaceIHCWrappingNode- Returns:
- The wrapped node and never
null.
-
internalConvertToMicroNode
@Nullable protected com.helger.xml.microdom.IMicroNode internalConvertToMicroNode(@Nonnull IHCConversionSettingsToNode aConversionSettings)
- Overrides:
internalConvertToMicroNodein classAbstractHCWrappingNode
-
toString
public String toString()
- Overrides:
toStringin classAbstractHCNode
-
createForIE
@Nonnull public static HCConditionalCommentNode createForIE(@Nonnull IHCNode aWrappedNode)
-
createForIEExactVersion
@Nonnull public static HCConditionalCommentNode createForIEExactVersion(@Nonnull com.helger.commons.version.Version aVersion, @Nonnull IHCNode aWrappedNode)
-
createForIEExactVersion5
@Nonnull public static HCConditionalCommentNode createForIEExactVersion5(@Nonnull IHCNode aWrappedNode)
-
createForIEExactVersion6
@Nonnull public static HCConditionalCommentNode createForIEExactVersion6(@Nonnull IHCNode aWrappedNode)
-
createForIEExactVersion7
@Nonnull public static HCConditionalCommentNode createForIEExactVersion7(@Nonnull IHCNode aWrappedNode)
-
createForIEExactVersion8
@Nonnull public static HCConditionalCommentNode createForIEExactVersion8(@Nonnull IHCNode aWrappedNode)
-
createForIEExactVersion9
@Nonnull public static HCConditionalCommentNode createForIEExactVersion9(@Nonnull IHCNode aWrappedNode)
-
createForIEExactVersion10
@Nonnull public static HCConditionalCommentNode createForIEExactVersion10(@Nonnull IHCNode aWrappedNode)
-
createForIEExactVersion11
@Nonnull public static HCConditionalCommentNode createForIEExactVersion11(@Nonnull IHCNode aWrappedNode)
-
createForIENotVersion
@Nonnull public static HCConditionalCommentNode createForIENotVersion(@Nonnull com.helger.commons.version.Version aVersion, @Nonnull IHCNode aWrappedNode)
-
createForIELowerThanVersion
@Nonnull public static HCConditionalCommentNode createForIELowerThanVersion(@Nonnull com.helger.commons.version.Version aVersion, @Nonnull IHCNode aWrappedNode)
-
createForIELowerThanVersion5
@Nonnull public static HCConditionalCommentNode createForIELowerThanVersion5(@Nonnull IHCNode aWrappedNode)
-
createForIELowerThanVersion6
@Nonnull public static HCConditionalCommentNode createForIELowerThanVersion6(@Nonnull IHCNode aWrappedNode)
-
createForIELowerThanVersion7
@Nonnull public static HCConditionalCommentNode createForIELowerThanVersion7(@Nonnull IHCNode aWrappedNode)
-
createForIELowerThanVersion8
@Nonnull public static HCConditionalCommentNode createForIELowerThanVersion8(@Nonnull IHCNode aWrappedNode)
-
createForIELowerThanVersion9
@Nonnull public static HCConditionalCommentNode createForIELowerThanVersion9(@Nonnull IHCNode aWrappedNode)
-
createForIELowerThanVersion10
@Nonnull public static HCConditionalCommentNode createForIELowerThanVersion10(@Nonnull IHCNode aWrappedNode)
-
createForIELowerThanVersion11
@Nonnull public static HCConditionalCommentNode createForIELowerThanVersion11(@Nonnull IHCNode aWrappedNode)
-
createForIELowerOrEqualThanVersion
@Nonnull public static HCConditionalCommentNode createForIELowerOrEqualThanVersion(@Nonnull com.helger.commons.version.Version aVersion, @Nonnull IHCNode aWrappedNode)
-
createForIELowerOrEqualThanVersion5
@Nonnull public static HCConditionalCommentNode createForIELowerOrEqualThanVersion5(@Nonnull IHCNode aWrappedNode)
-
createForIELowerOrEqualThanVersion6
@Nonnull public static HCConditionalCommentNode createForIELowerOrEqualThanVersion6(@Nonnull IHCNode aWrappedNode)
-
createForIELowerOrEqualThanVersion7
@Nonnull public static HCConditionalCommentNode createForIELowerOrEqualThanVersion7(@Nonnull IHCNode aWrappedNode)
-
createForIELowerOrEqualThanVersion8
@Nonnull public static HCConditionalCommentNode createForIELowerOrEqualThanVersion8(@Nonnull IHCNode aWrappedNode)
-
createForIELowerOrEqualThanVersion9
@Nonnull public static HCConditionalCommentNode createForIELowerOrEqualThanVersion9(@Nonnull IHCNode aWrappedNode)
-
createForIELowerOrEqualThanVersion10
@Nonnull public static HCConditionalCommentNode createForIELowerOrEqualThanVersion10(@Nonnull IHCNode aWrappedNode)
-
createForIELowerOrEqualThanVersion11
@Nonnull public static HCConditionalCommentNode createForIELowerOrEqualThanVersion11(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterThanVersion
@Nonnull public static HCConditionalCommentNode createForIEGreaterThanVersion(@Nonnull com.helger.commons.version.Version aVersion, @Nonnull IHCNode aWrappedNode)
-
createForIEGreaterThanVersion5
@Nonnull public static HCConditionalCommentNode createForIEGreaterThanVersion5(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterThanVersion6
@Nonnull public static HCConditionalCommentNode createForIEGreaterThanVersion6(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterThanVersion7
@Nonnull public static HCConditionalCommentNode createForIEGreaterThanVersion7(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterThanVersion8
@Nonnull public static HCConditionalCommentNode createForIEGreaterThanVersion8(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterThanVersion9
@Nonnull public static HCConditionalCommentNode createForIEGreaterThanVersion9(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterThanVersion10
@Nonnull public static HCConditionalCommentNode createForIEGreaterThanVersion10(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterThanVersion11
@Nonnull public static HCConditionalCommentNode createForIEGreaterThanVersion11(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterOrEqualThanVersion
@Nonnull public static HCConditionalCommentNode createForIEGreaterOrEqualThanVersion(@Nonnull com.helger.commons.version.Version aVersion, @Nonnull IHCNode aWrappedNode)
-
createForIEGreaterOrEqualThanVersion5
@Nonnull public static HCConditionalCommentNode createForIEGreaterOrEqualThanVersion5(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterOrEqualThanVersion6
@Nonnull public static HCConditionalCommentNode createForIEGreaterOrEqualThanVersion6(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterOrEqualThanVersion7
@Nonnull public static HCConditionalCommentNode createForIEGreaterOrEqualThanVersion7(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterOrEqualThanVersion8
@Nonnull public static HCConditionalCommentNode createForIEGreaterOrEqualThanVersion8(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterOrEqualThanVersion9
@Nonnull public static HCConditionalCommentNode createForIEGreaterOrEqualThanVersion9(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterOrEqualThanVersion10
@Nonnull public static HCConditionalCommentNode createForIEGreaterOrEqualThanVersion10(@Nonnull IHCNode aWrappedNode)
-
createForIEGreaterOrEqualThanVersion11
@Nonnull public static HCConditionalCommentNode createForIEGreaterOrEqualThanVersion11(@Nonnull IHCNode aWrappedNode)
-
getFromStringOrNull
@Nullable public static HCConditionalCommentNode getFromStringOrNull(@Nullable String sCondition, @Nonnull IHCNode aNode)
-
getAsConditionalCommentNode
@Nonnull public static HCConditionalCommentNode getAsConditionalCommentNode(@Nonnull @Nonempty String sCondition, @Nonnull IHCNode aNode)
Get the passed node wrapped in a conditional comment. This is a sanity method fornew HCConditionalCommentNode (this, sCondition). If this node is already anHCConditionalCommentNodethe object is simply casted.- Parameters:
sCondition- The condition to us. May neither benullnor empty.aNode- The HC node to be wrapped. May not benull.- Returns:
- Never
null.
-
-