Package org.chromattic.api

Examples of org.chromattic.api.BuilderException


      Class<?> instrumentorClass = classLoader.loadClass(s);
      if (expectedClass.isAssignableFrom(instrumentorClass)) {
        Class<? extends T> ic2 = instrumentorClass.asSubclass(expectedClass);
        return ic2.newInstance();
      } else {
        throw new BuilderException("Class " + s + " does not implement the " +
          expectedClass.getName() + " interface");
      }
    }
    catch (InstantiationException e) {
      throw new BuilderException("Could not instanciate " + option.getShortName() + " " + s, e);
    }
    catch (IllegalAccessException e) {
      throw new BuilderException("Could not instanciate " + option.getShortName(), e);
    }
    catch (ClassNotFoundException e) {
      throw new BuilderException("Could not load " + option.getShortName() + " class " + s, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.chromattic.api.BuilderException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.