Product Documentation
Cadence SKILL++ Object System Reference
Product Version IC23.1, June 2023

getMethodSpecializers

getMethodSpecializers(
s_genericFunction
)
=> l_classNames / nil

Description

Returns the specializers of all methods currently associated with the given generic function, in a list of class names. The first element in the list is t if there is a default method.

Arguments

s_genericFunction

A symbol that denotes a generic function object.

Value Returned

l_classNames

List of method specializers that are currently associated with s_genericFunction. The first element in the list is t if there is a default method.

nil

s_genericFunction is not a generic function.

Examples

defmethod( met1 ((obj number)) println(obj))
=> t
getMethodSpecializers(’met1) 
=>(number)
defclass( XGeometricObj () () )
=> t
defgeneric( whoami (obj) printf("Generic Object\n"))
=> t
defmethod( whoami (( obj XGeometricObj)) printf( "XGeometricObj, which is also a\n"))
=> t
getMethodSpecializers(’whoami)
=> (t XGeometricObj)
getMethodSpecializers(’car)
=> *Error* getMethodSpecializers: first argument must be a generic function - car
nil
getMethodSpecializers(2)
=> *Error* getMethodSpecializers: argument #1 should be a symbol (type template = "s") - 2

Related Topics

Generic Functions and Methods


Return to top
 ⠀
X