org.jomc.ri.model
Class RuntimeModules

Package class diagram package RuntimeModules
java.lang.Object
  extended by org.jomc.model.ModelObject
      extended by org.jomc.model.Modules
          extended by org.jomc.ri.model.RuntimeModules
All Implemented Interfaces:
Cloneable, RuntimeModelObject

@Generated(value="org.jomc.tools.SourceFileProcessor 1.2.2",
           comments="See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2")
public class RuntimeModules
extends Modules
implements RuntimeModelObject

Runtime Modules.

Identifier:
org.jomc.ri.model.RuntimeModules
Name:
JOMC RI RuntimeModules
Specifications:
org.jomc.ri.model.RuntimeModelObject @ 1.2
Abstract:
No
Final:
No
Stateless:
No

Version:
1.2
Author:
Christian Schulte 1.2

Field Summary
 
Fields inherited from class org.jomc.model.Modules
module
 
Fields inherited from class org.jomc.model.ModelObject
authors, createDate, deprecated, documentation, MODEL_PUBLIC_ID, modelVersion
 
Constructor Summary
RuntimeModules()
          Creates a new RuntimeModules instance.
RuntimeModules(Modules modules)
          Creates a new RuntimeModules instance by deeply copying a given Modules instance.
RuntimeModules(Modules modules, Map<Object,Instance> objects)
          Creates a new DefaultModules instance by deeply copying a given Modules instance taking a map backing the instance.
 
Method Summary
 void clear()
          Clears shared runtime state.
 void gc()
          Handles shared runtime state.
 List<Object> getAnyObjects(String implementation)
          Gets any objects of an implementation from the list of modules.
 Dependencies getDependencies(String implementation)
          Gets all dependencies of an implementation from the list of modules.
 Implementation getImplementation(Class<?> implementation)
          Gets an implementation for a given class from the list of modules.
 Implementation getImplementation(Object object)
          Gets an implementation for a given object from the list of modules.
 Implementation getImplementation(String implementation)
          Gets an implementation for a given identifier from the list of modules.
 Implementation getImplementation(String specification, String name)
          Gets an implementation for a given name implementing a given specification from the list of modules.
 Implementations getImplementations()
          Gets all specifications of the list of modules.
 Implementations getImplementations(String specification)
          Gets all implementations implementing a given specification from the list of modules.
 Instance getInstance(String implementation)
          Gets an instance for an implementation from the list of modules.
 Instance getInstance(String implementation, Dependency dependency)
          Gets an instance for an implementation from the list of modules overridden with a given dependency.
 Messages getMessages(String implementation)
          Gets all messages of an implementation from the list of modules.
 Module getModule(String name)
          Gets a module for a given name from the list of modules.
 Module getModuleOfImplementation(String implementation)
          Gets the module declaring a given implementation from the list of modules.
 Module getModuleOfSpecification(String specification)
          Gets the module declaring a given specification from the list of modules.
 Properties getProperties(String implementation)
          Gets all properties of an implementation from the list of modules.
 Specification getSpecification(Class<?> specification)
          Gets a specification for a given class from the list of modules.
 Specification getSpecification(String specification)
          Gets a specification for a given identifier from the list of modules.
 Specifications getSpecifications()
          Gets all specifications of the list of modules.
 Specifications getSpecifications(String implementation)
          Gets all specifications an implementation implements from the list of modules.
 Properties getSpecifiedProperties(String implementation)
          Gets all properties specified for an implementation from the list of modules.
 
Methods inherited from class org.jomc.model.Modules
clone, createObject, getClasspathModule, getDefaultClasspathModuleName, getInstance, getMergedModule, getModule, setDefaultClasspathModuleName
 
Methods inherited from class org.jomc.model.ModelObject
getAnyElement, getAnyElement, getAnyElements, getAnyElements, getAnyObject, getAnyObjects, getAuthors, getCreateDate, getDocumentation, getModelVersion, isDeprecated, setAuthors, setCreateDate, setDeprecated, setDocumentation, setModelVersion
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuntimeModules

public RuntimeModules(Modules modules)
Creates a new RuntimeModules instance by deeply copying a given Modules instance.

Parameters:
modules - The instance to copy.
Throws:
NullPointerException - if modules is null.

RuntimeModules

public RuntimeModules(Modules modules,
                      Map<Object,Instance> objects)
Creates a new DefaultModules instance by deeply copying a given Modules instance taking a map backing the instance.

Parameters:
modules - The instance to copy.
objects - The map backing the instance.
Throws:
NullPointerException - if modules or objects is null.

RuntimeModules

