# Class Selectors

java.lang.Object
org.eclipse.e4.ui.css.core.impl.engine.selector.Selectors

public final class Selectors extends Object
Internal CSS selector AST.

The engine historically exposed W3C SAC selectors (`org.w3c.css.sac.Selector` and friends) and matched against them through a hierarchy of vendored Batik wrapper classes under `impl/sac/*`. This package replaces both with a small set of records that the engine owns end to end. The W3C SAC types stay only as long as the parser still emits them; a translator turns the SAC selector tree produced by the Batik SAC parser into one of these records before it reaches the engine matcher.

Specificity follows CSS 2.1: 100 per id, 10 per class / attribute / pseudo-class, 1 per element, 0 for the universal selector. Combinators sum the specificity of their operands; selector lists report the maximum specificity over their alternatives.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final record`
`Selectors.Adjacent`
`first + second` — direct adjacent sibling combinator.
`static final record`
`Selectors.And`
Compound selector: every operand must match the same element.
`static final record`
`Selectors.AttributeBeginHyphen`
`[attr|='value']` — matches when `attr` equals `value` or starts with `value-`.
`static final record`
`Selectors.AttributeIncludes`
`[attr~='value']` — matches when `attr` contains `value` as a whitespace-separated word.
`static final record`
`Selectors.AttributeSelector`
`[attr]` or `[attr='value']`.
`static final record`
`Selectors.Child`
`parent > child` — child combinator.
`static final record`
`Selectors.ClassSelector`
`.foo` — matches by CSS class.
`static final record`
`Selectors.Descendant`
`ancestor descendant` — descendant combinator.
`static final record`
`Selectors.ElementType`
`Button` — matches by local element name.
`static final record`
`Selectors.IdSelector`
`#foo` — matches by CSS id.
`static final record`
`Selectors.PseudoClass`
`:name` — matches when the element answers true to `isPseudoInstanceOf(name)` on its CSS-stylable element wrapper.
`static interface`
`Selectors.Selector`
A parsed CSS selector.
`static final class`
`Selectors.SelectorList`
`a, b` — selector list.
`static final record`
`Selectors.Universal`
`*` — matches any element.

## Method Summary

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`