Try OpenEdge Now
skip to main content
Object-oriented Programming
Getting Started with Classes, Interfaces, and Objects : Class definition files and object type names
 

Class definition files and object type names

All class and interface definitions reside in a class definition file, and each class definition file can contain only one class or interface definition. The source (definition) file for a class (distinct from an external procedure) has the .cls filename extension. However, a compiled class file contains r-code, and, like a compiled procedure file, it has the .r filename extension. So as with.w (AppBuilder-coded) and .p (hand-coded) procedure files, you cannot have class and procedure files with the same name whose r-code resides in the same location.
As with procedures, you can use include files to extend the definition of a class beyond a single source code file. Classes are always publicly scoped and therefore are available to all other classes and procedures within an application. Classes are not accessible across an application server boundary. For more information on a comparison of class and procedure files, see Comparing class definition files and procedure source files.
Each class or interface definition represents a user-defined object type that you identify using a class or interface type name. This object type name derives from both the class or interface definition and the location of the class file where it is defined. For more information on class and interface type names, see Defining and referencing object type names.
* Class definition file structure
* Defining and referencing object type names
* Referencing an object type name without its package
* Comparing class definition files and procedure source files