Package | Description |
---|---|
com.salesforce.omakase.ast.selector |
Contains selector AST members.
|
com.salesforce.omakase.plugin |
Interfaces for plugging new features into the parsing process (rework, validation, etc...).
|
com.salesforce.omakase.util |
Utilities and helpers.
|
Modifier and Type | Interface and Description |
---|---|
interface |
SimpleSelector
A simple selector, as defined by the Selectors Level 3 spec: "A simple selector is either a type selector, universal selector,
attribute selector, class selector, ID selector, or pseudo-class."
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractSelectorPart
Base class for
SelectorPart s. |
class |
AttributeSelector
Represents a CSS attribute selector.
|
class |
ClassSelector
Represents a CSS class selector.
|
class |
Combinator
Represents a CSS combinator.
|
class |
IdSelector
Represents a CSS id selector.
|
class |
KeyframeSelector
Represents a single keyframe selector part.
|
class |
PseudoClassSelector
Represents a CSS pseudo class selector.
|
class |
PseudoElementSelector
Represents a CSS pseudo element selector.
|
class |
TypeSelector
Represents a CSS type selector (also known as an element type selector).
|
class |
UniversalSelector
Represents the CSS universal selector, i.e., "*".
|
Modifier and Type | Method and Description |
---|---|
SelectorPart |
SelectorPart.copy() |
protected SelectorPart |
AbstractSelectorPart.self() |
Modifier and Type | Method and Description |
---|---|
SyntaxCollection<Selector,SelectorPart> |
Selector.parts()
Gets the individual parts of the selector.
|
Modifier and Type | Method and Description |
---|---|
Selector |
Selector.append(SelectorPart newPart)
Appends the given part to this
Selector . |
Modifier and Type | Method and Description |
---|---|
Selector |
Selector.appendAll(Iterable<SelectorPart> newParts)
Appends all of the given parts to this
Selector . |
Constructor and Description |
---|
Selector(int line,
int column,
SelectorPart... parts)
Creates a new instance with the given line, number, and parts.
|
Selector(SelectorPart... parts)
Creates a new instance with no line or number specified (used for dynamically created
Syntax units). |
Constructor and Description |
---|
Selector(int line,
int column,
Iterable<SelectorPart> parts)
Creates a new instance with the given line, number, and parts.
|
Selector(Iterable<SelectorPart> parts)
Creates a new instance with no line or number specified (used for dynamically created
Syntax units). |
Modifier and Type | Method and Description |
---|---|
void |
BasePlugin.selectorPart(SelectorPart selectorPart)
Override this method and add the
Rework , Observe or Validate annotation in order to receive events
for Syntax units of type SelectorPart (SimpleSelector s or Combinator s). |
Modifier and Type | Method and Description |
---|---|
static <T extends SelectorPart> |
Selectors.as(Class<T> klass,
SelectorPart part)
Gets the given part as an instance of the given
SelectorPart type. |
static <T extends SelectorPart> |
Selectors.filter(Class<T> klass,
Selector selector)
Filters the selector parts in the given
Selector to only the ones of the given class type. |
Modifier and Type | Method and Description |
---|---|
static Iterable<SelectorPart> |
Selectors.adjoining(SelectorPart part)
Gets the non-combinator
SelectorPart s contiguous to this one. |
Modifier and Type | Method and Description |
---|---|
static Iterable<SelectorPart> |
Selectors.adjoining(SelectorPart part)
Gets the non-combinator
SelectorPart s contiguous to this one. |
static <T extends SelectorPart> |
Selectors.as(Class<T> klass,
SelectorPart part)
Gets the given part as an instance of the given
SelectorPart type. |
static Optional<ClassSelector> |
Selectors.asClassSelector(SelectorPart part)
Gets the given part as an instance of a
ClassSelector , if it is one. |
static Optional<IdSelector> |
Selectors.asIdSelector(SelectorPart part)
Gets the given part as an instance of an
IdSelector , if it is one. |
static Optional<PseudoClassSelector> |
Selectors.asPseudoClassSelector(SelectorPart part)
Gets the given part as an instance of a
PseudoClassSelector if it is one. |
static Optional<PseudoElementSelector> |
Selectors.asPseudoElementSelector(SelectorPart part)
Gets the given part as an instance of a
PseudoElementSelector if it is one. |
static Optional<TypeSelector> |
Selectors.asTypeSelector(SelectorPart part)
Gets the given part as an instance of a
TypeSelector if it is one. |
Modifier and Type | Method and Description |
---|---|
static Optional<ClassSelector> |
Selectors.findClassSelector(Iterable<SelectorPart> parts,
String name)
Checks the given parts for the first
ClassSelector that matches the given name. |
static Optional<IdSelector> |
Selectors.findIdSelector(Iterable<SelectorPart> parts,
String name)
Checks the given parts for the first
IdSelector that matches the given name. |
static Optional<PseudoClassSelector> |
Selectors.findPseudoClassSelector(Iterable<SelectorPart> parts,
String name,
boolean exact)
Checks the given parts for the first
PseudoClassSelector that matches the given name. |
static Optional<PseudoElementSelector> |
Selectors.findPseudoElementSelector(Iterable<SelectorPart> parts,
String name,
boolean exact)
Checks the given parts for the first
PseudoElementSelector that matches the given name. |
static Optional<TypeSelector> |
Selectors.findTypeSelector(Iterable<SelectorPart> parts,
String name)
Checks the given parts for the first
TypeSelector that matches the given name. |
static boolean |
Selectors.hasClassSelector(Iterable<SelectorPart> parts,
String name)
Checks the given parts for a
ClassSelector that matches the given name. |
static boolean |
Selectors.hasIdSelector(Iterable<SelectorPart> parts,
String name)
Checks the given parts for a
IdSelector that matches the given name. |
static boolean |
Selectors.hasPseudoClassSelector(Iterable<SelectorPart> parts,
String name,
boolean exact)
Checks the given parts for a
PseudoClassSelector that matches the given name. |
static boolean |
Selectors.hasPseudoElementSelector(Iterable<SelectorPart> parts,
String name,
boolean exact)
Checks the given parts for a
PseudoElementSelector that matches the given name. |
static boolean |
Selectors.hasTypeSelector(Iterable<SelectorPart> parts,
String name)
Checks the given parts for a
TypeSelector that matches the given name. |
Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.