@Generated(value="org.jomc.tools.SourceFileProcessor 1.2.2",
           comments="See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2")
public RuntimeModules()
Creates a new RuntimeModules instance.

Method Detail

getModule

public Module getModule(String name)
Gets a module for a given name from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getModule in class Modules
Parameters:
name - The name of the module to return.
Returns:
The first matching module or null, if no such module is found.
Throws:
NullPointerException - if name is null.
See Also:
Modules.getModule(), Module.getName(), clear()

getSpecifications

public Specifications getSpecifications()
Gets all specifications of the list of modules.

This method queries an internal cache for a result object to return. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getSpecifications in class Modules
Returns:
All specifications or null, if no specifications are found.
See Also:
Modules.getModule(), clear()

getImplementations

public Implementations getImplementations()
Gets all specifications of the list of modules.

This method queries an internal cache for a result object to return. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getImplementations in class Modules
Returns:
All specifications or null, if no specifications are found.
See Also:
Modules.getModule(), clear()

getModuleOfSpecification

public Module getModuleOfSpecification(String specification)
Gets the module declaring a given specification from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getModuleOfSpecification in class Modules
Parameters:
specification - The identifier of the specification whose declaring module to return.
Returns:
The first matching module or null, if no such module is found.
Throws:
NullPointerException - if specification is null.
See Also:
Modules.getModule(), Module.getSpecifications(), Specifications.getSpecification( java.lang.String ), clear()

getModuleOfImplementation

public Module getModuleOfImplementation(String implementation)
Gets the module declaring a given implementation from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getModuleOfImplementation in class Modules
Parameters:
implementation - The identifier of the implementation whose declaring module to return.
Returns:
The first matching module or null, if no such module is found.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), Module.getImplementations(), Implementations.getImplementation( java.lang.String ), clear()

getSpecification

public Specification getSpecification(String specification)
Gets a specification for a given identifier from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getSpecification in class Modules
Parameters:
specification - The identifier of the specification to return.
Returns:
The first matching specification or null, if no such specification is found.
Throws:
NullPointerException - if specification is null.
See Also:
Modules.getModule(), Module.getSpecifications(), Specifications.getSpecification( java.lang.String ), clear()

getSpecification

public Specification getSpecification(Class<?> specification)
Gets a specification for a given class from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getSpecification in class Modules
Parameters:
specification - The class of the specification to return.
Returns:
The first matching specification or null, if no such specification is found.
Throws:
NullPointerException - if specification is null.
See Also:
Modules.getModule(), Module.getSpecifications(), Specifications.getSpecification( java.lang.Class ), clear()

getSpecifications

public Specifications getSpecifications(String implementation)
Gets all specifications an implementation implements from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getSpecifications in class Modules
Parameters:
implementation - The identifier of the implementation to get all implemented specifications of.
Returns:
All specifications implemented by the first matching implementation or null, if no such implementation is found or if the first matching implementation does not implement any specification.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), getImplementation( java.lang.String ), Implementation.getImplementations(), Implementations.getReference(), clear()

getImplementation

public Implementation getImplementation(String implementation)
Gets an implementation for a given identifier from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getImplementation in class Modules
Parameters:
implementation - The identifier of the implementation to return.
Returns:
The first matching implementation or null, if no such implementation is found.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), Module.getImplementations(), Implementations.getImplementation( java.lang.String ), clear()

getImplementation

public Implementation getImplementation(Class<?> implementation)
Gets an implementation for a given class from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getImplementation in class Modules
Parameters:
implementation - The class of the implementation to return.
Returns:
The first matching implementation or null, if no such implementation is found.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), Module.getImplementations(), Implementations.getImplementation( java.lang.Class ), clear()

getImplementation

public Implementation getImplementation(Object object)
Gets an implementation for a given object from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getImplementation in class Modules
Parameters:
object - The object of the implementation to return.
Returns:
The first matching implementation or null, if no such implementation is found.
Throws:
NullPointerException - if object is null.
See Also:
Modules.getModule(), getImplementation( java.lang.Class ), clear()

getImplementation

public Implementation getImplementation(String specification,
                                        String name)
Gets an implementation for a given name implementing a given specification from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getImplementation in class Modules
Parameters:
specification - The identifier of the specification to return an implementation of.
name - The name of the implementation to return.
Returns:
The first matching implementation or null, if no such implementation is found.
Throws:
NullPointerException - if specification or name is null.
See Also:
Modules.getModule(), getImplementations( java.lang.String ), Implementations.getImplementationByName( java.lang.String ), clear()

getDependencies

