Search in sources :

Example 1 with ToolContainer

use of org.apache.cxf.tools.common.toolspec.ToolContainer in project cxf by apache.

the class PluginLoader method loadContainerClass.

private Class<? extends ToolContainer> loadContainerClass(String fullClzName) {
    Class<?> clz = null;
    try {
        clz = ClassLoaderUtils.loadClass(fullClzName, getClass());
    } catch (Exception e) {
        Message msg = new Message("LOAD_CONTAINER_CLASS_FAILED", LOG, fullClzName);
        LOG.log(Level.SEVERE, msg.toString());
        throw new ToolException(msg, e);
    }
    if (!ToolContainer.class.isAssignableFrom(clz)) {
        Message message = new Message("CLZ_SHOULD_IMPLEMENT_INTERFACE", LOG, clz.getName());
        LOG.log(Level.SEVERE, message.toString());
        throw new ToolException(message);
    }
    return clz.asSubclass(ToolContainer.class);
}
Also used : Message(org.apache.cxf.common.i18n.Message) ToolContainer(org.apache.cxf.tools.common.toolspec.ToolContainer) ToolException(org.apache.cxf.tools.common.ToolException) XMLStreamException(javax.xml.stream.XMLStreamException) IOException(java.io.IOException) JAXBException(javax.xml.bind.JAXBException) FileNotFoundException(java.io.FileNotFoundException) ToolException(org.apache.cxf.tools.common.ToolException)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 JAXBException (javax.xml.bind.JAXBException)1 XMLStreamException (javax.xml.stream.XMLStreamException)1 Message (org.apache.cxf.common.i18n.Message)1 ToolException (org.apache.cxf.tools.common.ToolException)1 ToolContainer (org.apache.cxf.tools.common.toolspec.ToolContainer)1