Annotation 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
Author:
Graeme Rocher
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Additional interfaces that the introduction advice should implement.
  • Element Details

    • interfaces

      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:
      {}