Interface PropertyAutoPopulator<T extends java.lang.annotation.Annotation>

  • Type Parameters:
    T - the populated annotation type
    All Superinterfaces:
    io.micronaut.core.order.Ordered
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @Indexed(PropertyAutoPopulator.class)
    @Internal
    @FunctionalInterface
    public interface PropertyAutoPopulator<T extends java.lang.annotation.Annotation>
    extends io.micronaut.core.order.Ordered
    The interface allows automatically populating new values, potentially based on the previous value for AutoPopulated properties.

    NOTE: Regarded as experimental and internal at this stage.

    Since:
    2.3.0
    See Also:
    AutoPopulated
    • Field Summary

      • Fields inherited from interface io.micronaut.core.order.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Detail

      • populate

        @NonNull
        java.lang.Object populate​(RuntimePersistentProperty<?> property,
                                  @Nullable
                                  java.lang.Object previousValue)
        Auto-populating the property.
        Parameters:
        property - the property to auto-populate
        previousValue - the previous value, if any
        Returns:
        new value