public abstract class AbstractIntrospectionGenericHintFactory<T> extends AbstractGenericHintFactory<T>
AbstractGenericHintFactory that registers and creates instances from
implementation classes specified as String, using introspection. If the implementation fails to
load the registration fails silently. This is to cover the user case where a specific container's
implementation jar may not be present in the classpath if it's not used by the user. This allows
users to only put the container implementation jars the require in the classpath.AbstractGenericHintFactory.GenericParameters| Constructor and Description |
|---|
AbstractIntrospectionGenericHintFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected T |
createImplementation(RegistrationKey key,
AbstractGenericHintFactory.GenericParameters parameters,
String implementationConceptName)
Generic method to create an implementation based on the registered implementation classes.
|
protected void |
registerImplementation(RegistrationKey key,
String objectClassName)
Allow registering container objects using introspection so that at build time and runtime the
user can handpick the container implementation jars that he want to use.
|
createInstance, getConstructor, getMapping, getMappings, hasMapping, registerImplementationpublic AbstractIntrospectionGenericHintFactory()
protected void registerImplementation(RegistrationKey key, String objectClassName)
key - the key under which to register the class nameobjectClassName - the object to registerprotected T createImplementation(RegistrationKey key, AbstractGenericHintFactory.GenericParameters parameters, String implementationConceptName)
createImplementation in class AbstractGenericHintFactory<T>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.AbstractGenericHintFactory.createImplementation(org.codehaus.cargo.generic.internal.util.RegistrationKey, org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.GenericParameters, java.lang.String)Copyright © 2004–2015 Github. All rights reserved.