Water 5-Type and Object System-Type System
class and type type.call_method_of
Contract
Parameter keyDefault valueType
a_methodreq
uiopt
Water Contract
<class type.call_method_of
  a_method=req
  ui      =opt
/>
Specifies a type such that if the object in question is passed as the subject to the method within call_method_of and that call returns true, then the object is of that type.
<set starts_with_x_of = 
    type.<call_method_of
      <method null>
       _subject.<is_a string/>.<and
       _subject.<starts_with "x"/>/>
      </method>
  />/>
<v
   starts_with_x_of.<is_type_for "x_rated"/> 
   starts_with_x_of.<is_type_for "y_rated"/>
   starts_with_x_of.<is_type_for 917/> 
  />
<v true false false/>
call_method_of is the most flexible of types allowing you to write arbitrary code to determine the 'typeness' of an object.