Package bridge

Annotation Interface Bridge


@Repeatable(Bridges.class) @Target({CONSTRUCTOR,METHOD,FIELD}) public @interface Bridge
An annotation for creating field & method bridges
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Specifies different access modifiers
    Class<? extends Throwable>[]
    Specifies different checked exceptions
    int
    Specifies when to start loading arguments from the bridge method
    int
    Specifies how many parameters from the bridge method to send to the @annotated method
    Specifies a different field/method name
    Class<?>[]
    Specifies different method parameters
    Specifies a different field/return type
    Specifies generic type data
    Specifies that this bridge is @Deprecated
    int
    Specifies when to start inserting arguments into the @annotated method
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    final access modifier for field & method bridging
    static final int
    private access modifier for field & method bridging
    static final int
    protected access modifier for field & method bridging
    static final int
    public access modifier for field & method bridging
    static final int
    static access modifier for field & method bridging
    static final int
    synthetic access modifier for field & method bridging
    static final int
    transient access modifier for field bridging
    static final int
    varargs access modifier for method bridging
  • Field Details

    • PUBLIC

      static final int PUBLIC
      public access modifier for field & method bridging
      See Also:
    • PROTECTED

      static final int PROTECTED
      protected access modifier for field & method bridging
      See Also:
    • PRIVATE

      static final int PRIVATE
      private access modifier for field & method bridging
      See Also:
    • STATIC

      static final int STATIC
      static access modifier for field & method bridging
      See Also:
      Notes:
      This flag cannot be added to fields or methods where it does not already exist
    • FINAL

      static final int FINAL
      final access modifier for field & method bridging
      See Also:
    • SYNTHETIC

      static final int SYNTHETIC
      synthetic access modifier for field & method bridging
      See Also:
      Notes:
      This flag is applied by default to all bridges.
    • TRANSIENT

      static final int TRANSIENT
      transient access modifier for field bridging
      See Also:
      Notes:
      This flag is applied by default to field bridges.
    • VARARGS

      static final int VARARGS
      varargs access modifier for method bridging
      See Also:
  • Element Details

    • access

      int access
      Specifies different access modifiers
      Returns:
      Access Modifiers
      Notes:
      Specify an inverted (negative) value to remove existing modifiers using bit-masking
      Default:
      -1
    • name

      String name
      Specifies a different field/method name
      Returns:
      Name
      Default:
      ""
    • params

      Class<?>[] params
      Specifies different method parameters
      Returns:
      Parameters
      Notes:
      The position of parameters in the bridge must be the same as those in the @annotated method
      Default:
      {bridge.Bridges.class}
    • fromIndex

      int fromIndex
      Specifies when to start loading arguments from the bridge method
      Returns:
      From Index
      Default:
      0
    • toIndex

      int toIndex
      Specifies when to start inserting arguments into the @annotated method
      Returns:
      To Index
      Default:
      0
    • length

      int length
      Specifies how many parameters from the bridge method to send to the @annotated method
      Returns:
      Parameter Amount
      Default:
      2147483647
    • exceptions

      Class<? extends Throwable>[] exceptions
      Specifies different checked exceptions
      Returns:
      Checked Exception List
      Default:
      {bridge.Unchecked.class}
    • signature

      String signature
      Specifies generic type data
      Returns:
      Signature String
      Default:
      ""
    • returns

      Class<?> returns
      Specifies a different field/return type
      Returns:
      Return Type
      Default:
      bridge.Bridges.class
    • status

      Deprecated status
      Specifies that this bridge is @Deprecated
      Returns:
      Deprecation Status
      Default:
      @java.lang.Deprecated