#
# $Id: method.icn,v 1.2 2004-02-12 17:07:56 rparlett Exp $
#
# This file is in the public domain.
#
# Author: Robert Parlett (parlett@dial.pipex.com)
#
package lang
#
# This class encapsulates information about a class method.
#
class Method(as_proc, method_name, defining_class)
#
# Get the procedure name, ec "Mypackage__Myclass_mymethod"
#
method get_procedure_name()
::image(as_proc) ? {
="procedure "
return ::tab(0)
}
end
#
# Get the method name eg "mymethod"
#
method get_method_name()
return method_name
end
#
# Get the name of the defining class
#
method get_defining_class()
return defining_class
end
#
# Get as a procedure
#
method get_as_procedure()
return as_proc
end
#
# Invoke with the specified object and parameters
#
method invoke(obj, args[])
as_proc ! ([obj] ||| args)
end
#
# Invoke with the specified object and parameters, given as a list
#
method invoke_list(obj, args)
as_proc ! ([obj] ||| args)
end
end
This page produced by UniDoc on 2021/04/15 @ 23:59:44.