Annotation Type Introduction


  • @Documented
    @Retention(RUNTIME)
    @Target({ANNOTATION_TYPE,TYPE})
    @InterceptorBinding(kind=INTRODUCTION)
    public @interface Introduction

    Introduction advice allows interfaces and abstract classes to be implemented at compile time by MethodInterceptor implementations.

    This annotation should be applied as a meta annotation to another annotation that references the MethodInterceptor by type

    For example:

    
      @Introduction
      @Type(ExampleIntroduction.class)
      @Documented
      @Retention(RUNTIME)
       public @interface Example {
       }
     

    Note that the annotation MUST be RetentionPolicy.RUNTIME and the specified Type must implement MethodInterceptor

    Since:
    1.0
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class[] interfaces
      Additional interfaces that the introduction advice should implement.
    • Element Detail

      • interfaces

        java.lang.Class[] interfaces
        Additional interfaces that the introduction advice should implement. Note that if introduction advise is applied to a concrete class at least 1 interface must be specified
        Returns:
        The additional interfaces to implement
        Default:
        {}