protected Object instanciateClass( Class<?> cl ) throws InstantiationException { try { Object o = cl.getConstructor().newInstance(); return o; } catch( java.lang.InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException e ) { throw new ChainedInstantiationException(e,null,""); } }
protected Class<?> loadClassIE( String name ) throws InstantiationException { try { Class<?> cl = loadClass(name); return cl; } catch( ClassNotFoundException cnfe ) { throw new ChainedInstantiationException(cnfe,null,""); } }
throw new ChainedInstantiationException(e,null,e.getMessage()); throw new ChainedInstantiationException(e,null,e.getMessage()); throw new ChainedInstantiationException(e,null,e.getMessage());
public Component newFcInstance() throws org.objectweb.fractal.api.factory.InstantiationException { try { newFcInstance0(); } catch( org.objectweb.fractal.api.factory.InstantiationException e ) { throw e; } catch( RuntimeException e ) { throw (RuntimeException) e; } catch( Exception e ) { throw new org.objectweb.fractal.julia.factory.ChainedInstantiationException(e,null,e.getClass().getName()+": "+e.getMessage()); } return C0; }
public Component newFcInstance() throws org.objectweb.fractal.api.factory.InstantiationException { try { newFcInstance0(); } catch( org.objectweb.fractal.api.factory.InstantiationException e ) { throw e; } catch( RuntimeException e ) { throw (RuntimeException) e; } catch( Exception e ) { throw new org.objectweb.fractal.julia.factory.ChainedInstantiationException(e,null,e.getClass().getName()+": "+e.getMessage()); } return C0; }
public Component newFcInstance() throws org.objectweb.fractal.api.factory.InstantiationException { try { newFcInstance0(); } catch ( org.objectweb.fractal.api.factory.InstantiationException e ) { throw e; } catch ( java.lang.RuntimeException e ) { throw (RuntimeException) e; } catch ( java.lang.Exception e ) { throw new org.objectweb.fractal.julia.factory.ChainedInstantiationException(e,null,e.getClass().getName()+": "+e.getMessage()); } return C0; }
public Component newFcInstance() throws org.objectweb.fractal.api.factory.InstantiationException { try { newFcInstance0(); } catch ( org.objectweb.fractal.api.factory.InstantiationException e ) { throw e; } catch ( java.lang.RuntimeException e ) { throw (RuntimeException) e; } catch ( java.lang.Exception e ) { throw new org.objectweb.fractal.julia.factory.ChainedInstantiationException(e,null,e.getClass().getName()+": "+e.getMessage()); } return C0; }
public Component newFcInstance() throws org.objectweb.fractal.api.factory.InstantiationException { try { newFcInstance0(); } catch ( org.objectweb.fractal.api.factory.InstantiationException e ) { throw e; } catch ( java.lang.RuntimeException e ) { throw (RuntimeException) e; } catch ( java.lang.Exception e ) { throw new org.objectweb.fractal.julia.factory.ChainedInstantiationException(e,null,e.getClass().getName()+": "+e.getMessage()); } return C45; }
public Component newFcInstance() throws org.objectweb.fractal.api.factory.InstantiationException { try { newFcInstance0(); } catch ( org.objectweb.fractal.api.factory.InstantiationException e ) { throw e; } catch ( java.lang.RuntimeException e ) { throw (RuntimeException) e; } catch ( java.lang.Exception e ) { throw new org.objectweb.fractal.julia.factory.ChainedInstantiationException(e,null,e.getClass().getName()+": "+e.getMessage()); } return C0; }
/** * Create a new component. * * @param name * The class name of the component * @return the new component * @throws InstantiationException */ public static final synchronized Component createCompositeComponent(final String name) throws InstantiationException { try { Object factory = FractalHelper.class.getClassLoader().loadClass(name).newInstance(); if (factory instanceof Factory) { return ((Factory) factory).newFcInstance(); } else { throw new InstantiationException(name + " is not a fractal Factory"); } } catch (ClassNotFoundException e) { throw new ChainedInstantiationException(e, null, name + " is not a valid class name"); } catch (IllegalAccessException | java.lang.InstantiationException e) { throw new ChainedInstantiationException(e, null, name + " can't be instantiated"); } }
/** * Start the specified bundle. */ public static void startBundleIE( BundleRevisionItf bundle ) throws InstantiationException { try { bundle.start(); } catch( OSGiRevisionException e ) { throw new ChainedInstantiationException(e,null,e.getMessage()); } }
public Component newFcControllerInstance () throws InstantiationException { if (fcContent[1] instanceof Component) { return (Component)fcContent[1]; } GenericFactory factory; try { factory = (GenericFactory)Fractal.getBootstrapComponent(). getFcInterface("generic-factory"); } catch (InstantiationException e) { throw new ChainedInstantiationException( e, _this_weaveableC, "Cannot find the GenericFactory interface of the bootstrap " + "component, which is needed to instantiate the template"); } catch (NoSuchInterfaceException e) { throw new ChainedInstantiationException( e, _this_weaveableC, "Cannot find the GenericFactory interface of the bootstrap " + "component, which is needed to instantiate the template"); } return factory.newFcInstance(fcInstanceType, fcContent[0], fcContent[1]); }
itf = loader.loadClass(signature); } catch (ClassNotFoundException e) { throw new ChainedInstantiationException( e, null, "No such interface: " + signature); throw new ChainedInstantiationException( null, null, signature + " is not a public interface"); "org.objectweb.fractal.api.control.AttributeController"); } catch (ClassNotFoundException e) { throw new ChainedInstantiationException( e, null, "Cannot check this operation"); throw new ChainedInstantiationException( null, null,
public Component newFcControllerInstance () throws InstantiationException { if (fcContent[1] instanceof Component) { return (Component)fcContent[1]; } GenericFactory factory; try { factory = (GenericFactory)Fractal.getBootstrapComponent(). getFcInterface("generic-factory"); } catch (InstantiationException e) { throw new ChainedInstantiationException( e, _this_weaveableC, "Cannot find the GenericFactory interface of the bootstrap " + "component, which is needed to instantiate the template"); } catch (NoSuchInterfaceException e) { throw new ChainedInstantiationException( e, _this_weaveableC, "Cannot find the GenericFactory interface of the bootstrap " + "component, which is needed to instantiate the template"); } return factory.newFcInstance(fcInstanceType, fcContent[0], fcContent[1]); }
itf = loader.loadClass(signature); } catch (ClassNotFoundException e) { throw new ChainedInstantiationException( e, null, "No such interface: " + signature); throw new ChainedInstantiationException( null, null, signature + " is not a public interface"); "org.objectweb.fractal.api.control.AttributeController"); } catch (ClassNotFoundException e) { throw new ChainedInstantiationException( e, null, "Cannot check this operation"); throw new ChainedInstantiationException( null, null,
itf = loader.loadClass(signature); } catch (ClassNotFoundException e) { throw new ChainedInstantiationException(e, null, "No such interface: " + signature); throw new ChainedInstantiationException(null, null, signature + " is not a public interface"); .loadClass("org.objectweb.fractal.api.control.AttributeController"); } catch (ClassNotFoundException e) { throw new ChainedInstantiationException(e, null, "Cannot check this operation"); throw new ChainedInstantiationException( null, null,
/** * Install the bundle referenced by the specified bundle jar file name. * * @param bundleJar the jar file name * @param loader * the class loader where the bundle jar file can be loaded as a * resource stream * @return the bundle */ public static BundleRevisionItf installBundleIE( String bundleJar, ClassLoader loader ) throws InstantiationException { try { return installBundle( bundleJar, loader ); } catch( OSGiRevisionException e ) { throw new ChainedInstantiationException(e, null, e.getMessage()); } }
/** * @see org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext) */ private void initFcController$0(final org.objectweb.fractal.julia.InitializationContext ic) throws org.objectweb.fractal.api.factory.InstantiationException { try { if (!((ic.getInterface("lifecycle-controller")) instanceof org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator)) { throw new java.lang.Exception(); } } catch (java.lang.Exception e) { try { ic.getInterface("/lifecycle-coordinator"); } catch (java.lang.Exception f) { throw new org.objectweb.fractal.julia.factory.ChainedInstantiationException(f, null, "The component must provide a LifeCycleCoordinator interface"); } } initFcController$1(ic); }
/** * @see org.objectweb.fractal.julia.control.lifecycle.BasicLifeCycleControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext) */ private void initFcController$0(final InitializationContext ic) throws InstantiationException { try { if (!((ic.getInterface("lifecycle-controller")) instanceof LifeCycleCoordinator)) { throw new Exception(); } } catch (Exception e) { try { ic.getInterface("/lifecycle-coordinator"); } catch (Exception f) { throw new ChainedInstantiationException(f , null , "The component must provide a LifeCycleCoordinator interface"); } } initFcController$1(ic); }
contentClass = loader.loadClass(content); } catch (ClassNotFoundException e) { throw new ChainedInstantiationException( e, null, throw new ChainedInstantiationException( null, null, contentClass.getConstructor(new Class[0]); } catch (final NoSuchMethodException e) { throw new ChainedInstantiationException( null, null, "org.objectweb.fractal.api.control.BindingController"); } catch (ClassNotFoundException e) { throw new ChainedInstantiationException( e, null, "Cannot find the BindingController class"); throw new ChainedInstantiationException( null, null, itf = loader.loadClass(itfType.getFcItfSignature()); } catch (ClassNotFoundException e) { throw new ChainedInstantiationException( e,