Object Model

Niagara Types

The heart of Niagara is its type system layered above Java type system. Niagara Types are monikers to a Java class in a specific module. The interface javax.baja.sys.Type is used to represent Types in the Niagara Framework. Every Type is globally identified by its module name and its type name. As previously discussed, a module name globally identifies a Niagara software module. The type name is a simple String name which is mapped to a Java class name by the "module.xml" manifest file. Type's are commonly identified using a format of:

{module name}:{type name}

Examples:
  baja:AbsTime
  bajaui:TextField

Note: to avoid confusion with the various uses of the word type, we will use capitalization when talking about a Niagara Type.

BObject

All Java classes which implement a Niagara Type are subclassed from BObject . It is useful to compare Type and BObject to their low level Java counter parts:

JavaNiagara
java.lang.Object javax.baja.sys.BObject
java.lang.Class javax.baja.sys.Type
java.lang.reflect.Member javax.baja.sys.Slot (discussed later)

Type and Slot capture the concepts of meta-data, while BObject provides the base class of Niagara object instances themselves.

BInterface

Java interfaces may be mapped into the Niagara type system by extending BInterface. You can query whether a Type maps to a class or an interface using the method isInterface().

Classes which implement BInterface must also extent BObject. All BInterfaces class names should be prefixed with "BI".

BObject Semantics

Subclassing from BObject provides some common semantics that all instances of Niagara Types share:

Building BObject

By subclassing BObject you make an ordinary Java class into a Niagara Type. You must obey the following rules when creating a Type: