The embedded scripting engine is tightly integrated with the Java type system. Native java classes, both
from the Java SDK and from the JOSM code base,
are available for scripting.
You can use the fully qualified class names of a Java class in a script. JavaScript doesn't have a
keyword import. You can't and you don't have to import Java classes in a script.
Declare a local variable referring to the Java class, if you wan't to avoid the fully qualified
Java class names.
Enriched Java classes - Mixins
The JOSM Scripting Plugin ships with JavaScript mixins for a selection of
Java classes, in particular for those, which are often used in scripts.
A JavaScript mixin decorates a Java class with additional properties and methods,
which are implemented in JavaScript.
The following examples show how LatLonMixin decorates the
native JOSM class LatLon.