Interface AttributeVisitor<T>

Type Parameters:
T - type of the user defined context this attribute visitor supports
All Known Subinterfaces:
ConfigBeanBuilderValidator.ValidationRound
All Known Implementing Classes:
RequiredAttributeVisitor
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AttributeVisitor<T>
A functional interface that can be used to visit all attributes of this type.

This type is used when Builder.requireLibraryDependencies() is used. When it is turned off, however, an equivalent type will be code-generated into each generated bean.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    visit(String attrName, Supplier<Object> valueSupplier, Map<String,Object> meta, T userDefinedCtx, Class<?> type, Class<?>... typeArgument)
    Visits the attribute named 'attrName'.
  • Method Details

    • visit

      void visit(String attrName, Supplier<Object> valueSupplier, Map<String,Object> meta, T userDefinedCtx, Class<?> type, Class<?>... typeArgument)
      Visits the attribute named 'attrName'.
      Parameters:
      attrName - the attribute name
      valueSupplier - the attribute value supplier
      meta - the meta information for the attribute
      userDefinedCtx - a user defined context that can be used for holding an object of your choosing
      type - the type of the attribute
      typeArgument - the type arguments (if type is a parameterized / generic type)