public class ExtendedParserWrapper extends java.lang.Object implements ExtendedParser
ExtendedParser
interface by wrapping a standard Parser
.Modifier and Type | Field and Description |
---|---|
org.w3c.css.sac.Parser |
parser |
Constructor and Description |
---|
ExtendedParserWrapper(org.w3c.css.sac.Parser parser) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getParserVersion()
SAC: Implements
Parser.getParserVersion() . |
org.w3c.css.sac.SACMediaList |
parseMedia(java.lang.String mediaText)
Implements
ExtendedParser.parseMedia(String) . |
boolean |
parsePriority(org.w3c.css.sac.InputSource source)
SAC: Implements
Parser.parsePriority(InputSource) . |
boolean |
parsePriority(java.lang.String source)
Parse a CSS priority value (e.g. "!important").
|
org.w3c.css.sac.LexicalUnit |
parsePropertyValue(org.w3c.css.sac.InputSource source)
SAC: Implements
Parser.parsePropertyValue(InputSource) . |
org.w3c.css.sac.LexicalUnit |
parsePropertyValue(java.lang.String source)
Parse a CSS property value.
|
void |
parseRule(org.w3c.css.sac.InputSource source)
SAC: Implements
Parser.parseRule(InputSource) . |
void |
parseRule(java.lang.String source)
Parse a CSS rule.
|
org.w3c.css.sac.SelectorList |
parseSelectors(org.w3c.css.sac.InputSource source)
SAC: Implements
Parser.parseSelectors(InputSource) . |
org.w3c.css.sac.SelectorList |
parseSelectors(java.lang.String source)
Parse a comma separated list of selectors.
|
void |
parseStyleDeclaration(org.w3c.css.sac.InputSource source)
SAC: Implements
Parser.parseStyleDeclaration(InputSource) . |
void |
parseStyleDeclaration(java.lang.String source)
Parse a CSS style declaration (without '{' and '}').
|
void |
parseStyleSheet(org.w3c.css.sac.InputSource source)
SAC: Implements
Parser.parseStyleSheet(InputSource) . |
void |
parseStyleSheet(java.lang.String uri)
Parse a CSS document from a URI.
|
void |
setConditionFactory(org.w3c.css.sac.ConditionFactory conditionFactory)
SAC: Implements
Parser.setConditionFactory(ConditionFactory) . |
void |
setDocumentHandler(org.w3c.css.sac.DocumentHandler handler)
SAC: Implements
Parser.setDocumentHandler(DocumentHandler) . |
void |
setErrorHandler(org.w3c.css.sac.ErrorHandler handler)
SAC: Implements
Parser.setErrorHandler(ErrorHandler) . |
void |
setLocale(java.util.Locale locale)
SAC: Implements
Parser.setLocale(Locale) . |
void |
setSelectorFactory(org.w3c.css.sac.SelectorFactory selectorFactory)
SAC: Implements
Parser.setSelectorFactory(SelectorFactory) . |
static ExtendedParser |
wrap(org.w3c.css.sac.Parser p)
This converts a standard @link org.w3c.css.sac.Parser into
an Extended Parser.
|
public ExtendedParserWrapper(org.w3c.css.sac.Parser parser)
public static ExtendedParser wrap(org.w3c.css.sac.Parser p)
p
- Parser to wrap.public java.lang.String getParserVersion()
Parser.getParserVersion()
.getParserVersion
in interface org.w3c.css.sac.Parser
public void setLocale(java.util.Locale locale) throws org.w3c.css.sac.CSSException
Parser.setLocale(Locale)
.setLocale
in interface org.w3c.css.sac.Parser
org.w3c.css.sac.CSSException
public void setDocumentHandler(org.w3c.css.sac.DocumentHandler handler)
Parser.setDocumentHandler(DocumentHandler)
.setDocumentHandler
in interface org.w3c.css.sac.Parser
public void setSelectorFactory(org.w3c.css.sac.SelectorFactory selectorFactory)
Parser.setSelectorFactory(SelectorFactory)
.setSelectorFactory
in interface org.w3c.css.sac.Parser
public void setConditionFactory(org.w3c.css.sac.ConditionFactory conditionFactory)
Parser.setConditionFactory(ConditionFactory)
.setConditionFactory
in interface org.w3c.css.sac.Parser
public void setErrorHandler(org.w3c.css.sac.ErrorHandler handler)
Parser.setErrorHandler(ErrorHandler)
.setErrorHandler
in interface org.w3c.css.sac.Parser
public void parseStyleSheet(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOException
Parser.parseStyleSheet(InputSource)
.parseStyleSheet
in interface org.w3c.css.sac.Parser
org.w3c.css.sac.CSSException
java.io.IOException
public void parseStyleSheet(java.lang.String uri) throws org.w3c.css.sac.CSSException, java.io.IOException
This method is a shortcut for the common case of reading a document from a URI. It is the exact equivalent of the following:
parse(new InputSource(uri));
The URI must be fully resolved by the application before it is passed to the parser.
parseStyleSheet
in interface org.w3c.css.sac.Parser
uri
- The URI.org.w3c.css.sac.CSSException
- Any CSS exception, possibly
wrapping another exception.java.io.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.parseStyleSheet(InputSource)
public void parseStyleDeclaration(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOException
Parser.parseStyleDeclaration(InputSource)
.parseStyleDeclaration
in interface org.w3c.css.sac.Parser
org.w3c.css.sac.CSSException
java.io.IOException
public void parseStyleDeclaration(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOException
parseStyleDeclaration
in interface ExtendedParser
source
- The declaration.org.w3c.css.sac.CSSException
- Any CSS exception, possibly
wrapping another exception.java.io.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public void parseRule(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOException
Parser.parseRule(InputSource)
.parseRule
in interface org.w3c.css.sac.Parser
org.w3c.css.sac.CSSException
java.io.IOException
public void parseRule(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOException
parseRule
in interface ExtendedParser
org.w3c.css.sac.CSSException
- Any CSS exception, possibly
wrapping another exception.java.io.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public org.w3c.css.sac.SelectorList parseSelectors(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOException
Parser.parseSelectors(InputSource)
.parseSelectors
in interface org.w3c.css.sac.Parser
org.w3c.css.sac.CSSException
java.io.IOException
public org.w3c.css.sac.SelectorList parseSelectors(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOException
parseSelectors
in interface ExtendedParser
org.w3c.css.sac.CSSException
- Any CSS exception, possibly
wrapping another exception.java.io.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public org.w3c.css.sac.LexicalUnit parsePropertyValue(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOException
Parser.parsePropertyValue(InputSource)
.parsePropertyValue
in interface org.w3c.css.sac.Parser
org.w3c.css.sac.CSSException
java.io.IOException
public org.w3c.css.sac.LexicalUnit parsePropertyValue(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOException
parsePropertyValue
in interface ExtendedParser
org.w3c.css.sac.CSSException
- Any CSS exception, possibly
wrapping another exception.java.io.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public boolean parsePriority(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOException
Parser.parsePriority(InputSource)
.parsePriority
in interface org.w3c.css.sac.Parser
org.w3c.css.sac.CSSException
java.io.IOException
public org.w3c.css.sac.SACMediaList parseMedia(java.lang.String mediaText) throws org.w3c.css.sac.CSSException, java.io.IOException
ExtendedParser.parseMedia(String)
.parseMedia
in interface ExtendedParser
org.w3c.css.sac.CSSException
- Any CSS exception, possibly
wrapping another exception.java.io.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.public boolean parsePriority(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOException
parsePriority
in interface ExtendedParser
org.w3c.css.sac.CSSException
- Any CSS exception, possibly
wrapping another exception.java.io.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.Copyright © 2022 Apache Software Foundation. All Rights Reserved.