public final class CSSParser extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SPECIAL_REGION_URL_PREFIX |
Constructor and Description |
---|
CSSParser() |
Modifier and Type | Method and Description |
---|---|
static CSSParser |
getInstance()
Deprecated.
As of 8u40, use new CSSParser() instead.
|
Stylesheet |
parse(String stylesheetText)
Creates a stylesheet from a CSS document string.
|
Stylesheet |
parse(String docbase,
String stylesheetText)
Creates a stylesheet from a CSS document string using docbase as
the base URL for resolving references within stylesheet.
|
Stylesheet |
parse(URL url)
Updates the given stylesheet by reading a CSS document from a URL,
assuming UTF-8 encoding.
|
ParsedValueImpl |
parseExpr(String property,
String expr)
convenience method for unit tests
|
Stylesheet |
parseInlineStyle(Styleable node)
Parse an in-line style from a Node
|
public static final String SPECIAL_REGION_URL_PREFIX
@Deprecated public static CSSParser getInstance()
public Stylesheet parse(String stylesheetText)
stylesheetText
- the CSS document to parsepublic Stylesheet parse(String docbase, String stylesheetText) throws IOException
stylesheetText
- the CSS document to parseIOException
public Stylesheet parse(URL url) throws IOException
url
- URL of the stylesheet to parseIOException
public Stylesheet parseInlineStyle(Styleable node)
public ParsedValueImpl parseExpr(String property, String expr)
Copyright © 2020. All rights reserved.