org.eclipse.ocl.examples.pivot.manager
Class ImplementationManager

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.manager.ImplementationManager

public class ImplementationManager
extends java.lang.Object

ImplementationManager encapsulates the knowledge about known feature implementations.


Field Summary
protected  MetaModelManager metaModelManager
           
 
Constructor Summary
protected ImplementationManager(MetaModelManager metaModelManager)
           
 
Method Summary
 void addClassLoader(java.lang.ClassLoader classLoader)
           
 void dispose()
           
 java.util.List<java.lang.ClassLoader> getClassLoaders()
           
protected  LibraryFeature getOperationImplementation(Operation operation)
           
protected  LibraryFeature getPropertyImplementation(Property property)
           
 LibraryFeature loadImplementation(Feature feature)
          Return the implementation of a feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metaModelManager

protected final MetaModelManager metaModelManager
Constructor Detail

ImplementationManager

protected ImplementationManager(MetaModelManager metaModelManager)
Method Detail

addClassLoader

public void addClassLoader(java.lang.ClassLoader classLoader)

getClassLoaders

public java.util.List<java.lang.ClassLoader> getClassLoaders()

getOperationImplementation

protected LibraryFeature getOperationImplementation(Operation operation)
                                             throws java.lang.ClassNotFoundException,
                                                    java.lang.SecurityException,
                                                    java.lang.NoSuchFieldException,
                                                    java.lang.IllegalArgumentException,
                                                    java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchFieldException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException

getPropertyImplementation

protected LibraryFeature getPropertyImplementation(Property property)
                                            throws java.lang.ClassNotFoundException,
                                                   java.lang.SecurityException,
                                                   java.lang.NoSuchFieldException,
                                                   java.lang.IllegalArgumentException,
                                                   java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchFieldException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException

dispose

public void dispose()

loadImplementation

public LibraryFeature loadImplementation(Feature feature)
                                  throws java.lang.ClassNotFoundException,
                                         java.lang.SecurityException,
                                         java.lang.NoSuchFieldException,
                                         java.lang.IllegalArgumentException,
                                         java.lang.IllegalAccessException
Return the implementation of a feature.

Parameters:
feature - to be implemented.
Returns:
the implementation, or null if the feature has no implementation as is the case for a normal model feature
Throws:
java.lang.ClassNotFoundException - if the implementation class realising the implementation is not loadable
java.lang.NoSuchFieldException - if the implementation class realising the implementation does not provide a static INSTANCE field
java.lang.SecurityException - if the implementation class is not accessible
java.lang.IllegalAccessException - if the implementation class is not accessible
java.lang.IllegalArgumentException - if the implementation class is not accessible