java.lang.Object
io.helidon.builder.RequiredAttributeVisitor
- All Implemented Interfaces:
AttributeVisitor<Object>
@Deprecated
public class RequiredAttributeVisitor
extends Object
implements AttributeVisitor<Object>
Deprecated.
This class is subject to change at any time - Helidon users should not use this directly. It will be referenced in
code generated sources that Helidon generates.
An implementation of
AttributeVisitor that will validate each attribute to enforce not-null in accordance with
ConfiguredOption.required().
Note that the source type having the Builder must be annotated with
ConfiguredOption(required=true) for this to be enforced.
Also note that this implementation will be used only when
Builder.requireLibraryDependencies() is enabled. If not enabled then an implementation
similar to this type will be inlined directly into the code-generated builder type.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Default constructor.RequiredAttributeVisitor(boolean allowNullsByDefault) Deprecated.Constructor. -
Method Summary
-
Constructor Details
-
RequiredAttributeVisitor
public RequiredAttributeVisitor()Deprecated.Default constructor. -
RequiredAttributeVisitor
public RequiredAttributeVisitor(boolean allowNullsByDefault) Deprecated.Constructor.- Parameters:
allowNullsByDefault- true if nulls should be allowed
-
-
Method Details
-
visit
public void visit(String attrName, Supplier<Object> valueSupplier, Map<String, Object> meta, Object userDefinedCtx, Class<?> type, Class<?>... typeArgument) Deprecated.Description copied from interface:AttributeVisitorVisits the attribute named 'attrName'.- Specified by:
visitin interfaceAttributeVisitor<Object>- Parameters:
attrName- the attribute namevalueSupplier- the attribute value suppliermeta- the meta information for the attributeuserDefinedCtx- a user defined context that can be used for holding an object of your choosingtype- the type of the attributetypeArgument- the type arguments (if type is a parameterized / generic type)
-
validate
public void validate()Deprecated.Performs the validation. Any errors will result in a thrown error.- Throws:
IllegalStateException- when any attributes are in violation with the validation policy
-