@Generated(value="com.sun.tools.xjc.Driver", date="2014-02-21T04:13:17+01:00", comments="JAXB RI vhudson-jaxb-ri-2.1-2") public class Modules extends ModelObject implements Cloneable
Java class for Modules complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="Modules"> <complexContent> <extension base="{http://jomc.org/model}ModelObject"> <sequence> <element ref="{http://jomc.org/model}module" maxOccurs="unbounded" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType>
Modifier and Type | Field and Description |
---|---|
protected List<Module> |
module |
authors, createDate, deprecated, documentation, MODEL_PUBLIC_ID, modelVersion
Constructor and Description |
---|
Modules()
Creates a new
Modules instance. |
Modules(Map<Object,Instance> objects)
Creates a new
Modules instance taking a map backing the instance. |
Modules(Modules o)
Creates a new
Modules instance by deeply copying a given Modules instance. |
Modules(Modules o,
Map<Object,Instance> objects)
Creates a new
Modules instance by deeply copying a given Modules instance taking a map backing
the instance. |
Modifier and Type | Method and Description |
---|---|
Modules |
clone()
Creates and returns a deep copy of this object.
|
Object |
createObject(Instance instance,
ClassLoader classLoader)
Creates an object of a given instance from the list of modules.
|
List<Object> |
getAnyObjects(String implementation)
Gets any objects of an implementation from the list of modules.
|
Module |
getClasspathModule(String moduleName,
ClassLoader classLoader)
Gets a module holding model objects resolved by inspecting a given class loader.
|
static String |
getDefaultClasspathModuleName()
Gets the default classpath module name.
|
Dependencies |
getDependencies(String implementation)
Gets all dependencies of an implementation from the list of modules.
|
String |
getDependencyJavaModifierName(String implementation,
String dependency)
Gets the Java modifier name of a dependency.
|
JavaTypeName |
getDependencyJavaTypeName(String implementation,
String dependency)
Gets the Java type name of a dependency.
|
Implementation |
getImplementation(Class<?> implementation)
Gets an implementation declaring 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 implementations of the list of modules.
|
Implementations |
getImplementations(String specification)
Gets all implementations implementing a given specification from the list of modules.
|
List<JavaTypeName> |
getImplementedJavaTypeNames(String implementation)
Gets a list holding all
JavaTypeName s an implementation implements from the list of modules. |
Instance |
getInstance(Object object)
Gets the instance of an object 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.
|
Module |
getMergedModule(String name)
Merges this list of modules to a single module.
|
String |
getMessageJavaModifierName(String implementation,
String message)
Gets the Java modifier name of a message.
|
Messages |
getMessages(String implementation)
Gets all messages of an implementation from the list of modules.
|
List<Module> |
getModule()
Gets the value of the module property.
|
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.
|
String |
getPropertyJavaModifierName(String implementation,
String property)
Gets the Java modifier name of a property.
|
Specification |
getSpecification(Class<?> specification)
Gets a specification declaring 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.
|
static void |
setDefaultClasspathModuleName(String value)
Sets the default classpath module name.
|
getAnyElement, getAnyElement, getAnyElements, getAnyElements, getAnyObject, getAnyObjects, getAuthors, getCreateDate, getDocumentation, getModelVersion, isDeprecated, setAuthors, setCreateDate, setDeprecated, setDocumentation, setModelVersion
public Modules()
Modules
instance.public Modules(Modules o)
Modules
instance by deeply copying a given Modules
instance.o
- The instance to copy.NullPointerException
- if o
is null
.public Modules(Map<Object,Instance> objects)
Modules
instance taking a map backing the instance.objects
- The map backing the instance.public Modules(Modules o, Map<Object,Instance> objects)
Modules
instance by deeply copying a given Modules
instance taking a map backing
the instance.o
- The instance to copy.objects
- The map backing the instance.NullPointerException
- if o
or objects
is null
.@Generated(value="com.sun.tools.xjc.Driver", date="2014-02-21T04:13:17+01:00", comments="JAXB RI vhudson-jaxb-ri-2.1-2") public List<Module> getModule()
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a set
method for the module property.
For example, to add a new item, do as follows:
getModule().add(newItem);
Objects of the following type(s) are allowed in the list
Module
@Generated(value="com.sun.tools.xjc.Driver", date="2014-02-21T04:13:17+01:00", comments="JAXB RI vhudson-jaxb-ri-2.1-2") public Modules clone()
clone
in class ModelObject
public static String getDefaultClasspathModuleName()
The default classpath module name is controlled by system property
org.jomc.model.Modules.defaultClasspathModuleName
holding the default classpath module name. If that
property is not set, the Java Classpath
default is returned.
getClasspathModule(java.lang.String, java.lang.ClassLoader)
public static void setDefaultClasspathModuleName(String value)
value
- The new default classpath module name or null
,public Module getClasspathModule(String moduleName, ClassLoader classLoader)
This method searches this list of modules for unresolved references and tries to resolve each unresolved reference by inspecting the given class loader.
moduleName
- The name of the module to return.classLoader
- The class loader to use for resolving entities or null
, to resolve entities using the
bootstrap class loader.null
, if nothing
is resolved.NullPointerException
- if moduleName
is null
.getDefaultClasspathModuleName()
,
getModule()
public Module getModule(String name)
name
- The name of the module to return.null
, if no such module is found.NullPointerException
- if name
is null
.getModule()
,
Module.getName()
public Specifications getSpecifications()
null
, if no specifications are found.getModule()
public Implementations getImplementations()
null
, if no implementations are found.getModule()
public Module getModuleOfSpecification(String specification)
specification
- The identifier of the specification whose declaring module to return.null
, if no such module is found.NullPointerException
- if specification
is null
.getModule()
,
Module.getSpecifications()
,
Specifications.getSpecification( java.lang.String )
public Module getModuleOfImplementation(String implementation)
implementation
- The identifier of the implementation whose declaring module to return.null
, if no such module is found.NullPointerException
- if implementation
is null
.getModule()
,
Module.getImplementations()
,
Implementations.getImplementation( java.lang.String )
public Specification getSpecification(String specification)
specification
- The identifier of the specification to return.null
, if no such specification is found.NullPointerException
- if specification
is null
.getModule()
,
Module.getSpecifications()
,
Specifications.getSpecification( java.lang.String )
public Specification getSpecification(Class<?> specification) throws ModelObjectException
specification
- The class of the specification to return.null
, if no such specification is
found.NullPointerException
- if specification
is null
.ModelObjectException
- if compiling a name of a referenced type to a JavaTypeName
fails.getModule()
,
Module.getSpecifications()
,
Specifications.getSpecification( java.lang.Class )
public Specifications getSpecifications(String implementation)
implementation
- The identifier of the implementation to get all implemented specifications of.null
, if no such
implementation is found or if the first matching implementation does not implement any specification.NullPointerException
- if implementation
is null
.getModule()
,
getImplementation( java.lang.String )
,
Implementation.getImplementations()
,
Implementations.getReference()
,
Implementation.getSpecifications()
public List<JavaTypeName> getImplementedJavaTypeNames(String implementation) throws ModelObjectException
JavaTypeName
s an implementation implements from the list of modules.implementation
- The identifier of the implementation to get all implemented specifications of.JavaTypeName
s implemented by the first matching implementation
or null
, if no such implementation is found or if that implementation does not implement any
JavaTypeName
.ModelObjectException
- if compiling the name of a referenced type to a JavaTypeName
fails.getSpecifications(java.lang.String)
,
Specification.getJavaTypeName()
public Implementation getImplementation(String implementation)
implementation
- The identifier of the implementation to return.null
, if no such implementation is found.NullPointerException
- if implementation
is null
.getModule()
,
Module.getImplementations()
,
Implementations.getImplementation( java.lang.String )
public Implementation getImplementation(Class<?> implementation) throws ModelObjectException
implementation
- The class of the implementation to return.null
, if no such implementation is
found.NullPointerException
- if implementation
is null
.ModelObjectException
- if compiling a name of a referenced type to a JavaTypeName
fails.getModule()
,
Module.getImplementations()
,
Implementations.getImplementation( java.lang.Class )
public Implementation getImplementation(Object object) throws ModelObjectException
object
- The object of the implementation to return.null
, if no such implementation is found.NullPointerException
- if object
is null
.ModelObjectException
- if compiling a name of a referenced type to a JavaTypeName
fails.getModule()
,
getImplementation( java.lang.Class )
public Implementation getImplementation(String specification, String name)
specification
- The identifier of the specification to return an implementation of.name
- The name of the implementation to return.null
, if no such implementation is found.NullPointerException
- if specification
or name
is null
.getModule()
,
getImplementations( java.lang.String )
,
Implementations.getImplementationByName( java.lang.String )
public Dependencies getDependencies(String implementation)
implementation
- The identifier of the implementation to get all dependencies of.null
, if no such implementation is
found or if the first matching implementation does not have any dependencies.NullPointerException
- if implementation
is null
.getModule()
,
getImplementation( java.lang.String )
,
Implementation.getImplementations()
,
Implementations.getReference()
,
Implementation.getDependencies()
public JavaTypeName getDependencyJavaTypeName(String implementation, String dependency) throws ModelObjectException
implementation
- The identifier of the implementation of the dependency.dependency
- The name of the dependency to get the Java type name of.dependency
of the first matching implementation
identified by implementation
or null
, if the implementation, the dependency or the referenced
specification is not found or does not reference a Java type.NullPointerException
- if implementation
or dependency
is null
.ModelObjectException
- if compiling the name of the referenced type to a JavaTypeName
fails.getDependencies(java.lang.String)
,
Dependencies.getDependency(java.lang.String)
,
getSpecification(java.lang.String)
,
Specification.getJavaTypeName()
public String getDependencyJavaModifierName(String implementation, String dependency)
implementation
- The identifier of the implementation of the dependency.dependency
- The name of the dependency to get the Java modifier name of.dependency
of the first matching implementation
identified by implementation
or null
, if the implementation or the dependency is not found.NullPointerException
- if implementation
or dependency
is null
.getDependencies(java.lang.String)
,
Dependencies.getDependency(java.lang.String)
public Properties getProperties(String implementation)
implementation
- The identifier of the implementation to get all properties of.null
, if no such implementation is found
or if the first matching implementation does not have any properties.NullPointerException
- if implementation
is null
.getModule()
,
getImplementation( java.lang.String )
,
Implementation.getImplementations()
,
Implementations.getReference()
,
Implementation.getProperties()
public Properties getSpecifiedProperties(String implementation)
implementation
- The identifier of the implementation to return specified properties of.null
, if no such implementation
is found or if the first matching implementation does not have any specified properties.NullPointerException
- if implementation
is null
.getModule()
,
getSpecifications( java.lang.String )
,
Specification.getProperties()
public String getPropertyJavaModifierName(String implementation, String property)
implementation
- The identifier of the implementation of the property.property
- The name of the property to get the Java modifier name of.property
of the first matching implementation
identified by implementation
or null
, if the implementation or the property is not found.NullPointerException
- if implementation
or dependency
is null
.getProperties(java.lang.String)
,
Properties.getProperty(java.lang.String)
public Messages getMessages(String implementation)
implementation
- The identifier of the implementation to get all messages of.null
, if no such implementation is found
or if the first matching implementation does not have any messages.NullPointerException
- if implementation
is null
.getModule()
,
getImplementation( java.lang.String )
,
Implementation.getImplementations()
,
Implementations.getReference()
,
Implementation.getMessages()
public String getMessageJavaModifierName(String implementation, String message)
implementation
- The identifier of the implementation of the message.message
- The name of the message to get the Java modifier name of.message
of the first matching implementation
identified by implementation
or null
, if the implementation or the message is not found.NullPointerException
- if implementation
or message
is null
.getMessages(java.lang.String)
,
Messages.getMessage(java.lang.String)
public List<Object> getAnyObjects(String implementation)
implementation
- The identifier of the implementation to get any objects of.null
, if no such implementation is found.NullPointerException
- if implementation
is null
.getModule()
,
getImplementation( java.lang.String )
,
Implementation.getImplementations()
,
Implementations.getReference()
,
Implementation.getAny()
public Implementations getImplementations(String specification)
specification
- The identifier of the specification to return all implementations of.null
, if no such
specification is found or if the first matching specification does not have any implementations.NullPointerException
- if specification
is null
.getModule()
,
getSpecifications( java.lang.String )
public Module getMergedModule(String name)
name
- The name of the module to return.NullPointerException
- if name
is null
.public Instance getInstance(Object object) throws ModelObjectException
object
- The object to get the instance of.object
or null
, if no such instance is found.NullPointerException
- if object
is null
.ModelObjectException
- if compiling a name of a referenced type to a JavaTypeName
fails.getModule()
,
getImplementation( java.lang.Object )
,
getInstance( java.lang.String )
,
createObject(org.jomc.model.Instance instance, java.lang.ClassLoader classLoader)
public Instance getInstance(String implementation)
implementation
- The identifier of the implementation to get an instance for.null
, if no such implementation is found.NullPointerException
- if implementation
is null
.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)
public Instance getInstance(String implementation, Dependency dependency)
implementation
- The identifier of the implementation to get an instance for.dependency
- The dependency to use for overriding model objects of the instance.dependency
or null
, if no such implementation is found.NullPointerException
- if implementation
or dependency
is null
.getModule()
,
getInstance( java.lang.String )
public Object createObject(Instance instance, ClassLoader classLoader) throws ModelObjectException, InstantiationException
instance
- The instance to create an object of.classLoader
- The class loader to use for creating the object or null
, to use the bootstrap class
loader.instance
.NullPointerException
- if instance
is null
.ModelObjectException
- if compiling the name of a referenced type to a JavaTypeName
fails.InstantiationException
- if creating an object fails.getModule()
,
Instance.getJavaClass(java.lang.ClassLoader)
,
Instance.getJavaConstructor(java.lang.ClassLoader)
,
Instance.getJavaFactoryMethodName()
,
Instance.getJavaFactoryMethod(java.lang.ClassLoader)
,
Instance.isJavaClassAssignable(java.lang.ClassLoader)
Copyright © 2005–2014 The JOMC Project. All rights reserved.