Tal Liron
2013-10-09 14:13:24 UTC
If we have a Java class:
class MyClass {
public static void myMethod();
}
And in JavaScript try:
myInstance.myMethod()
Then we would get an exception that looks something like this:
myscript.js:... TypeError: ***@... has no such function "myMethod"
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:56)
at
jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:212)
at
jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:184)
at
jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:171)
at
jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkBean(NashornBottomLinker.java:113)
at
jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:68)
at
jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
at
jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:138)
at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:232)
at
jdk.nashorn.internal.scripts.Script$default.runScript(component/services/sincerity/version/default.js:6)
at
jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:527)
at
jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:204)
at
jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:367)
class MyClass {
public static void myMethod();
}
And in JavaScript try:
myInstance.myMethod()
Then we would get an exception that looks something like this:
myscript.js:... TypeError: ***@... has no such function "myMethod"
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:56)
at
jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:212)
at
jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:184)
at
jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:171)
at
jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkBean(NashornBottomLinker.java:113)
at
jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:68)
at
jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
at
jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:138)
at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:232)
at
jdk.nashorn.internal.scripts.Script$default.runScript(component/services/sincerity/version/default.js:6)
at
jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:527)
at
jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:204)
at
jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:367)