Class ElementScopes.Builder
java.lang.Object
dev.getelements.elements.sdk.util.ElementScopes.Builder
- Enclosing class:
ElementScopes
Builder class for ElementScopes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new instance ofElementScopes
with the specified parameters.withAttributes
(Attributes attributes) Sets theAttributes
to assign to the scope.withElementsNamed
(String... names) Sets the selector to include elements with the specified names.withLogger
(org.slf4j.Logger logger) The logger to use.Specifies the name of the scope.withNameFrom
(Class<?> aClass) Specifies the name of the scope, using the suppliedClass.getName()
as the name.withRegistry
(ElementRegistry registry) Sets the registry to be used.withSelector
(Predicate<Element> selector) Sets the selector to be used.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withName
Specifies the name of the scope.- Parameters:
name
- the name- Returns:
- this builder
-
withNameFrom
Specifies the name of the scope, using the suppliedClass.getName()
as the name.- Parameters:
aClass
- name- Returns:
- this builder
-
withLogger
The logger to use.- Parameters:
logger
- the logger- Returns:
- the logger
-
withRegistry
Sets the registry to be used.- Parameters:
registry
- the registry- Returns:
- this builder
-
withSelector
Sets the selector to be used.- Parameters:
selector
- the selector- Returns:
- this builder
-
withElementsNamed
Sets the selector to include elements with the specified names.- Parameters:
names
- the names of the elements- Returns:
- this builder
-
withAttributes
Sets theAttributes
to assign to the scope.- Parameters:
attributes
- the attributes to assign- Returns:
- this builder
-
build
Creates a new instance ofElementScopes
with the specified parameters.- Returns:
- the new instance
-