Examples of newInstance()


Examples of org.apache.camel.util.FactoryFinder.newInstance()

     * Lazily create a default implementation
     */
    protected Injector createInjector() {
        FactoryFinder finder = new FactoryFinder();
        try {
            return (Injector)finder.newInstance("Injector");
        } catch (NoFactoryAvailableException e) {
            // lets use the default
            return new ReflectionInjector();
        } catch (IllegalAccessException e) {
            throw new RuntimeCamelException(e);
View Full Code Here

Examples of org.apache.cayenne.di.AdhocObjectFactory.newInstance()

        logger.info(String.format(
                "generator options - [dropTables: %s, dropPK: %s, createTables: %s, createPK: %s, createFK: %s]",
                dropTables, dropPK, createTables, createPK, createFK));

        try {
            final DbAdapter adapterInst = (adapter == null) ? (DbAdapter) objectFactory.newInstance(DbAdapter.class,
                    JdbcAdapter.class.getName()) : (DbAdapter) objectFactory.newInstance(DbAdapter.class, adapter);

            // Load the data map and run the db generator.
            DataMap dataMap = loadDataMap();
            DbGenerator generator = new DbGenerator(adapterInst, dataMap, NoopJdbcEventLogger.getInstance());
View Full Code Here

Examples of org.apache.cocoon.portal.coplet.CopletFactory.newInstance()

                (CopletLayout) lfac.newInstance("coplet");

            CopletFactory cfac =
                (CopletFactory) manager.lookup(CopletFactory.ROLE);

            CopletInstanceData newCoplet = cfac.newInstance(copletData);

            copletLayout.setCopletInstanceData(newCoplet);
            profileManager.register(copletLayout);

            NamedItem newItem = new NamedItem();
View Full Code Here

Examples of org.apache.cocoon.portal.layout.LayoutFactory.newInstance()

            LayoutFactory lfac =
                (LayoutFactory) this.manager.lookup(LayoutFactory.ROLE);

            CopletLayout copletLayout =
                (CopletLayout) lfac.newInstance("coplet");

            CopletFactory cfac =
                (CopletFactory) manager.lookup(CopletFactory.ROLE);

            CopletInstanceData newCoplet = cfac.newInstance(copletData);
View Full Code Here

Examples of org.apache.commons.beanutils.BasicDynaClass.newInstance()

        sforceMapping.put("Description", "the description");
        // Account number is set for easier test data cleanup
        sforceMapping.put("AccountNumber", ACCOUNT_NUMBER_PREFIX + System.currentTimeMillis());

        // now convert to a dynabean array for the client
        DynaBean sforceObj = dynaClass.newInstance();

        // This does an automatic conversion of types.
        BeanUtils.copyProperties(sforceObj, sforceMapping);

        List<DynaBean> beanList = new ArrayList<DynaBean>();
View Full Code Here

Examples of org.apache.commons.beanutils.DynaClass.newInstance()

        }

        DynaClass bdattr = new BasicDynaClass(re.getName() + "_attributes", Class
                .forName("de.iritgo.aktera.clients.MapExposingBasicDynaBean"), dattr);

        DynaBean oneAttrBean = bdattr.newInstance();

        for (Iterator io = attributes.keySet().iterator(); io.hasNext();)
        {
          oneAttribName = (String) io.next();
          oneAttribValue = attributes.get(oneAttribName);
View Full Code Here

Examples of org.apache.commons.discovery.tools.DiscoverClass.newInstance()

    @Test
    public void instantiateViaDiscoverClass() throws Exception {
        ClassLoaders loaders = ClassLoaders.getAppLoaders(TestInterface2.class, getClass(), false);

        DiscoverClass discoverClass = new DiscoverClass(loaders);
        TestInterface2 serviceImpl = discoverClass.newInstance(TestInterface2.class);

        assertNotNull(serviceImpl);
        assertEquals(TestImpl2_1.class, serviceImpl.getClass());
    }
View Full Code Here

Examples of org.apache.derby.iapi.services.loader.GeneratedClass.newInstance()

        ** recompiled.  Get a new Activation and check whether the
        ** parameters are compatible.  If so, transfer the parameters
        ** from the old Activation to the new one, and make that the
        ** current Activation.  If not, throw an exception.
        */
        BaseActivation    newAC = (BaseActivation) newGC.newInstance(lcc);

        DataTypeDescriptor[]  newParamTypes = ps.getParameterTypes();

        /*
        ** Link the new activation to the prepared statement.
View Full Code Here

Examples of org.apache.directory.api.ldap.model.csn.CsnFactory.newInstance()

        AttributeType csnAt = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_CSN_AT );
        Attribute attrib = new DefaultAttribute( csnAt );

        CsnFactory csnF = new CsnFactory( 0 );
        String csn = csnF.newInstance().toString();
        attrib.add( csn );

        Modification add = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );

        String entryId = partition.getEntryId( dn );
View Full Code Here

Examples of org.apache.directory.server.core.integ.DirectoryServiceFactory.newInstance()

        LOG.debug( "calling create()" );

        try
        {
            DirectoryServiceFactory factory = settings.getFactory();
            context.setService( factory.newInstance() );
        }
        catch ( InstantiationException ie )
        {
            throw new NamingException( ie.getMessage() );
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.