Try OpenEdge Now
skip to main content
Object-oriented Programming
Getting Started with Classes, Interfaces, and Objects : Using the CLASS construct : Namespaces for naming class members

Namespaces for naming class members

ABL defines six distinct namespaces for naming class members, including methods, variables/properties/events, buffers/temp-tables, ProDataSets, queries, and data-sources.
Each class member must have a unique name within its namespace and within its class hierarchy, depending on the access mode and any overriding or overloading of the member. Without overriding or overloading, each non-private namespace member must have a unique name among all other non-private namespace members across the entire class hierarchy where it is defined. Similarly, each private namespace member must have a unique name among all namespace members within its local class definition and among all non-private namespace members defined above it in the class hierarchy. That is, private namespace member names defined higher in a class hierarchy do not affect namespace member names defined lower in the hierarchy. Namespace members that support overriding and overloading can have their names duplicated within their namespace according to the overriding or overloading that is supported for a given member type.
Note: Every temp-table has a default buffer of the same name. You cannot define a buffer of the same name as a temp-table, even within a procedure file. Because of this, the buffer and temp-table are considered to be within the same namespace.
In addition to the namespaces already described, there are two additional implicit members of a class that participate in namespaces: database tables and table (buffer) fields. Because of syntactic similarities, references to database tables and fields can conflict with type-name references to static members of a class.
* Tables
* Fields
* Abbreviations
* Static class members