Skip to content

Commit

Permalink
Builder annotation also including unwanted items, so DIY
Browse files Browse the repository at this point in the history
  • Loading branch information
ultraq committed Jan 27, 2025
1 parent 06132c6 commit 00f7c6e
Showing 1 changed file with 29 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ import groovy.transform.builder.SimpleStrategy
*
* @author Emanuel Rabina
*/
@Builder(
builderStrategy = SimpleStrategy,
includes = ['sortingStrategy', 'autoHeadMerging', 'experimentalTitleTokens'],
prefix = 'with'
)
class LayoutDialect extends AbstractProcessorDialect {

static final String DIALECT_NAME = 'Layout'
Expand Down Expand Up @@ -125,4 +120,33 @@ class LayoutDialect extends AbstractProcessorDialect {
new CollectFragmentProcessor(TemplateMode.XML, dialectPrefix)
]
}

/**
* Configure this instance of the layout dialect with the given {@code autoHeadMerging}
* value.
*/
LayoutDialect withAutoHeadMerging(boolean autoHeadMerging) {

this.autoHeadMerging = autoHeadMerging
return this
}

/**
* Configure this instance of the layout dialect with the given {@code experimentalTitleTokens}
* value.
*/
LayoutDialect withExperimentalTitleTokens(boolean experimentalTitleTokens) {

this.experimentalTitleTokens = experimentalTitleTokens
return this
}

/**
* Configure this instance of the layout dialect with the given {@code sortingStrategy}.
*/
LayoutDialect withSortingStrategy(SortingStrategy sortingStrategy) {

this.sortingStrategy = sortingStrategy
return this
}
}

0 comments on commit 00f7c6e

Please sign in to comment.