Annotation Type Replaces


  • @Documented
    @Retention(RUNTIME)
    public @interface Replaces

    Allows a bean to specify that it replaces another bean. Note that the bean to be replaced cannot be an Infrastructure bean.

    Since:
    1.0
    See Also:
    Infrastructure
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class bean  
      java.lang.Class factory  
      java.lang.String named
      The name of the qualifiers of the bean that should be replaced.
      java.lang.Class<? extends java.lang.annotation.Annotation> qualifier
      The name of the qualifiers of the bean that should be replaced.
      java.lang.Class value  
    • Element Detail

      • value

        @AliasFor(member="bean")
        java.lang.Class value
        Returns:
        The bean type that this bean replaces
        Default:
        void.class
      • bean

        @AliasFor(member="value")
        java.lang.Class bean
        Returns:
        The bean type that this bean replaces
        Default:
        void.class
      • factory

        java.lang.Class factory
        Returns:
        The declaring bean type
        Default:
        void.class
      • qualifier

        java.lang.Class<? extends java.lang.annotation.Annotation> qualifier
        The name of the qualifiers of the bean that should be replaced.
        Returns:
        The qualifier
        Default:
        java.lang.annotation.Annotation.class
      • named

        java.lang.String named
        The name of the qualifiers of the bean that should be replaced.
        Returns:
        The qualifier
        Default:
        ""