Class EnumTest.Builder
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.EnumTest.Builder
-
- Enclosing class:
- EnumTest
public static class EnumTest.Builder extends java.lang.ObjectClass implements builder to create a new instance of classEnumTest.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()UseEnumTest.builder()instead of private constructor to create new builder.protectedBuilder(EnumTest pObject)UseEnumTest.builder(EnumTest)instead of private constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumTestbuild()Method creates a new instance of class EnumTest.EnumTestbuildValidated()Method creates a new validated instance of class EnumTest.EnumTest.BuildersetEnumRef(ExtensibleEnum pEnumRef)Method sets associationenumRef.EnumTest.BuildersetProperty(ExtensibleEnum pProperty)Method sets attributeproperty.
-
-
-
Constructor Detail
-
Builder
protected Builder()
UseEnumTest.builder()instead of private constructor to create new builder.
-
Builder
protected Builder(EnumTest pObject)
UseEnumTest.builder(EnumTest)instead of private constructor to create new builder.
-
-
Method Detail
-
setProperty
public EnumTest.Builder setProperty(ExtensibleEnum pProperty)
Method sets attributeproperty.- Parameters:
pProperty- Value to whichpropertyshould be set.- Returns:
EnumTest.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setEnumRef
public EnumTest.Builder setEnumRef(ExtensibleEnum pEnumRef)
Method sets associationenumRef.- Parameters:
pEnumRef- Value to whichenumRefshould be set.- Returns:
EnumTest.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
build
public EnumTest build()
Method creates a new instance of class EnumTest. The object will be initialized with the values of the builder.- Returns:
- EnumTest Created object. The method never returns null.
-
buildValidated
public EnumTest buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class EnumTest. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- EnumTest Created and validated object. The method never returns null.
- Throws:
javax.validation.ConstraintViolationException- in case that one or more validations for the created object failed.
-
-