Annotation Type CSharpTypeBounds


  • @Retention(SOURCE)
    @Target({TYPE,METHOD})
    public @interface CSharpTypeBounds
    This annotation appears on the declaration of a class using generic type parameters if the C# code needs to have type bounds that cannot be inferred directly from the Java declaration. A typical use case is to declare bounds of T:class if T is constrained to be a reference type - that is, a value that is potentially nullable. Without this bound declaration, assignment of T to null will be rejected by the C# compiler.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String[] bounds  
    • Element Detail

      • bounds

        java.lang.String[] bounds
        Default:
        {}