org.mindswap.ocl
Class OCLRegistry

java.lang.Object
  extended byorg.mindswap.ocl.OCLRegistry

public class OCLRegistry
extends java.lang.Object


Constructor Summary
OCLRegistry()
           
 
Method Summary
 boolean contains(OCLObject theObject)
          Returns whether or not the OCLObject is in the registry
 boolean contains(java.lang.String theName)
          Returns whether and object with the specified URL is registered
 java.lang.Object get(java.lang.String theName)
          Gets an object with the specified url from the registry, if it exists
 void register(OCLObject theObject)
          Registers an OCL object.
 void register(java.lang.String theURL, java.lang.Object theObject)
          Register a URL with the specified object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OCLRegistry

public OCLRegistry()
Method Detail

register

public void register(java.lang.String theURL,
                     java.lang.Object theObject)
Register a URL with the specified object. Registering an object allows it to be referenced by the methods of OCL objects.

Parameters:
theURL - String the URL indentifier
theObject - Object the object identified by the URL

register

public void register(OCLObject theObject)
Registers an OCL object.

Parameters:
theObject - OCLObject the OCL object to register

contains

public boolean contains(OCLObject theObject)
Returns whether or not the OCLObject is in the registry

Parameters:
theObject - OCLObject the object to look for
Returns:
boolean true if the OCLObject is in the registry, false otherwise

contains

public boolean contains(java.lang.String theName)
Returns whether and object with the specified URL is registered

Parameters:
theName - String url to look for
Returns:
boolean true if the object is in the registry, false otherwise

get

public java.lang.Object get(java.lang.String theName)
Gets an object with the specified url from the registry, if it exists

Parameters:
theName - String the url of the object to retrieve
Returns:
Object the object, or null if one with the specified url does not exist