Package org.ec4j.core.model
Class EditorConfig.Builder
java.lang.Object
org.ec4j.core.model.Adaptable.DefaultAdaptable.Builder<EditorConfig.Builder>
org.ec4j.core.model.EditorConfig.Builder
- Enclosing class:
EditorConfig
public static class EditorConfig.Builder
extends Adaptable.DefaultAdaptable.Builder<EditorConfig.Builder>
An
EditorConfig builder.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) Boolean(package private) List<Section.Builder> (package private) VersionFields inherited from class org.ec4j.core.model.Adaptable.DefaultAdaptable.Builder
adapters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()parentAware(boolean parentAware) Sets therootfield.section(Section.Builder section) Adds a singleSection.Buildertosections.sections(Collection<Section.Builder> sections) Adds multipleSection.Builders tosectionssections(Section.Builder... sections) Adds multipleSection.Builders tosectionsSets theversionfield.Methods inherited from class org.ec4j.core.model.Adaptable.DefaultAdaptable.Builder
adapter, adapters, adapters, sealAdapters
-
Field Details
-
parentAware
boolean parentAware -
root
Boolean root -
sections
List<Section.Builder> sections -
version
Version version
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
- Returns:
- a new
EditorConfig
-
openSection
- Returns:
- a new
Section.Builderand pass the currentparentAwarevalue to it
-
parentAware
- Parameters:
parentAware- iftruetheSection.getProperties()of the resultingSectionwill have the Section set in their adapters (which can be used as the link to the parentSection); othwise the section will not be added toProperty's adapters- Returns:
- this
EditorConfig.Builder
-
root
Sets therootfield.- Parameters:
root- ifBoolean.TRUEthis is the top-most.editorconfigfile and the a search for.editorconfigfiles should stop at the present directory level. IfBoolean.FALSE, this is not the top-most.editorconfigfile and underlying source tree should be searched for further.editorconfigfiles in the ancestor directories. Anullrootmeans that the `root` property was not available in the underlying.editorconfigfile and that the defaultroot = false- Returns:
- this
EditorConfig.Builder
-
section
Adds a singleSection.Buildertosections.- Parameters:
section- theSection.Builderto add- Returns:
- this
EditorConfig.Builder
-
sections
Adds multipleSection.Builders tosections- Parameters:
sections- theSection.Builders to add- Returns:
- this
EditorConfig.Builder
-
sections
Adds multipleSection.Builders tosections- Parameters:
sections- theSection.Builders to add- Returns:
- this
EditorConfig.Builder
-
version
Sets theversionfield.- Parameters:
version- the version to set- Returns:
- this
EditorConfig.Builder
-