Annotation Interface ImplicitCast


@Retention(CLASS) @Target(METHOD) public @interface ImplicitCast
Marks an implicit cast method. Implicit cast methods are expected to have a return type, the target type and a source type the first parameter type. Any other method signature is not allowed. The source and target type must not be the same type. The order of implicit casts determines the order in which they are checked. This is important to optimize performance but also to provide a precedence for ambiguous type checks.

Example usage:

 @TypeSystem
 public static class ExampleTypeSystem {

     @ImplicitCast
     public static double castInt(int value) {
         return value;
     }

     @ImplicitCast
     public static double castShort(short value) {
         return value;
     }
 }

 
For details on how to use implicit casts see TypeSystem.
Since:
0.8 or earlier
See Also: