typeMethod Option

The typeMethod method option indicates that the method is a type method.

A type method provides a way of calling a method declared on a type (class, primitive, or interface) without having to have an instance of the type. While the method is declared on a type and has the same scope as an instance method, at run time the receiver is the type on which the method is declared; not an instance of the type.

Type methods enable you to define and call methods on class, primitive, or interface types without having to instantiate a dummy object, which simplifies aspects of JADE application development. Examples of a type method are a:

A type method is identified by the typeMethod method option on the method declaration; for example:

demoTypeMethod() typeMethod;

Alternatively, you can specify this method option by using the Type Method check box in the JADE Method Definition or External Method Definition dialog. By default, this option is unset.

For details, see "Type Methods", later in this chapter.