←Older revision | Revision as of 04:43, 1 October 2021 | ||
Line 97: | Line 97: | ||
== [[DukeScript]] Intermezzo == | == [[DukeScript]] Intermezzo == | ||
- | Before we leave the [[JavaBean]] style completely, let's explore easier way to write the same [[API]]. It is provided by the [[ | + | Before we leave the [[JavaBean]] style completely, let's explore easier way to write the same [[API]]. It is provided by the [[Html4Java]] [[API]] which is in core of [[DukeScript]]: |
<source lang="java"> | <source lang="java"> | ||
Line 170: | Line 170: | ||
== Summary == | == Summary == | ||
- | When converting [[ConfigurationObject]] pattern to [[Java]] choose [[CumulativeFactory]] in case ''build'' operation on the object is the final one or [[Builder]]-like pattern in case one wants to modify the object even after calling ''build'' operation. Consider using [[ | + | When converting [[ConfigurationObject]] pattern to [[Java]] choose [[CumulativeFactory]] in case ''build'' operation on the object is the final one or [[Builder]]-like pattern in case one wants to modify the object even after calling ''build'' operation. Consider using [[Html4Java]] @{{HTML4J|net/java/html/json|Model}} annotation once it is [https://netbeans.org/bugzilla/show_bug.cgi?id=250611 enhanced to support builder style] as well: |
<source lang="java"> | <source lang="java"> |