Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.2 Online Documentation (MoTW) Revision 3

%Class Special Method (databasic_sp_method_class.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

%Class Special Method

This method is used with a connection object to create a reference to a class object on the language server. The %Static method is a synonym for the %Class method.

Syntax

%Class(Class)

Syntax Elements

Class The Java class name to create a reference to.

Examples

Var = %Class(Integer)->MAX_VALUE

Return the static fields MAX_VALUE of the Integer class. This is equivalent to the Java syntax

int Var = Integer.MAX_VALUE;

The class reference can be saved in a DBO:

Int = SecondCon->%Class(Integer)
Var = Int->MAX_VALUE

Save a reference to the class Integer to be used later (in this case in the “Var =” line)

Notes

The %Class method can be used with any class, but it is essential to provide access to static fields and methods in classes that do not have a constructor.

See Also

Special Methods

%New

%Array

RealityV15.2Revision 3Comment on this topic