Annotation Type Aspect


  • @Target(ANNOTATION_TYPE)
    @Retention(RUNTIME)
    public @interface Aspect
    Meta annotation used to define an Aspect.

    Create an annotation and annotate with @Aspect to define an aspect annotation. The target() specifies the associated type that implements AspectProvider. The aspect provider should be a @Singleton such that registers with avaje-inject.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int ordering
      Specify the priority ordering when multiple aspects are on a method.
      Class<?> target
      Deprecated.
    • Element Detail

      • target

        @Deprecated
        Class<?> target
        Deprecated.
        Deprecated - the target() attribute is no longer required and should be removed.
        Default:
        java.lang.Void.class
      • ordering

        int ordering
        Specify the priority ordering when multiple aspects are on a method.

        When multiple aspects are on a method they are nested. The highest ordering value will be the outer-most aspect, the lowest ordering will be the inner-most aspect.

        The outer-most aspect will have it's before executed first, followed by the before of the inner nested aspects ultimately down the invocation of the target method.

        The reverse ordering occurs for after with the outer-most aspect having it's after executed last.

        Returns:
        The ordering of this aspect. High value for outer-most aspect.
        Default:
        1000