Annotation Interface TypeCheck
Overrides the standard way of checking for a certain type in a
TypeSystem. This is useful
for types where the guest language specific type check can be implemented more efficiently than
an instanceof check. The annotated method must be contained in a TypeSystem annotated
class. Type checks must conform to the following signature:
public static boolean is{TypeName}(Object
value). The checked type must be a type declared in the TypeSystem.
If no TypeCheck is declared then the type system implicitly uses a type check that can be
declared as follows:
@TypeCheck(Type.class)
public static boolean isType(Object value) {
return value instanceof Type;
}
- Since:
- 0.8 or earlier
- See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
value
Class<?> value- Since:
- 0.8 or earlier
-