First page Back Continue Last page Overview Graphics
Language Extensions -
Modal Methods
Service programmers annotate methods with a “when” clause, to make them modal. The clause declares a named property, e.g.
class SearchEngine {
Vector query(String searchTerm) when CAN_SEARCH { ... }
}
To control use of the modal query method, policies are written that define exactly when the SearchEngine service has the CAN_SEARCH property and when it does not.
Notes: