Java typeName and isType functions?

A. Sundararajan sundararajan.athijegannathan at
Thu Feb 6 07:52:18 PST 2014


Java.isType(obj) -  Returns true if the specified object 'obj' is a Java 
type object. i.e., it was obtained by an earlier Java.type call

jjs> var Vector = Java.type("java.util.Vector");
jjs> Java.isType(Vector)
jjs> Java.isType(334)

Java.typeName(obj) - Returns fully qualified name of the type object 
specified (as a string)

jjs> Java.typeName(Vector)


On Thursday 06 February 2014 09:10 PM, Tom McGinn wrote:
> Hi Jim, et al -
> For completeness (I am writing this lesson on Nashorn for an Oracle 
> course), can you give me
> a one sentence description of the Java.isType and Java.typeName 
> functions?
> Thanks,
> Tom

More information about the nashorn-dev mailing list