Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / %SYSTEM.Java
Private  Storage   

%SYSTEM.Java


For InterSystems internal use only, subject to change without notice

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 3 8


Summary


Properties
JObj JVMClsDesc Refs

Methods
%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IncrementCount %IsA %IsModified
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject BuildParams ClassMethod GetParams
Method


Parameters


• parameter %MODULELOCATION = "modules/cachej/inc/";
• parameter %MODULENAME = "%cachej";

Properties


• property JObj as %CPP.LongLong;
Refrence to Java object
• property JVMClsDesc as %CPP.LongLong;
Java class descriptor ID
• property Refs as %CPP.LongLong [ MultiDimensional ];
Orefs passed to java

Methods


• private method %OnClose() as %Status
This callback method is invoked by the %Close method to provide notification that the current object is being closed.

The return value of this method is ignored.

• private method %OnNew(ClsName As %CPP.UTF8) as %Status
This callback method is invoked by the %New method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

• final classmethod BuildParams() as %CPP.Binary
Return a $c(0) separated list of params to pass JVM
• classmethod ClassMethod(ClsName As %CPP.UTF8, mthdname As %CPP.UTF8) as %String [ Language = cpp ]
Invoke a static Java method, the first arg is the class name, then the method name, args
• private method CleanCls(ClsId As %CPP.LongLong) [ Language = cpp ]
Disassociate a Java Class
• classmethod GetParams() as %CPP.StrList
Return a list of params to pass to JVM, i.e. return $lb("-verbose:jni","-agentlib:jdwp=transport=dt_socket,server=y,address=8000")
• private method InitCls(ClsName As %CPP.UTF8) as %CPP.LongLong [ Language = cpp ]
Associate with a Java Class
• method Method(MethodName As %CPP.UTF8) as %String [ Language = cpp ]
Invoke a Java method, the first arg is the method name, args (they are passed as is)