org.jomc.modlet
Class ModelContextFactory

Package class diagram package ModelContextFactory
java.lang.Object
  extended by org.jomc.modlet.ModelContextFactory

public abstract class ModelContextFactory
extends Object

Interface to creating model contexts.

Since:
1.2
Version:
$JOMC: ModelContextFactory.java 4200 2012-01-25 09:46:13Z schulte2005 $
Author:
Christian Schulte

Constructor Summary
protected ModelContextFactory()
          Creates a new ModelContextFactory instance.
 
Method Summary
static ModelContextFactory newInstance()
          Creates a new ModelContextFactory instance.
static ModelContextFactory newInstance(String factoryClassName)
          Creates a new ModelContextFactory instance.
abstract  ModelContext newModelContext()
          Creates a new ModelContext instance.
abstract  ModelContext newModelContext(ClassLoader classLoader)
          Creates a new ModelContext instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelContextFactory

protected ModelContextFactory()
Creates a new ModelContextFactory instance.

Method Detail

newInstance

public static ModelContextFactory newInstance()
                                       throws ModelContextFactoryError
Creates a new ModelContextFactory instance.

The name of the class providing the ModelContextFactory implementation loaded by this method is controlled by system property org.jomc.modlet.ModelContextFactory. If that property is not set, this methods returns a new default instance.

Returns:
A new ModelContextFactory instance.
Throws:
ModelContextFactoryError - if creating a new instance fails.

newInstance

public static ModelContextFactory newInstance(String factoryClassName)
                                       throws ModelContextFactoryError
Creates a new ModelContextFactory instance.

Parameters:
factoryClassName - The name of the ModelContextFactory class to create an instance of.
Returns:
A new ModelContextFactory instance.
Throws:
NullPointerException - if factoryClassName is null.
ModelContextFactoryError - if creating a new instance fails.

newModelContext

public abstract ModelContext newModelContext()
Creates a new ModelContext instance.

Returns:
A new ModelContext instance.

newModelContext

public abstract ModelContext newModelContext(ClassLoader classLoader)
Creates a new ModelContext instance.

Parameters:
classLoader - The class loader to create a new instance with or null, to create a new instance using the bootstrap class loader.
Returns:
A new ModelContext instance for classLoader.


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.