|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.trinidadinternal.skin.AgentAtRuleMatcher
public final class AgentAtRuleMatcher
Threadsafe immutable class that stores the @agent rule for a particular @agent query string from the skinning css file (e.g., @agent ie and (version:5), ie and (version:6), gecko {}). This class is used to match the current agent against the @agent rule.
StyleSheetNode,
NameUtils| Nested Class Summary | |
|---|---|
static class |
AgentAtRuleMatcher.Match
Enumeration representing the result of a call to match. |
| Constructor Summary | |
|---|---|
AgentAtRuleMatcher(java.lang.String queryString)
Creates an AgentAtRuleMatcher from an @agent query string. |
|
AgentAtRuleMatcher(java.lang.String[] selectors)
Creates an AgentAtRuleMatcher from a decomposed array of @agent query selectors. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
|
int |
hashCode()
|
java.util.Set<AgentAtRuleMatcher.Match> |
match(TrinidadAgent agent)
Called to actually determine if this AgentAtRuleMatcher applies to the current agent. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AgentAtRuleMatcher(java.lang.String queryString)
@agent ie and (version:8), gecko and (version:1.9) { .foo {background-color:red}}
the query string would be "ie and (version:8), gecko and (version:1.9)"
queryString - String containing the query portion of the @agent at-rulepublic AgentAtRuleMatcher(java.lang.String[] selectors)
@agent ie and (version:8), gecko and (version:1.9) { .foo {background-color:red}}
the decomposed selectors would be:
selector[0] = "ie and (version:8)"; selector[1] = "gecko and (version:1.9)";
selectors - Array of query selectors with one selector for every or'ed rule| Method Detail |
|---|
public java.util.Set<AgentAtRuleMatcher.Match> match(TrinidadAgent agent)
Called to actually determine if this AgentAtRuleMatcher applies to the current agent. The result is a Set of Match constants indicating how precise the match is. While all anded rules must match for the match to succeed, some callers need information regarding whether the Version information was also necessary in order for the match to succeed. For example, when generating CSS files, the version information is only part of the CSS name if the generated CSS file for the agent contained version-dependent content.
There are three possible return values
Match.APPLICATION, indicating a match that only needed to
match against the agent ApplicationMatch.APPLICATION and Match.VERSION,
indicating that both the agent Application and its version needed to be matched against
agent - Agent to test for compatibility with
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||