net.karneim.pojobuilder
Annotation Type GeneratePojoBuilder


@Retention(value=SOURCE)
@Target(value={TYPE,METHOD})
public @interface GeneratePojoBuilder

Use this annotation for generating a fluent pojo builder.

Author:
karneim

Optional Element Summary
 String intoPackage
          Specifies the package of the generated builder.
 Class<?> withBaseclass
          Specifies the base class of the generated builder.
 boolean withCopyMethod
          Specifies whether a copy method should be generated.
 boolean withGenerationGap
          Specifies whether the generation gap pattern is used.
 String withName
          Specifies the name of the generated builder.
 

withBaseclass

public abstract Class<?> withBaseclass
Specifies the base class of the generated builder.

Returns:
the base class of the generated builder
Default:
java.lang.Object.class

withName

public abstract String withName
Specifies the name of the generated builder. Any asterisk will be replaced with the pojos simple name. Default is "*Builder".

Returns:
the name of the generated builder
Default:
"*Builder"

intoPackage

public abstract String intoPackage
Specifies the package of the generated builder. Any asterisk will be replaced with the pojos package. Default is "*".

Returns:
the package of the generated builder
Default:
"*"

withGenerationGap

public abstract boolean withGenerationGap
Specifies whether the generation gap pattern is used. If enabled this will generate two classes (instead of one), of which one contains the generated code. The other class is for handwritten code. To prevent it from being overwritten please move it out of the generated-sources folder. Default is "false".

Default:
false

withCopyMethod

public abstract boolean withCopyMethod
Specifies whether a copy method should be generated. The copy method will take an instance of the buileded class and will copy all its fields into the builder. This allows it to easily change one or more fields of immutable objects

Default:
false


Copyright © 2013. All Rights Reserved.