@Immutable public class DefaultCSSVisitor extends Object implements ICSSVisitor
ICSSVisitor interface. Use as base
class for your own implementations since this class does nothing on its own.| Constructor and Description |
|---|
DefaultCSSVisitor() |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Before visiting starts.
|
void |
end()
After visiting is done.
|
void |
onBeginFontFaceRule(CSSFontFaceRule aFontFaceRule)
Called when a font-face rule starts.
|
void |
onBeginKeyframesBlock(CSSKeyframesBlock aKeyframesBlock)
Called when a keyframes block starts.
|
void |
onBeginKeyframesRule(CSSKeyframesRule aKeyframesRule)
Called when a keyframes rule starts.
|
void |
onBeginMediaRule(CSSMediaRule aMediaRule)
Called when a media rule starts.
|
void |
onBeginPageMarginBlock(CSSPageMarginBlock aPageMarginBlock)
Called when a page margin block starts.
|
void |
onBeginPageRule(CSSPageRule aPageRule)
Called when a page rule starts.
|
void |
onBeginStyleRule(CSSStyleRule aStyleRule)
Called when a style rule starts.
|
void |
onBeginSupportsRule(CSSSupportsRule aSupportsRule)
Called when a supports rule starts.
|
void |
onBeginViewportRule(CSSViewportRule aViewportRule)
Called when a viewport rule starts.
|
void |
onDeclaration(CSSDeclaration aDeclaration)
Called for each declaration
|
void |
onEndFontFaceRule(CSSFontFaceRule aFontFaceRule)
Called when a font-face rule ends.
|
void |
onEndKeyframesBlock(CSSKeyframesBlock aKeyframesBlock)
Called when a keyframes block ends.
|
void |
onEndKeyframesRule(CSSKeyframesRule aKeyframesRule)
Called when a keyframes rule ends.
|
void |
onEndMediaRule(CSSMediaRule aMediaRule)
Called when a media rule ends.
|
void |
onEndPageMarginBlock(CSSPageMarginBlock aPageMarginBlock)
Called when a page margin block ends.
|
void |
onEndPageRule(CSSPageRule aPageRule)
Called when a page rule ends.
|
void |
onEndStyleRule(CSSStyleRule aStyleRule)
Called when a style rule ends.
|
void |
onEndSupportsRule(CSSSupportsRule aSupportsRule)
Called when a supports rule ends.
|
void |
onEndViewportRule(CSSViewportRule aViewportRule)
Called when a viewport rule ends.
|
void |
onImport(CSSImportRule aImportRule)
Called on CSS import statement
|
void |
onNamespace(CSSNamespaceRule aNamespaceRule)
Called on CSS namespace statement
|
void |
onStyleRuleSelector(CSSSelector aSelector)
Called for each selector of a style rule
|
void |
onUnknownRule(CSSUnknownRule aUnknownRule)
Called when an unknown rule is encountered.
|
@OverrideOnDemand public void begin()
ICSSVisitorbegin in interface ICSSVisitor@OverrideOnDemand public void onImport(@Nonnull CSSImportRule aImportRule)
ICSSVisitoronImport in interface ICSSVisitoraImportRule - Other imported CSS. Never null.@OverrideOnDemand public void onNamespace(@Nonnull CSSNamespaceRule aNamespaceRule)
ICSSVisitoronNamespace in interface ICSSVisitoraNamespaceRule - The namespace rule. Never null.@OverrideOnDemand public void onDeclaration(@Nonnull CSSDeclaration aDeclaration)
ICSSVisitoronDeclaration in interface ICSSVisitoraDeclaration - The declaration. Never null.@OverrideOnDemand public void onBeginStyleRule(@Nonnull CSSStyleRule aStyleRule)
ICSSVisitorICSSVisitor.onDeclaration(CSSDeclaration)onBeginStyleRule in interface ICSSVisitoraStyleRule - The style rule. Never null.@OverrideOnDemand public void onStyleRuleSelector(@Nonnull CSSSelector aSelector)
ICSSVisitoronStyleRuleSelector in interface ICSSVisitoraSelector - The style rule selector. Never null.@OverrideOnDemand public void onEndStyleRule(@Nonnull CSSStyleRule aStyleRule)
ICSSVisitoronEndStyleRule in interface ICSSVisitoraStyleRule - The style rule. Never null.@OverrideOnDemand public void onBeginPageRule(@Nonnull CSSPageRule aPageRule)
ICSSVisitorICSSVisitor.onDeclaration(CSSDeclaration), contained page margin blocks are
handled with ICSSVisitor.onBeginPageMarginBlock(CSSPageMarginBlock) and
ICSSVisitor.onEndPageMarginBlock(CSSPageMarginBlock).onBeginPageRule in interface ICSSVisitoraPageRule - The page rule. Never null.@OverrideOnDemand public void onBeginPageMarginBlock(@Nonnull CSSPageMarginBlock aPageMarginBlock)
ICSSVisitorICSSVisitor.onDeclaration(CSSDeclaration)onBeginPageMarginBlock in interface ICSSVisitoraPageMarginBlock - The page margin block. Never null.@OverrideOnDemand public void onEndPageMarginBlock(@Nonnull CSSPageMarginBlock aPageMarginBlock)
ICSSVisitoronEndPageMarginBlock in interface ICSSVisitoraPageMarginBlock - The page margin block. Never null.@OverrideOnDemand public void onEndPageRule(@Nonnull CSSPageRule aPageRule)
ICSSVisitoronEndPageRule in interface ICSSVisitoraPageRule - The page rule. Never null.@OverrideOnDemand public void onBeginFontFaceRule(@Nonnull CSSFontFaceRule aFontFaceRule)
ICSSVisitorICSSVisitor.onDeclaration(CSSDeclaration)onBeginFontFaceRule in interface ICSSVisitoraFontFaceRule - The font-face rule. Never null.@OverrideOnDemand public void onEndFontFaceRule(@Nonnull CSSFontFaceRule aFontFaceRule)
ICSSVisitoronEndFontFaceRule in interface ICSSVisitoraFontFaceRule - The font-face rule. Never null.@OverrideOnDemand public void onBeginMediaRule(@Nonnull CSSMediaRule aMediaRule)
ICSSVisitorICSSVisitor.onDeclaration(CSSDeclaration)onBeginMediaRule in interface ICSSVisitoraMediaRule - The media rule. Never null.@OverrideOnDemand public void onEndMediaRule(@Nonnull CSSMediaRule aMediaRule)
ICSSVisitoronEndMediaRule in interface ICSSVisitoraMediaRule - The media rule. Never null.@OverrideOnDemand public void onBeginKeyframesRule(@Nonnull CSSKeyframesRule aKeyframesRule)
ICSSVisitorICSSVisitor.onDeclaration(CSSDeclaration)onBeginKeyframesRule in interface ICSSVisitoraKeyframesRule - The keyframes rule. Never null.@OverrideOnDemand public void onBeginKeyframesBlock(@Nonnull CSSKeyframesBlock aKeyframesBlock)
ICSSVisitoronBeginKeyframesBlock in interface ICSSVisitoraKeyframesBlock - The keyframes rule block. Never null.@OverrideOnDemand public void onEndKeyframesBlock(@Nonnull CSSKeyframesBlock aKeyframesBlock)
ICSSVisitoronEndKeyframesBlock in interface ICSSVisitoraKeyframesBlock - The keyframes rule block. Never null.@OverrideOnDemand public void onEndKeyframesRule(@Nonnull CSSKeyframesRule aKeyframesRule)
ICSSVisitoronEndKeyframesRule in interface ICSSVisitoraKeyframesRule - The keyframes rule. Never null.@OverrideOnDemand public void onBeginViewportRule(@Nonnull CSSViewportRule aViewportRule)
ICSSVisitoronBeginViewportRule in interface ICSSVisitoraViewportRule - The viewport rule. Never null.@OverrideOnDemand public void onEndViewportRule(@Nonnull CSSViewportRule aViewportRule)
ICSSVisitoronEndViewportRule in interface ICSSVisitoraViewportRule - The viewport rule. Never null.@OverrideOnDemand public void onBeginSupportsRule(@Nonnull CSSSupportsRule aSupportsRule)
ICSSVisitoronBeginSupportsRule in interface ICSSVisitoraSupportsRule - The supports rule. Never null.@OverrideOnDemand public void onEndSupportsRule(@Nonnull CSSSupportsRule aSupportsRule)
ICSSVisitoronEndSupportsRule in interface ICSSVisitoraSupportsRule - The supports rule. Never null.@OverrideOnDemand public void onUnknownRule(@Nonnull CSSUnknownRule aUnknownRule)
ICSSVisitoronUnknownRule in interface ICSSVisitoraUnknownRule - The unknown rule. Never null.@OverrideOnDemand public void end()
ICSSVisitorend in interface ICSSVisitorCopyright © 2014–2018 Philip Helger. All rights reserved.