[an error occurred while processing this directive]
JavaClass Class Implementation Specifications
Client Specifications
Implementation Data Model
Much of the data in a JavaClass object is simple references to other
objects: source code package and file, parent class, and documentation
text.
Getters and setters are implemented for the simple references in the
obvious way.
The information about interfaces, variables, and methods is maintained in
Vector objects.
Methods for adding and removing these data items is implemented by calls to
Vector add and remove methods.
Methods for traversing variables and methods are implemented using
Enumeration objects retrieved from the corresponding Vector objects.
Instance Variables
- JavaPackage sourcePackage -
the package containing the source code for this JavaClass
- JavaFile sourceFile -
the file containing the source code for this JavaClass
- JavaClass parent -
the parent class of this JavaClass
- Vector interfaces -
the interfaces implemented by this JavaClass
- HTMLText purpose -
HTML text describing the purpose of this JavaClass
- HTMLText clientDataModel -
HTML text describing the client data model of this JavaClass
- HTMLText
implementationDataModel -
HTML text describing the implementation data model of this JavaClass
- Vector variables -
the variables for this JavaClass
- Vector methods -
the methods for this JavaClass
Public Method Algorithms
Most of the methods for the JavaClass class have straightforward
implementations.
Exceptions are noted below.
- hasAncestor
Client Specification
local variables:
JavaClass cl
if this equals jcl1
return true
if parent is null
return false
return parent.hasAncestor(jcl1)
- traversePublicClassVariables
Client Specification
parameters:
IVisitor vis
local variables:
Enumeration enum
JavaVariable var
enum = variables.elements()
while enum has more elements
var = enum.nextElement(), coerced to JavaVariable
if var is a public class variable
vis.visit(var)
[an error occurred while processing this directive]