forked from mapstruct/mapstruct
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuilder.java
More file actions
40 lines (35 loc) · 1.08 KB
/
Builder.java
File metadata and controls
40 lines (35 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct;
import java.lang.annotation.Retention;
4CC3
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.mapstruct.util.Experimental;
/**
* Configuration of builders, e.g. the name of the final build method.
*
* @author Filip Hrisafov
*
* @since 1.3
*/
@Retention(RetentionPolicy.CLASS)
@Target({})
@Experimental
public @interface Builder {
/**
* The name of the build method that needs to be invoked on the builder to create the type to be build
*
* @return the method that needs to tbe invoked on the builder
*/
String buildMethod() default "build";
/**
* Toggling builders on / off. Builders are sometimes used solely for unit testing (fluent testdata)
* MapStruct will need to use the regular getters /setters in that case.
*
* @return when true, no builder patterns will be applied
*/
boolean disableBuilder() default false;
}