G
Gene Wirchenko
Dear Jav'ers:
Maybe I will find this after searching more, but so far, no good.
I want to pass a parameter of a method name to another method.
N.B.: I do not want to pass the method name as a string. I want
to pass it as a pointer / reference / whatever term is used for this
in Java.
I am doing this to test different ways of parsing. I want to be
able to do this (timing details not shown):
for (i=1; i<=nRepetitions; i++)
Parse(ThisWay);
for (i=1; i<=nRepetitions; i++)
Parse(ThatWay);
static void Parse
(
????? What goes here? MethodToUse
)
{
...
????? How exactly is this done? MethodToUse(actual parms)
...
}
static returntype ThisWay(formal parms)
{...}
static returntype ThatWay(formal parms)
{...}
The signatures and return types of ThisWay() and ThatWay() would
be identical.
Sincerely,
Gene Wirchenko
Maybe I will find this after searching more, but so far, no good.
I want to pass a parameter of a method name to another method.
N.B.: I do not want to pass the method name as a string. I want
to pass it as a pointer / reference / whatever term is used for this
in Java.
I am doing this to test different ways of parsing. I want to be
able to do this (timing details not shown):
for (i=1; i<=nRepetitions; i++)
Parse(ThisWay);
for (i=1; i<=nRepetitions; i++)
Parse(ThatWay);
static void Parse
(
????? What goes here? MethodToUse
)
{
...
????? How exactly is this done? MethodToUse(actual parms)
...
}
static returntype ThisWay(formal parms)
{...}
static returntype ThatWay(formal parms)
{...}
The signatures and return types of ThisWay() and ThatWay() would
be identical.
Sincerely,
Gene Wirchenko