Added public FunctionObject.getMethodOrConstructor() to resolve
http://bugzilla.mozilla.org/show_bug.cgi?id=108719
This commit is contained in:
Родитель
adcaf8d572
Коммит
82aeb6ef28
|
@ -219,6 +219,18 @@ public class FunctionObject extends BaseFunction
|
|||
return getArity();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Java method or constructor this function represent.
|
||||
*/
|
||||
public Member getMethodOrConstructor()
|
||||
{
|
||||
if (method != null) {
|
||||
return method;
|
||||
} else {
|
||||
return ctor;
|
||||
}
|
||||
}
|
||||
|
||||
static Method findSingleMethod(Method[] methods, String name)
|
||||
{
|
||||
Method found = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче