An Object-Oriented Meta-Model

Meta Models

We have seen that the object-oriented development process begins by creating a domain model (in the form of a UML class diagram). For example, before developing inventory control software, a programmer tries to gain a deeper understanding of the application domain by creating a model of a warehouse with classes representing concepts like shipping order, loading dock, pallet, bin, forklift, etc. During the design phase the warehouse model evolves into the model component of the application. But what instead of inventory control the application was StarUML, IntelliJ, or a container-component application like SmartBox? In this case the domain is object-oriented modeling and we must begin by building an object-oriented model of object-oriented modeling. Such a model is called a meta-model. In such a model classes, methods, fields, etc. will all be represented by objects belonging to Class, Method, and Field classes, respectively, and object-oriented relationships such as extends, implements, and association are represented by instances of meta-model associations.

The Object-Oriented Domain

A type has a name. A class is a type. An interface is a type. A class extends at most one other class. A class can implement many interfaces. An interface can extend many other interfaces. A class has a newInstance operation that returns an object.

A class has many members. A member has a name and a type. A field is a member. A method is a member. An abstract method is a member.

An interface has many abstract methods.

A method implements an abstract method. A method has an invoke operation that has as its input an object called this and a list of objects called args and returns an object. An abstract method has zero or more parameters. A parameter has a name and a type.

Lab 1

Draw a UML class diagram that models the object-oriented domain.