Type Guard Expression

The syntax of the type guard expression is:

object-reference-expression.class-name

When a type guard is applied to an object reference, the reference is treated as a reference to an instance of the class specified by the class‑name value. If the expression is not of class class‑name, a runtime exception is raised. For more details, see "Using Type Guards", in the following subsection.

For convenience and to help safeguard from typecasting to a class that does not implement the interface at compile time, JADE allows you to typecast interface objects directly to any class implementing the interface without first having to typecast to the Object class; for example:

football := iSports.Football;