Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Type | Name and Description |
---|---|
String |
buildMethodName For strategies which create a builder helper class that creates the instance, the method name to call to create the instance. |
String |
builderClassName For strategies which create a builder helper class, the class name to use for the helper class. |
String |
builderMethodName The method name to use for a builder factory method in the source class for easy access of the builder helper class for strategies which create such a helper class. |
Class<? extends BuilderStrategy> |
builderStrategy A class capturing the builder strategy @default DefaultStrategy.class |
String[] |
excludes List of field and/or property names to exclude from generated builder methods. |
Class |
forClass A class for which builder methods should be created. |
String[] |
includes List of field and/or property names to include within the generated builder methods. |
String |
prefix The prefix to use when creating the setter methods. |
For strategies which create a builder helper class that creates the instance, the method name to call to create the instance. Default is determined by the strategy, e.g. build or create. @default Undefined.STRING
For strategies which create a builder helper class, the class name to use for the helper class.
Not used if using forClass
since in such cases the builder class is explicitly supplied.
Default is determined by the strategy, e.g. TargetClass + "Builder" or TargetClass + "Initializer".
@default Undefined.STRING
The method name to use for a builder factory method in the source class for easy access of the
builder helper class for strategies which create such a helper class.
Must not be used if using forClass
.
Default is determined by the strategy, e.g. builder or createInitializer.
@default Undefined.STRING
A class capturing the builder strategy @default DefaultStrategy.class
List of field and/or property names to exclude from generated builder methods. Must not be used if 'includes' is used. For convenience, a String with comma separated names can be used in addition to an array (using Groovy's literal list notation) of String values. @default {}
A class for which builder methods should be created. It will be an error to leave this attribute with its default value for some strategies. @default .CLASS.class
List of field and/or property names to include within the generated builder methods. Must not be used if 'excludes' is used. For convenience, a String with comma separated names can be used in addition to an array (using Groovy's literal list notation) of String values. @default {}
The prefix to use when creating the setter methods. Default is determined by the strategy which might use "" or "set" but you can choose your own, e.g. "with". If non-empty the first letter of the property will be capitalized before being appended to the prefix. @default Undefined.STRING