|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.cargo.util.log.LoggedObject
org.codehaus.cargo.generic.spi.AbstractGenericHintFactory
public abstract class AbstractGenericHintFactory
Factory implementation that registers implementation classes under a given key of type
RegistrationKey
. This abstract factory class
is extended by all the different Cargo factories.
Nested Class Summary | |
---|---|
static interface |
AbstractGenericHintFactory.GenericParameters
Generic class to be extended by implementors of AbstractGenericHintFactory in
order to provide possible additional parameters. |
Constructor Summary | |
---|---|
protected |
AbstractGenericHintFactory()
Place to register default configurations. |
Method Summary | |
---|---|
protected java.lang.Object |
createImplementation(RegistrationKey key,
AbstractGenericHintFactory.GenericParameters parameters,
java.lang.String implementationConceptName)
Generic method to create an implementation based on the registered implementation classes. |
protected abstract java.lang.Object |
createInstance(java.lang.reflect.Constructor constructor,
java.lang.String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create an implementation class instance. |
protected abstract java.lang.reflect.Constructor |
getConstructor(java.lang.Class implementationClass,
java.lang.String hint,
AbstractGenericHintFactory.GenericParameters parameters)
Create a constructor. |
protected java.lang.Class |
getMapping(RegistrationKey key)
|
protected java.util.Map |
getMappings()
|
protected boolean |
hasMapping(RegistrationKey key)
|
protected void |
registerImplementation(RegistrationKey key,
java.lang.Class implementationClass)
Register an implementation class for a given key. |
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject |
---|
getLogger, setLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractGenericHintFactory()
Method Detail |
---|
protected boolean hasMapping(RegistrationKey key)
key
- the key associated with the implementation class
protected java.lang.Class getMapping(RegistrationKey key)
key
- the key associated with the implementation class to return
protected java.util.Map getMappings()
RegistrationKey
.protected void registerImplementation(RegistrationKey key, java.lang.Class implementationClass)
key
- the key under which to register the implementation classimplementationClass
- the implementation class to registerprotected java.lang.Object createImplementation(RegistrationKey key, AbstractGenericHintFactory.GenericParameters parameters, java.lang.String implementationConceptName)
key
- the key under which the implementation class is registeredparameters
- the additional parameters necessary to create the constructor objectimplementationConceptName
- the name of what the implementation class is representing.
This is used in exception text messages to provide message customization. For
example "container", "configuration", "deployable', etc.
protected abstract java.lang.reflect.Constructor getConstructor(java.lang.Class implementationClass, java.lang.String hint, AbstractGenericHintFactory.GenericParameters parameters) throws java.lang.NoSuchMethodException
implementationClass
- implementation class for which to create the constructorhint
- the hint to differentiate this implementation class from othersparameters
- additional parameters necessary to create the constructor object
java.lang.NoSuchMethodException
- in case of errorprotected abstract java.lang.Object createInstance(java.lang.reflect.Constructor constructor, java.lang.String hint, AbstractGenericHintFactory.GenericParameters parameters) throws java.lang.Exception
constructor
- the constructor to use for creating the instancehint
- the hint to differentiate this implementation class from othersparameters
- additional parameters necessary to create the instance
java.lang.Exception
- in case of error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |