IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.framework.uml2.adapters
Class Interface

java.lang.Object
  extended bycom.ibm.xtools.patterns.framework.uml2.adapters.AbstractElement
      extended bycom.ibm.xtools.patterns.framework.uml2.adapters.Classifier
          extended bycom.ibm.xtools.patterns.framework.uml2.adapters.Interface

public class Interface
extends com.ibm.xtools.patterns.framework.uml2.adapters.Classifier

This UML2 adapter class for UML2 interface. Contains many helper methods that together form a new interface for pattern instances to use (instead of the normal UML2 interface methods that are exposed). Some of the same type of helper methods that are found in a model facade would be found here but distributed amongst the responsible metaclasses. For example, Interface will wrap a UML2 interface.


Method Summary
 Operation ensureAtLeastOneStaticOperation(String name)
          Ensure at least one static operation on this interface, if an operation doesn't exist create one with the given name.
 Implementation ensureInterfaceImplementation(Class realizingClass)
          Ensure given realizing class has an implementation relationship to this interface.
 void ensureInterfaceOperations(Class realizingClass)
          Ensure operations are realized from interface on to the realizing class.
 Operation ensureStaticOperation(String name)
          Ensure a static operation with the given name on this interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

ensureAtLeastOneStaticOperation

public Operation ensureAtLeastOneStaticOperation(String name)
Ensure at least one static operation on this interface, if an operation doesn't exist create one with the given name.

Parameters:
name - the given name if creation of an operation is necessary
Returns:
the ensured operation

ensureInterfaceImplementation

public Implementation ensureInterfaceImplementation(Class realizingClass)
Ensure given realizing class has an implementation relationship to this interface.

Parameters:
realizingClass - the class that must realize this interface
Returns:
the implementation relationship ensured

ensureInterfaceOperations

public void ensureInterfaceOperations(Class realizingClass)
Ensure operations are realized from interface on to the realizing class.

Parameters:
realizingClass - class that realize the interface's operations

ensureStaticOperation

public Operation ensureStaticOperation(String name)
Ensure a static operation with the given name on this interface.

Parameters:
name - the name of the operation
Returns:
the operation ensured, whether created or retrieved

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.