New answers tagged methods
Score of 1
1
vote
Accepted
Get the return type of a method based on fully qualified class name, method name, and method parameter types
The Scala reflection API can do this while preserving the actual Scala types (Int rather than the erased int, which is what the Java reflection API would report):
import scala.reflect.runtime.{...
Score of 0
0
votes
Get the return type of a method based on fully qualified class name, method name, and method parameter types
Use Scala reflection to get the MethodSymbol and inspect its returnType. For multiple parameter groups, match against paramLists rather than treating all parameters as one list. If you only need the ...
Score of 1
1
vote
Git - how do I view the change history of a method/function?
In my case, I wanted to trace the evolution of a protobuf message (~a struct), so only a regexp helped: it carves out a portion of the diff
starting with message StructName {
ending with }
within a ...
Score of -1
-1
votes
Automatically set instance variable as method argument?
method(:initialize).parameters.map { |_, arg| eval("@#{arg} = #{arg}", binding, __FILE__, __LINE__) }
Top 50 recent answers are included
Related Tags
methods × 30395java × 11430
class × 4757
c# × 3620
python × 2980
arrays × 2568
javascript × 2356
function × 1670
object × 1634
ruby × 1427
oop × 1250
php × 1239
android × 1121
c++ × 1112
string × 905
objective-c × 809
parameters × 767
ruby-on-rails × 766
variables × 746
return × 640
static × 638
inheritance × 572
constructor × 483
call × 478
arraylist × 472