Class definition file structure
- Last Updated: October 8, 2020
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
The structure for coding the source file for a class or interface definition has the following general syntax.
Syntax
|
Element descriptions for this syntax diagram follow:
- ROUTINE-LEVEL-statement
- A
ROUTINE-LEVEL ON ERROR UNDO, THROWstatement. This statement changes the default error handling for procedures, user-defined functions, methods, and constructors so that any error object that has been thrown to the routine block is passed up to the caller of the routine. This statement can appear before or after any USING-statement. For more information on this statement, see Raise and handle error conditions. - USING-statement
- A statement that allows abbreviated references to other class or
interface types within this class or interface definition, without having to specify the
package in the class or interface type reference. You can specify multiple
USINGstatements to make abbreviated references to class or interface types defined in different packages. This statement can appear before or after any ROUTINE-LEVEL-statement. For more information on this statement, see Reference an object type name without its package. - CLASS-statement
- A statement that begins a class definition by specifying its class type name and its relationship to implemented interfaces and other classes in its class hierarchy. For more information, see Define classes.
- INTERFACE-statement
- A statement that begins an interface definition by specifying its interface type name. An interface is defined independently of and unrelated to any class, but it can inherit members from one or more other interfaces. For more information, see Define interfaces.
- class-or-interface-definition
- Statements that are part of the class or interface definition. For user-defined classes, these statements define class members and other elements of the class definition. For user-defined interfaces, these statements define method, property, and event prototypes (and related data definitions) for methods, properties, and events that can later be implemented by user-defined classes. For classes, see Define classes. For interfaces, see Define interfaces.
- END-statement
- The statement that terminates a class or interface definition. For classes, see Define classes. For interfaces, see Define interfaces.