public Dependencies getDependencies(String implementation)
Gets all dependencies of an implementation from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getDependencies in class Modules
Parameters:
implementation - The identifier of the implementation to get all dependencies of.
Returns:
All dependencies of the first matching implementation or null, if no such implementation is found or if the first matching implementation does not have any dependencies.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), getImplementation( java.lang.String ), Implementation.getImplementations(), Implementations.getReference(), clear()

getProperties

public Properties getProperties(String implementation)
Gets all properties of an implementation from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getProperties in class Modules
Parameters:
implementation - The identifier of the implementation to get all properties of.
Returns:
All properties of the first matching implementation or null, if no such implementation is found or if the first matching implementation does not have any properties.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), getImplementation( java.lang.String ), Implementation.getImplementations(), Implementations.getReference(), clear()

getSpecifiedProperties

public Properties getSpecifiedProperties(String implementation)
Gets all properties specified for an implementation from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getSpecifiedProperties in class Modules
Parameters:
implementation - The identifier of the implementation to return specified properties of.
Returns:
All properties specified for the first matching implementation or null, if no such implementation is found or if the first matching implementation does not have any specified properties.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), getSpecifications( java.lang.String ), Specification.getProperties(), clear()

getMessages

public Messages getMessages(String implementation)
Gets all messages of an implementation from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getMessages in class Modules
Parameters:
implementation - The identifier of the implementation to get all messages of.
Returns:
All messages of the first matching implementation or null, if no such implementation is found or if the first matching implementation does not have any messages.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), getImplementation( java.lang.String ), Implementation.getImplementations(), Implementations.getReference(), clear()

getImplementations

public Implementations getImplementations(String specification)
Gets all implementations implementing a given specification from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getImplementations in class Modules
Parameters:
specification - The identifier of the specification to return all implementations of.
Returns:
All implementations implementing the first matching specification or null, if no such specification is found or if the first matching specification does not have any implementations.
Throws:
NullPointerException - if specification is null.
See Also:
Modules.getModule(), getSpecifications( java.lang.String ), clear()

getAnyObjects

public List<Object> getAnyObjects(String implementation)
Gets any objects of an implementation from the list of modules.

This method queries an internal cache for a result object to return for the given argument values. If no cached result object is available, this method queries the super-class for a result object to return and caches the outcome of that query for use on successive calls.

Note:
Method clear() must be used to synchronize the state of the internal cache with the state of the instance, should the state of the instance change.

Overrides:
getAnyObjects in class Modules
Parameters:
implementation - The identifier of the implementation to get any objects of.
Returns:
Any objects of the first matching implementation or null, if no such implementation is found.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), getImplementation( java.lang.String ), Implementation.getImplementations(), Implementations.getReference(), clear()

getInstance

public Instance getInstance(String implementation)
Gets an instance for an implementation from the list of modules.

Overrides:
getInstance in class Modules
Parameters:
implementation - The identifier of the implementation to get an instance for.
Returns:
A new instance for the first matching implementation or null, if no such implementation is found.
Throws:
NullPointerException - if implementation is null.
See Also:
Modules.getModule(), getImplementation( java.lang.String ), getDependencies(java.lang.String), getProperties(java.lang.String), getMessages(java.lang.String), getSpecifications(java.lang.String), getAnyObjects(java.lang.String)

getInstance

public Instance getInstance(String implementation,
                            Dependency dependency)
Gets an instance for an implementation from the list of modules overridden with a given dependency.

Overrides:
getInstance in class Modules
Parameters:
implementation - The identifier of the implementation to get an instance for.
dependency - The dependency to use for overriding model objects of the instance.
Returns:
An instance for the first matching implementation with any model objects overridden using dependency or null, if no such implementation is found.
Throws:
NullPointerException - if implementation or dependency is null.
See Also:
Modules.getModule(), getInstance( java.lang.String )

gc

public void gc()
Description copied from interface: RuntimeModelObject
Handles shared runtime state.

Specified by:
gc in interface RuntimeModelObject

clear

public void clear()
Description copied from interface: RuntimeModelObject
Clears shared runtime state.

Specified by:
clear in interface RuntimeModelObject


Copyright © 2005-2012 The JOMC Project. All Rights Reserved.Get JOMC at SourceForge.net. Fast, secure and Free Open Source software downloads
Please note that this documentation is maintained by non-native english speaking authors. As such, you may encounter phrases or wordings which seem imprecise or may even have a totally different meaning to native english speaking readers than what the individual author was trying to express. If you are a native english speaking reader and find any such phrases or wordings we kindly ask you to send an email to the corresponding author and help us improve this documentation in order to avoid misunderstandings. You will find the authors' email addresses at the top of each class. Please accept our apologies for any inconvenience caused.