Object instantiation in Gosu
A Gosu object is an instance of a type. A type can be a class or other construct exposed to Gosu through the type system. A class is a collection of object data and methods. To instantiate the class means to use the class definition to create an in-memory copy of the object with its own object data. Other code can get or set properties on the object. Other code can call methods on the object, which are functions that perform actions on that unique instance of the object.
In PolicyCenter, entity instances are special objects defined through the data model configuration files. PolicyCenter persists data in a database at special times in the object life cycle.
Use the Gosu new operator to create an instance from a class
definition or other type that can be instantiated.
For example:
new java.util.ArrayList() // Create an instance of an ArrayList.
new Integer[5] // Create an array of integers.
new LossCause[3] // Create an array of loss cause typecodes.
See also
