Package com.helger.css.decl.visit
Interface ICSSVisitor
-
- All Known Implementing Classes:
CSSVisitorForUrl,DefaultCSSVisitor
public interface ICSSVisitorInterface for visiting different elements of a CSS domain object.- Author:
- Philip Helger
- See Also:
DefaultCSSVisitor for an empty default implementation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbegin()Before visiting starts.
Note: This is only called for complete style sheets, and not when starting e.g. with a declaration list!voidend()After visiting is done.
Note: This is only called for complete style sheets, and not when starting e.g. with a declaration list!voidonBeginFontFaceRule(CSSFontFaceRule aFontFaceRule)Called when a font-face rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginKeyframesBlock(CSSKeyframesBlock aKeyframesBlock)Called when a keyframes block starts.voidonBeginKeyframesRule(CSSKeyframesRule aKeyframesRule)Called when a keyframes rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginMediaRule(CSSMediaRule aMediaRule)Called when a media rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginPageMarginBlock(CSSPageMarginBlock aPageMarginBlock)Called when a page margin block starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginPageRule(CSSPageRule aPageRule)Called when a page rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration), contained page margin blocks are handled withonBeginPageMarginBlock(CSSPageMarginBlock)andonEndPageMarginBlock(CSSPageMarginBlock).voidonBeginStyleRule(CSSStyleRule aStyleRule)Called when a style rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)voidonBeginSupportsRule(CSSSupportsRule aSupportsRule)Called when a supports rule starts.voidonBeginViewportRule(CSSViewportRule aViewportRule)Called when a viewport rule starts.voidonDeclaration(CSSDeclaration aDeclaration)Called for each declarationvoidonEndFontFaceRule(CSSFontFaceRule aFontFaceRule)Called when a font-face rule ends.voidonEndKeyframesBlock(CSSKeyframesBlock aKeyframesBlock)Called when a keyframes block ends.voidonEndKeyframesRule(CSSKeyframesRule aKeyframesRule)Called when a keyframes rule ends.voidonEndMediaRule(CSSMediaRule aMediaRule)Called when a media rule ends.voidonEndPageMarginBlock(CSSPageMarginBlock aPageMarginBlock)Called when a page margin block ends.voidonEndPageRule(CSSPageRule aPageRule)Called when a page rule ends.voidonEndStyleRule(CSSStyleRule aStyleRule)Called when a style rule ends.voidonEndSupportsRule(CSSSupportsRule aSupportsRule)Called when a supports rule ends.voidonEndViewportRule(CSSViewportRule aViewportRule)Called when a viewport rule ends.voidonImport(CSSImportRule aImportRule)Called on CSS import statementvoidonNamespace(CSSNamespaceRule aNamespaceRule)Called on CSS namespace statementvoidonStyleRuleSelector(CSSSelector aSelector)Called for each selector of a style rulevoidonUnknownRule(CSSUnknownRule aUnknownRule)Called when an unknown rule is encountered.
-
-
-
Method Detail
-
begin
void begin()
Before visiting starts.
Note: This is only called for complete style sheets, and not when starting e.g. with a declaration list!
-
onImport
void onImport(@Nonnull CSSImportRule aImportRule)
Called on CSS import statement- Parameters:
aImportRule- Other imported CSS. Nevernull.
-
onNamespace
void onNamespace(@Nonnull CSSNamespaceRule aNamespaceRule)
Called on CSS namespace statement- Parameters:
aNamespaceRule- The namespace rule. Nevernull.
-
onDeclaration
void onDeclaration(@Nonnull CSSDeclaration aDeclaration)
Called for each declaration- Parameters:
aDeclaration- The declaration. Nevernull.
-
onBeginStyleRule
void onBeginStyleRule(@Nonnull CSSStyleRule aStyleRule)
Called when a style rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aStyleRule- The style rule. Nevernull.
-
onStyleRuleSelector
void onStyleRuleSelector(@Nonnull CSSSelector aSelector)
Called for each selector of a style rule- Parameters:
aSelector- The style rule selector. Nevernull.
-
onEndStyleRule
void onEndStyleRule(@Nonnull CSSStyleRule aStyleRule)
Called when a style rule ends.- Parameters:
aStyleRule- The style rule. Nevernull.
-
onBeginPageRule
void onBeginPageRule(@Nonnull CSSPageRule aPageRule)
Called when a page rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration), contained page margin blocks are handled withonBeginPageMarginBlock(CSSPageMarginBlock)andonEndPageMarginBlock(CSSPageMarginBlock).- Parameters:
aPageRule- The page rule. Nevernull.
-
onBeginPageMarginBlock
void onBeginPageMarginBlock(@Nonnull CSSPageMarginBlock aPageMarginBlock)
Called when a page margin block starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aPageMarginBlock- The page margin block. Nevernull.
-
onEndPageMarginBlock
void onEndPageMarginBlock(@Nonnull CSSPageMarginBlock aPageMarginBlock)
Called when a page margin block ends.- Parameters:
aPageMarginBlock- The page margin block. Nevernull.
-
onEndPageRule
void onEndPageRule(@Nonnull CSSPageRule aPageRule)
Called when a page rule ends.- Parameters:
aPageRule- The page rule. Nevernull.
-
onBeginFontFaceRule
void onBeginFontFaceRule(@Nonnull CSSFontFaceRule aFontFaceRule)
Called when a font-face rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aFontFaceRule- The font-face rule. Nevernull.
-
onEndFontFaceRule
void onEndFontFaceRule(@Nonnull CSSFontFaceRule aFontFaceRule)
Called when a font-face rule ends.- Parameters:
aFontFaceRule- The font-face rule. Nevernull.
-
onBeginMediaRule
void onBeginMediaRule(@Nonnull CSSMediaRule aMediaRule)
Called when a media rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aMediaRule- The media rule. Nevernull.
-
onEndMediaRule
void onEndMediaRule(@Nonnull CSSMediaRule aMediaRule)
Called when a media rule ends.- Parameters:
aMediaRule- The media rule. Nevernull.
-
onBeginKeyframesRule
void onBeginKeyframesRule(@Nonnull CSSKeyframesRule aKeyframesRule)
Called when a keyframes rule starts.
Note: contained declarations are handled byonDeclaration(CSSDeclaration)- Parameters:
aKeyframesRule- The keyframes rule. Nevernull.
-
onBeginKeyframesBlock
void onBeginKeyframesBlock(@Nonnull CSSKeyframesBlock aKeyframesBlock)
Called when a keyframes block starts.- Parameters:
aKeyframesBlock- The keyframes rule block. Nevernull.
-
onEndKeyframesBlock
void onEndKeyframesBlock(@Nonnull CSSKeyframesBlock aKeyframesBlock)
Called when a keyframes block ends.- Parameters:
aKeyframesBlock- The keyframes rule block. Nevernull.
-
onEndKeyframesRule
void onEndKeyframesRule(@Nonnull CSSKeyframesRule aKeyframesRule)
Called when a keyframes rule ends.- Parameters:
aKeyframesRule- The keyframes rule. Nevernull.
-
onBeginViewportRule
void onBeginViewportRule(@Nonnull CSSViewportRule aViewportRule)
Called when a viewport rule starts.- Parameters:
aViewportRule- The viewport rule. Nevernull.
-
onEndViewportRule
void onEndViewportRule(@Nonnull CSSViewportRule aViewportRule)
Called when a viewport rule ends.- Parameters:
aViewportRule- The viewport rule. Nevernull.
-
onBeginSupportsRule
void onBeginSupportsRule(@Nonnull CSSSupportsRule aSupportsRule)
Called when a supports rule starts.- Parameters:
aSupportsRule- The supports rule. Nevernull.
-
onEndSupportsRule
void onEndSupportsRule(@Nonnull CSSSupportsRule aSupportsRule)
Called when a supports rule ends.- Parameters:
aSupportsRule- The supports rule. Nevernull.
-
onUnknownRule
void onUnknownRule(@Nonnull CSSUnknownRule aUnknownRule)
Called when an unknown rule is encountered.- Parameters:
aUnknownRule- The unknown rule. Nevernull.
-
end
void end()
After visiting is done.
Note: This is only called for complete style sheets, and not when starting e.g. with a declaration list!
-
-