The jsx3.lang package defines three class-like constructs— Class,Interface, and Package. These constructs are not exactly equivalent to their Java/C++ namesakes.
Classes
Classes have the following characteristics:
Are defined with the jsx3.lang.Class.defineClass() method
Are defined with the jsx3.lang.Package.definePackage() method
Define static fields and static methods
Contain classes and interfaces defined with jsx3.lang.Class
Unlike in Java, General Interface interfaces may contain concrete instance methods. When a class implements an interface, the instance methods of the interface are mixed into the class. A mixed in method overrides a method of the same name inherited from the superclass but doesn't override a method defined in the implementing class or mixed in from an interface coming earlier in the arrImplements parameter to the Class.defineClass() method.
Packages must be explicitly defined with the jsx3.lang.Package.definePackage() method in order to be introspectable. Simply defining the class com.tibco.Widget will not define the package com.tibco. Defining a package isn't required for the class to work. It simply allows the package to be introspected.
Classes, interfaces, and packages can "contain" classes/interfaces. Consider the following code assuming that the class com.tibco.Widget.Encoding is defined: