Gosu classes
Gosu classes correspond to Java classes. Gosu class files end in .gs.
Gosu classes reside in a file-based package structure. You can extend classes in the base configuration of PolicyCenter to add properties and methods, and you can write your own Gosu classes. You define classes in Gosu, and you access the properties and call the methods of Gosu classes from Gosu code within methods.
You create and reference Gosu classes
by name, just as in Java. For example, you define a class named MyClass in a package named MyPackage. You define a method
on your class named getName.
After you define your class, you can instantiate an instance of the class
and call the method on that instance, as the following Gosu sample code
demonstrates.
var myClassInstance = new MyPackage.MyClass()
var name = myClassInstance.getName()
Do not create a Gosu class, enhancement, or template at the root level, outside a package. Studio does not recognize Gosu classes, enhancements, or templates that reside at the root level.
See also
