|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjp.cssj.sakae.sac.parser.Parser
This class implements the Parser
interface.
フィールドの概要 | |
static String |
BUNDLE_CLASSNAME
The default resource bundle base name. |
protected ConditionFactory |
conditionFactory
The condition factory. |
protected int |
current
The current lexical unit. |
protected DocumentHandler |
documentHandler
The document handler. |
protected String |
documentURI
The document URI. |
protected ErrorHandler |
errorHandler
The error handler. |
protected boolean |
legacy
|
protected LocalizableSupport |
localizableSupport
The localizable support. |
protected Map |
prefixToURI
Mapping from prefix to URI. |
protected String |
pseudoElement
To store the current pseudo element. |
protected Scanner |
scanner
The scanner used to scan the input source. |
protected SelectorFactory |
selectorFactory
The selector factory. |
コンストラクタの概要 | |
Parser()
|
メソッドの概要 | |
protected CSSParseException |
createCSSParseException(String key)
Creates a parse exception. |
protected CSSParseException |
createCSSParseException(String key,
Object[] params)
Creates a parse exception. |
protected Scanner |
createScanner(InputSource source)
Creates a scanner, given an InputSource. |
protected LexicalUnit |
dimension(boolean positive,
LexicalUnit prev)
Converts the current lexical unit to a dimension. |
String |
formatMessage(String key,
Object[] args)
Implements Localizable.formatMessage(String,Object[])
. |
Locale |
getLocale()
Implements Localizable.getLocale() . |
String |
getParserVersion()
SAC : Implements Parser.getParserVersion()
. |
protected LexicalUnit |
hexcolor(LexicalUnit prev)
Converts a hash unit to a RGB color. |
boolean |
isLegacy()
|
protected boolean |
isPseudoElement(String s)
Tells whether or not the given string represents a pseudo-element. |
protected int |
next()
Advances to the next token, ignoring comments. |
protected int |
nextIgnoreSpaces()
Advances to the next token and skip the spaces, ignoring comments. |
protected float |
number(boolean positive)
Converts the current lexical unit to a float. |
protected void |
parseAtRule()
Parses an unknown rule. |
protected LexicalUnit |
parseExpression(boolean param)
Parses a CSS2 expression. |
protected void |
parseFontFaceRule()
Parses a font-face rule. |
protected LexicalUnit |
parseFunction(LexicalUnit prev)
Parses a CSS2 function. |
protected void |
parseImportRule()
Parses an import rule. |
SACMediaList |
parseMedia(String mediaText)
Implements ExtendedParser.parseMedia(String) . |
protected CSSSACMediaList |
parseMediaList()
Parses a media list. |
protected void |
parseMediaRule()
Parses a media rule. |
protected void |
parseNamespaceRule()
Parses an namespace rule. |
protected void |
parsePageRule()
Parses a page rule. |
boolean |
parsePriority(InputSource source)
SAC : Implements Parser.parsePriority(InputSource) . |
boolean |
parsePriority(String source)
Implements ExtendedParser.parsePriority(String) . |
protected boolean |
parsePriorityInternal()
Parses the priority using the current scanner. |
LexicalUnit |
parsePropertyValue(InputSource source)
SAC : Implements Parser.parsePropertyValue(InputSource) . |
LexicalUnit |
parsePropertyValue(String source)
Implements ExtendedParser.parsePropertyValue(String) . |
protected LexicalUnit |
parsePropertyValueInternal()
Parses property value using the current scanner. |
protected void |
parseRule()
Parses a rule. |
void |
parseRule(InputSource source)
SAC : Implements Parser.parseRule(InputSource) . |
void |
parseRule(String source)
Implements ExtendedParser.parseRule(String) . |
protected void |
parseRuleInternal()
Parses a rule using the current scanner. |
protected void |
parseRuleSet()
Parses a ruleset. |
protected Selector |
parseSelector()
Parses a selector. |
protected SelectorList |
parseSelectorList()
Parses a selector list |
SelectorList |
parseSelectors(InputSource source)
SAC : Implements Parser.parseSelectors(InputSource) . |
SelectorList |
parseSelectors(String source)
Implements ExtendedParser.parseSelectors(String) . |
protected SelectorList |
parseSelectorsInternal()
Parses selectors using the current scanner. |
protected SimpleSelector |
parseSimpleSelector()
Parses a simple selector. |
protected void |
parseStyleDeclaration(boolean inSheet)
Parses the given reader. |
void |
parseStyleDeclaration(InputSource source)
SAC : Implements Parser.parseStyleDeclaration(InputSource) . |
void |
parseStyleDeclaration(String source)
Implements ExtendedParser.parseStyleDeclaration(String) . |
protected void |
parseStyleDeclarationInternal()
Parses a style declaration using the current scanner. |
void |
parseStyleSheet(InputSource source)
SAC : Implements Parser.parseStyleSheet(InputSource) . |
protected void |
parseStyleSheet(InputSource source,
boolean rescan,
boolean checkCharset)
|
void |
parseStyleSheet(String uri)
SAC : Implements Parser.parseStyleSheet(String) . |
protected LexicalUnit |
parseTerm(LexicalUnit prev)
Parses a CSS2 term. |
protected void |
reportError(CSSParseException e)
Reports a parsing error. |
protected void |
reportError(String key)
Reports a parsing error. |
protected void |
reportError(String key,
Object[] params)
Reports a parsing error. |
void |
setConditionFactory(ConditionFactory factory)
SAC : Implements Parser.setConditionFactory(ConditionFactory) . |
void |
setDocumentHandler(DocumentHandler handler)
SAC : Implements Parser.setDocumentHandler(DocumentHandler) . |
void |
setErrorHandler(ErrorHandler handler)
SAC : Implements Parser.setErrorHandler(ErrorHandler) . |
void |
setLegacy(boolean legacy)
|
void |
setLocale(Locale locale)
SAC : Implements Parser.setLocale(Locale) . |
void |
setSelectorFactory(SelectorFactory factory)
SAC : Implements Parser.setSelectorFactory(SelectorFactory) . |
protected int |
skipSpaces()
Skips the white spaces. |
protected int |
skipSpacesAndCDOCDC()
Skips the white spaces and CDO/CDC units. |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
public static final String BUNDLE_CLASSNAME
protected LocalizableSupport localizableSupport
protected Scanner scanner
protected int current
protected DocumentHandler documentHandler
protected SelectorFactory selectorFactory
protected ConditionFactory conditionFactory
protected ErrorHandler errorHandler
protected String pseudoElement
protected String documentURI
protected Map prefixToURI
protected boolean legacy
コンストラクタの詳細 |
public Parser()
メソッドの詳細 |
public boolean isLegacy()
public void setLegacy(boolean legacy)
public String getParserVersion()
Parser.getParserVersion()
.
Parser
内の getParserVersion
public void setLocale(Locale locale) throws CSSException
Parser.setLocale(Locale)
.
Parser
内の setLocale
CSSException
public Locale getLocale()
Localizable.getLocale()
.
Localizable
内の getLocale
public String formatMessage(String key, Object[] args) throws MissingResourceException
Localizable.formatMessage(String,Object[])
.
Localizable
内の formatMessage
key
- The key used to retreive the message from the resource bundle.args
- The objects that compose the message.
MissingResourceException
- if the key is not in the bundle.public void setDocumentHandler(DocumentHandler handler)
Parser.setDocumentHandler(DocumentHandler)
.
Parser
内の setDocumentHandler
public void setSelectorFactory(SelectorFactory factory)
Parser.setSelectorFactory(SelectorFactory)
.
Parser
内の setSelectorFactory
public void setConditionFactory(ConditionFactory factory)
Parser.setConditionFactory(ConditionFactory)
.
Parser
内の setConditionFactory
public void setErrorHandler(ErrorHandler handler)
Parser.setErrorHandler(ErrorHandler)
.
Parser
内の setErrorHandler
public void parseStyleSheet(InputSource source) throws CSSException, IOException
Parser.parseStyleSheet(InputSource)
.
Parser
内の parseStyleSheet
CSSException
IOException
protected void parseStyleSheet(InputSource source, boolean rescan, boolean checkCharset) throws CSSException, IOException, ChangeCharacterEncodingException
CSSException
IOException
ChangeCharacterEncodingException
public void parseStyleSheet(String uri) throws CSSException, IOException
Parser.parseStyleSheet(String)
.
Parser
内の parseStyleSheet
CSSException
IOException
public void parseStyleDeclaration(InputSource source) throws CSSException, IOException
Parser.parseStyleDeclaration(InputSource)
.
Parser
内の parseStyleDeclaration
CSSException
IOException
protected void parseStyleDeclarationInternal() throws CSSException, IOException
CSSException
IOException
public void parseRule(InputSource source) throws CSSException, IOException
Parser.parseRule(InputSource)
.
Parser
内の parseRule
CSSException
IOException
protected void parseRuleInternal() throws CSSException, IOException
CSSException
IOException
public SelectorList parseSelectors(InputSource source) throws CSSException, IOException
Parser.parseSelectors(InputSource)
.
Parser
内の parseSelectors
CSSException
IOException
protected SelectorList parseSelectorsInternal() throws CSSException, IOException
CSSException
IOException
public LexicalUnit parsePropertyValue(InputSource source) throws CSSException, IOException
Parser.parsePropertyValue(InputSource)
.
Parser
内の parsePropertyValue
CSSException
IOException
protected LexicalUnit parsePropertyValueInternal() throws CSSException, IOException
CSSException
IOException
public boolean parsePriority(InputSource source) throws CSSException, IOException
Parser.parsePriority(InputSource)
.
Parser
内の parsePriority
CSSException
IOException
protected boolean parsePriorityInternal() throws CSSException, IOException
CSSException
IOException
protected void parseRule() throws IOException
IOException
protected void parseAtRule() throws IOException
IOException
protected void parseImportRule() throws IOException
IOException
protected void parseNamespaceRule() throws IOException
IOException
protected CSSSACMediaList parseMediaList() throws IOException
IOException
protected void parseFontFaceRule() throws IOException
IOException
protected void parsePageRule() throws IOException
IOException
protected void parseMediaRule() throws IOException
IOException
protected void parseRuleSet() throws IOException
IOException
protected SelectorList parseSelectorList() throws IOException
IOException
protected Selector parseSelector() throws IOException
IOException
protected SimpleSelector parseSimpleSelector() throws IOException
IOException
protected boolean isPseudoElement(String s)
protected void parseStyleDeclaration(boolean inSheet) throws IOException
IOException
protected LexicalUnit parseExpression(boolean param) throws IOException
IOException
protected LexicalUnit parseTerm(LexicalUnit prev) throws IOException
IOException
protected LexicalUnit parseFunction(LexicalUnit prev) throws IOException
IOException
protected LexicalUnit hexcolor(LexicalUnit prev) throws IOException
IOException
protected Scanner createScanner(InputSource source) throws IOException
IOException
protected int skipSpaces() throws IOException
IOException
protected int skipSpacesAndCDOCDC() throws IOException
IOException
protected float number(boolean positive) throws IOException
IOException
protected LexicalUnit dimension(boolean positive, LexicalUnit prev) throws IOException
IOException
protected int next() throws IOException
IOException
protected int nextIgnoreSpaces() throws IOException
IOException
protected void reportError(String key) throws IOException
IOException
protected void reportError(String key, Object[] params) throws IOException
IOException
protected void reportError(CSSParseException e) throws IOException
IOException
protected CSSParseException createCSSParseException(String key)
protected CSSParseException createCSSParseException(String key, Object[] params)
public void parseStyleDeclaration(String source) throws CSSException, IOException
ExtendedParser.parseStyleDeclaration(String)
.
ExtendedParser
内の parseStyleDeclaration
IOException
- An IO exception from the parser, possibly from a byte
stream or character stream supplied by the application.
CSSException
- Any CSS exception, possibly wrapping another exception.public void parseRule(String source) throws CSSException, IOException
ExtendedParser.parseRule(String)
.
ExtendedParser
内の parseRule
IOException
- An IO exception from the parser, possibly from a byte
stream or character stream supplied by the application.
CSSException
- Any CSS exception, possibly wrapping another exception.public SelectorList parseSelectors(String source) throws CSSException, IOException
ExtendedParser.parseSelectors(String)
.
ExtendedParser
内の parseSelectors
CSSException
- Any CSS exception, possibly wrapping another exception.
IOException
- An IO exception from the parser, possibly from a byte
stream or character stream supplied by the application.public LexicalUnit parsePropertyValue(String source) throws CSSException, IOException
ExtendedParser.parsePropertyValue(String)
.
ExtendedParser
内の parsePropertyValue
CSSException
- Any CSS exception, possibly wrapping another exception.
IOException
- An IO exception from the parser, possibly from a byte
stream or character stream supplied by the application.public boolean parsePriority(String source) throws CSSException, IOException
ExtendedParser.parsePriority(String)
.
ExtendedParser
内の parsePriority
IOException
- An IO exception from the parser, possibly from a byte
stream or character stream supplied by the application.
CSSException
- Any CSS exception, possibly wrapping another exception.public SACMediaList parseMedia(String mediaText) throws CSSException, IOException
ExtendedParser.parseMedia(String)
.
ExtendedParser
内の parseMedia
CSSException
- Any CSS exception, possibly wrapping another exception.
IOException
- An IO exception from the parser, possibly from a byte
stream or character stream supplied by the application.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |