Interface ThisLazyAware

  • All Implemented Interfaces:

    
    public interface ThisLazyAware<T>
    
                        
    @Setter(onMethod_ = {@Autowired, @Lazy})
    protected RuntimeConfServiceImpl thisLazy = this;
    
    Except for the following cases, there are runtime type exceptions,
    where `M` represents the enhanced method used by thisLazy,
    * `T` is an interface, and all `M` come from `T` (best practice)
    * `T` is a class, and `M` is enhanced by Cglib (proxyTargetClass=true)
    * no `M`, in which case `T` is itself (but should not use this pattern)
    
    Since:

    2024-05-10

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void setThisLazy(@NotNull() T thisLazy) inject enhanced this before Bean Initialization
      Class<out Object> thisLazyType() the type of thisLazy, Object to skip check.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • setThisLazy

         abstract void setThisLazy(@NotNull() T thisLazy)

        inject enhanced this before Bean Initialization

        Parameters:
        thisLazy - enhanced bean