A class or interface marked by this attribute is mapped directly to a platform class or interface.
A class maps to a platform class and an interface maps to a platform interface. Only public constructors and methods are mapped, plus any constant static fields (which are marked as 'final' in Java). The platform's typing hierarchy will also be mirrored. Throughout the runtime the instance of a mapped class is essentially a wrapper of the underlying instance.
This approach allows a convenient and easy-to-use platform inter-operation at a very small price of performance. This attribute also makes it possible to bind arbitrary JVM objects created outside the engine. For more details, see tutorial here.
To use this attribute, access policy System.Interop/map
must be enabled.
Type | Name | Signature |
---|---|---|
field | className | public String className |
field | methodName | public String methodName |
public String className
The class/interface name to map to. This name must be a fully qualified name and the type is expected to be loaded into JVM on demand.
public String methodName
The method name to map to. This is currently not supported.