Anonymous user
Reflection/List methods: Difference between revisions
no edit summary
m (Omit from Rust) |
No edit summary |
||
Line 583:
unpack
xpcall</pre>
=={{header|Nanoquery}}==
<lang Nanoquery>// create a class with methods that will be listed
class Methods
def static method1()
return "this is a static method"
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</lang>
{{out}}
<pre>add
toString
exp
getField
copy
divide
setField
multiply
lessThan
greaterThan
getInnerClass
getInnerStack
getInterpreter
serialize
deserialize
deserialize
subtract
isSerializable
isEqual
mod
wait
wait
wait
equals
hashCode
getClass
notify
notifyAll
Methods
method2
method2
operator=</pre>
=={{header|Objective-C}}==
|