@Immutable public final class CSSVisitor extends Object
ICSSVisitor and ICSSUrlVisitor interface methods. Method
visitCSS(CascadingStyleSheet, ICSSVisitor) is usually the entry
point to iterate over the whole content of a parsed CSS.| Modifier and Type | Method and Description |
|---|---|
static void |
visitAllDeclarations(IHasCSSDeclarations<?> aHasDeclarations,
ICSSVisitor aVisitor)
Visit all declarations contained in the passed declaration container.
|
static void |
visitAllDeclarationUrls(IHasCSSDeclarations<?> aCSS,
ICSSUrlVisitor aVisitor)
Visit all items that can contain URLs in CSS files.
|
static void |
visitCSS(CascadingStyleSheet aCSS,
ICSSVisitor aVisitor)
Visit all CSS elements in the order of their declaration. import rules come
first, namespace rules come next and all other top-level rules in the order
of their declaration.
|
static void |
visitCSSUrl(CascadingStyleSheet aCSS,
ICSSUrlVisitor aVisitor)
Visit all items that can contain URLs in CSS files.
|
static void |
visitFontFaceRule(CSSFontFaceRule aFontFaceRule,
ICSSVisitor aVisitor)
Visit all elements of a single font-face rule.
|
static void |
visitImportRule(CSSImportRule aImportRule,
ICSSVisitor aVisitor)
Visit all elements of a single import rule.
|
static void |
visitKeyframesRule(CSSKeyframesRule aKeyframesRule,
ICSSVisitor aVisitor)
Visit all elements of a single keyframes rule.
|
static void |
visitMediaRule(CSSMediaRule aMediaRule,
ICSSVisitor aVisitor)
Visit all elements of a single media rule.
|
static void |
visitNamespaceRule(CSSNamespaceRule aNamespaceRule,
ICSSVisitor aVisitor)
Visit all elements of a single namespace rule.
|
static void |
visitPageRule(CSSPageRule aPageRule,
ICSSVisitor aVisitor)
Visit all elements of a single page rule.
|
static void |
visitStyleRule(CSSStyleRule aStyleRule,
ICSSVisitor aVisitor)
Visit all elements of a single style rule.
|
static void |
visitSupportsRule(CSSSupportsRule aSupportsRule,
ICSSVisitor aVisitor)
Visit all elements of a single supports rule.
|
static void |
visitTopLevelRule(ICSSTopLevelRule aTopLevelRule,
ICSSVisitor aVisitor)
Visit all elements of a single top-level rule.
|
static void |
visitUnknownRule(CSSUnknownRule aUnknownRule,
ICSSVisitor aVisitor)
Visit all elements of a single unknown @ rule.
|
static void |
visitViewportRule(CSSViewportRule aViewportRule,
ICSSVisitor aVisitor)
Visit all elements of a single viewport rule.
|
public static void visitImportRule(@Nonnull CSSImportRule aImportRule, @Nonnull ICSSVisitor aVisitor)
aImportRule - The import rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitNamespaceRule(@Nonnull CSSNamespaceRule aNamespaceRule, @Nonnull ICSSVisitor aVisitor)
aNamespaceRule - The namespace rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitAllDeclarations(@Nonnull IHasCSSDeclarations<?> aHasDeclarations, @Nonnull ICSSVisitor aVisitor)
aHasDeclarations - The declarations to be visited. May not be null.aVisitor - The visitor to be invoked on each declaration. May not be
null.public static void visitStyleRule(@Nonnull CSSStyleRule aStyleRule, @Nonnull ICSSVisitor aVisitor)
aStyleRule - The style rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitPageRule(@Nonnull CSSPageRule aPageRule, @Nonnull ICSSVisitor aVisitor)
aPageRule - The page rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitFontFaceRule(@Nonnull CSSFontFaceRule aFontFaceRule, @Nonnull ICSSVisitor aVisitor)
aFontFaceRule - The font-face rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitMediaRule(@Nonnull CSSMediaRule aMediaRule, @Nonnull ICSSVisitor aVisitor)
aMediaRule - The media rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitKeyframesRule(@Nonnull CSSKeyframesRule aKeyframesRule, @Nonnull ICSSVisitor aVisitor)
aKeyframesRule - The keyframes rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitViewportRule(@Nonnull CSSViewportRule aViewportRule, @Nonnull ICSSVisitor aVisitor)
aViewportRule - The viewport rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitSupportsRule(@Nonnull CSSSupportsRule aSupportsRule, @Nonnull ICSSVisitor aVisitor)
aSupportsRule - The supports rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitUnknownRule(@Nonnull CSSUnknownRule aUnknownRule, @Nonnull ICSSVisitor aVisitor)
aUnknownRule - The unknown rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitTopLevelRule(@Nonnull ICSSTopLevelRule aTopLevelRule, @Nonnull ICSSVisitor aVisitor)
@import and @namespace rules.aTopLevelRule - The top-level rule to visit. May not be null.aVisitor - The visitor to use. May not be null.public static void visitCSS(@Nonnull CascadingStyleSheet aCSS, @Nonnull ICSSVisitor aVisitor)
aCSS - The CSS to visit. May not be null.aVisitor - The callback to be invoked for each element found. May not be
null.public static void visitCSSUrl(@Nonnull CascadingStyleSheet aCSS, @Nonnull ICSSUrlVisitor aVisitor)
CSSVisitorForUrl is used.aCSS - The CSS to visit. May not be null.aVisitor - The callback to invoke for each found occurrence. May not be
null.CSSVisitorForUrlpublic static void visitAllDeclarationUrls(@Nonnull IHasCSSDeclarations<?> aCSS, @Nonnull ICSSUrlVisitor aVisitor)
CSSVisitorForUrl is used.aCSS - The CSS to visit. May not be null.aVisitor - The callback to invoke for each found occurrence. May not be
null.Copyright © 2014–2018 Philip Helger. All rights reserved.