org.jomc.ri.model
Class RuntimeInstance

Package class diagram package RuntimeInstance
java.lang.Object
  extended by org.jomc.model.ModelObject
      extended by org.jomc.model.Instance
          extended by org.jomc.ri.model.RuntimeInstance
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 RuntimeInstance
extends Instance
implements RuntimeModelObject

Runtime Instance.

Identifier:
org.jomc.ri.model.RuntimeInstance
Name:
JOMC RI RuntimeInstance
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.Instance
any, clazz, dependencies, identifier, messages, name, properties, specifications, stateless
 
Fields inherited from class org.jomc.model.ModelObject
authors, createDate, deprecated, documentation, MODEL_PUBLIC_ID, modelVersion
 
Constructor Summary
RuntimeInstance()
          Creates a new RuntimeInstance instance.
RuntimeInstance(Instance instance)
          Creates a new RuntimeInstance instance by deeply copying a given Instance instance.
 
Method Summary
 void clear()
          Clears shared runtime state.
 void gc()
          Handles shared runtime state.
 Class<?> getJavaClass(ClassLoader classLoader)
          Gets the Java class of the instance for a given class loader.
 Class<?>[] getJavaClasses(ClassLoader classLoader)
          Gets the Java classes of all specifications of the instance for a given class loader.
 Constructor<?> getJavaConstructor(ClassLoader classLoader)
          Gets the Java constructor to use for creating objects of the instance.
 Method getJavaFactoryMethod(ClassLoader classLoader)
          Gets the Java method to use for creating objects of the instance.
 String getJavaFactoryMethodName()
          Gets the name of the Java method to use for creating objects of the instance.
 Class<?> getJavaProxyClass(ClassLoader classLoader)
          Gets the Java proxy class for a given class loader.
 boolean isJavaClassAssignable(ClassLoader classLoader)
          Gets a flag indicating the Java class of the instance is assignable to all Java classes of all specifications of the instance.
 
Methods inherited from class org.jomc.model.Instance
clone, getAny, getAnyElement, getAnyElement, getAnyElements, getAnyElements, getAnyObject, getAnyObjects, getClazz, getDependencies, getDependencyObjects, getIdentifier, getMessageObjects, getMessages, getName, getProperties, getPropertyObjects, getSpecifications, isStateless, setClazz, setDependencies, setIdentifier, setMessages, setName, setProperties, setSpecifications, setStateless
 
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

RuntimeInstance

public RuntimeInstance(Instance instance)
Creates a new RuntimeInstance instance by deeply copying a given Instance instance.

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

RuntimeInstance

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

Method Detail

getJavaClass

public Class<?> getJavaClass(ClassLoader classLoader)
                      throws ClassNotFoundException
Gets the Java class of the instance for a given class loader.

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 RuntimeModelObjects.clear() must be used to synchronize the state of the internal cache with the state of the class loader, should the state of the class loader change.

Overrides:
getJavaClass in class Instance
Parameters:
classLoader - The class loader to get the Java class from or null, to get the Java class from the platform's bootstrap class loader.
Returns:
The Java class of the instance.
Throws:
ClassNotFoundException - if the Java class is not found.
See Also:
Instance.getClazz(), RuntimeModelObjects.clear()

getJavaClasses

public Class<?>[] getJavaClasses(ClassLoader classLoader)
                          throws ClassNotFoundException
Gets the Java classes of all specifications of the instance for a given class loader.

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 RuntimeModelObjects.clear() must be used to synchronize the state of the internal cache with the state of the instance and class loader, should the state of the instance or class loader change.

Overrides:
getJavaClasses in class Instance
Parameters:
classLoader - The class loader to get the Java classes from or null, to get the Java classes from the platform's bootstrap class loader.
Returns:
The Java classes of all specifications of the instance.
Throws:
ClassNotFoundException - if a Java class is not found.
See Also:
Instance.getSpecifications(), Specification.getClazz(), RuntimeModelObjects.clear()

getJavaConstructor

public Constructor<?> getJavaConstructor(ClassLoader classLoader)
                                  throws ClassNotFoundException
Gets the Java constructor to use for creating objects of the instance.

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 RuntimeModelObjects.clear() must be used to synchronize the state of the internal cache with the state of the instance and class loader, should the state of the instance or class loader change.

Overrides:
getJavaConstructor in class Instance
Parameters:
classLoader - The class loader to get the Java class from or null, to get the Java class from the platform's bootstrap class loader.
Returns:
The public default Java constructor of the Java class of the instance or null, if that class does not declare such a constructor, is abstract or is not public.
Throws:
ClassNotFoundException - if the Java class is not found.
See Also:
getJavaClass(java.lang.ClassLoader), RuntimeModelObjects.clear()

getJavaFactoryMethodName

public String getJavaFactoryMethodName()
Gets the name of the Java method to use for creating objects of the instance.

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:
getJavaFactoryMethodName in class Instance
Returns:
The name of the Java method to use for creating objects of the instance or null, if no such method name is supported.
See Also:
Instance.getName(), clear()

getJavaFactoryMethod

public Method getJavaFactoryMethod(ClassLoader classLoader)
                            throws ClassNotFoundException
Gets the Java method to use for creating objects of the instance.

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 RuntimeModelObjects.clear() must be used to synchronize the state of the internal cache with the state of the instance and class loader, should the state of the instance or class loader change.

Overrides:
getJavaFactoryMethod in class Instance
Parameters:
classLoader - The class loader to get the Java class from or null, to get the Java class from the platform's bootstrap class loader.
Returns:
The public Java method of the Java class of the instance to use for creating objects of the instance or null, if that class does not declare such a method.
Throws:
ClassNotFoundException - if the Java class is not found.
See Also:
getJavaClass(java.lang.ClassLoader), getJavaFactoryMethodName(), RuntimeModelObjects.clear()

isJavaClassAssignable

public boolean isJavaClassAssignable(ClassLoader classLoader)
                              throws ClassNotFoundException
Gets a flag indicating the Java class of the instance is assignable to all Java classes of all specifications of the instance.

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 RuntimeModelObjects.clear() must be used to synchronize the state of the internal cache with the state of the instance and class loader, should the state of the instance or class loader change.

Overrides:
isJavaClassAssignable in class Instance
Parameters:
classLoader - The class loader to get the Java classes from or null, to get the Java classes from the platform's bootstrap class loader.
Returns:
true, if the Java class of the instance is assignable to all Java classes of all specifications of the instance; false, if the Java class of the instance is not assignable to all Java classes of all specifications of the instance.
Throws:
ClassNotFoundException - if a Java class is not found.
See Also:
getJavaClass(java.lang.ClassLoader), getJavaClasses(java.lang.ClassLoader), RuntimeModelObjects.clear()

getJavaProxyClass

public Class<?> getJavaProxyClass(ClassLoader classLoader)
                           throws ClassNotFoundException
Gets the Java proxy class for a given class loader.

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 RuntimeModelObjects.clear() must be used to synchronize the state of the internal cache with the state of the instance and class loader, should the state of the instance or class loader change.

Overrides:
getJavaProxyClass in class Instance
Parameters:
classLoader - The class loader to get the Java proxy class for.
Returns:
The Java proxy class for classLoader or null, if the instance does not support a Java proxy class.
Throws:
ClassNotFoundException - if a Java class is not found.
See Also:
getJavaClasses(java.lang.ClassLoader), RuntimeModelObjects.clear()

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.