public abstract class AbstractClassLoadServiceUtilityImpl<T extends BaseClassLoadService> extends java.lang.Object implements BaseClassLoadService
DefaultClassLoadServiceUtility
and prepares the access to the BaseClassLoadService
depending on the OSGI bundle.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICE_REFERENCE_FILTER |
Constructor and Description |
---|
AbstractClassLoadServiceUtilityImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
forName(java.lang.String className)
Has to return the class for the specified class name or reference.
|
T |
getClassLoadService(java.lang.String className,
java.lang.Class<? extends BaseClassLoadService> serviceBaseInterface)
Return the class load service for the specified class.
|
abstract T |
getLocalClassLoadService()
Has to return the specific local class load service.
|
jade.content.onto.Ontology |
getOntologyInstance(java.lang.String ontologyClassName)
Has to return the ontology instance from the specified ontology class name.
|
java.lang.Object |
newInstance(java.lang.String className)
Has to return a new instance of the specified class.
|
public static final java.lang.String SERVICE_REFERENCE_FILTER
public java.lang.Class<?> forName(java.lang.String className) throws java.lang.ClassNotFoundException, java.lang.NoClassDefFoundError
BaseClassLoadService
forName
in interface BaseClassLoadService
className
- the class namejava.lang.ClassNotFoundException
- the class not found exceptionjava.lang.NoClassDefFoundError
public java.lang.Object newInstance(java.lang.String className) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
BaseClassLoadService
newInstance
in interface BaseClassLoadService
className
- the class namejava.lang.ClassNotFoundException
- the class not found exceptionjava.lang.InstantiationException
java.lang.IllegalAccessException
public jade.content.onto.Ontology getOntologyInstance(java.lang.String ontologyClassName) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
BaseClassLoadService
getOntologyInstance
in interface BaseClassLoadService
ontologyClassName
- the ontology class namejava.lang.ClassNotFoundException
- the class not found exceptionjava.lang.IllegalAccessException
- the illegal access exceptionjava.lang.SecurityException
- the security exceptionjava.lang.NoSuchMethodException
- the no such method exceptionjava.lang.IllegalArgumentException
- the illegal argument exceptionjava.lang.reflect.InvocationTargetException
- the invocation target exceptionpublic abstract T getLocalClassLoadService()
public T getClassLoadService(java.lang.String className, java.lang.Class<? extends BaseClassLoadService> serviceBaseInterface)
className
- the class nameserviceBaseInterface
- the type of the service, specified by the interface