RosettaCodeData/Task/Reflection-List-methods/Nanoquery/reflection-list-methods.nanoquery

21 lines
479 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
// create a class with methods that will be listed
class Methods
def static method1()
return "this is a static method. it will not be printed"
end
def method2()
return "this is not a static method"
end
def operator=(other)
// operator methods are listed by both their defined name and
// by their internal name, which in this case is isEqual
return true
end
end
// lists all nanoquery and java native methods
for method in dir(new(Methods))
println method
end