Examples of newInstance()


Examples of org.opensaml.xml.security.x509.X509KeyInfoGeneratorFactory.newInstance()

            kiFactory.setEmitPublicKeyValue(true);
        } else {
            kiFactory.setEmitEntityCertificate(true);
        }
        try {
            KeyInfo keyInfo = kiFactory.newInstance().generate(
                    signingCredential);
            signature.setKeyInfo(keyInfo);
        } catch (org.opensaml.xml.security.SecurityException ex) {
            throw new WSSecurityException(
                    "Error generating KeyInfo from signing credential", ex);
View Full Code Here

Examples of org.openscience.cdk.interfaces.IChemObjectBuilder.newInstance()

               
                final IAtomContainer selection = renderModel.getSelection().getConnectedAtomContainer();
               
                if(selection!=null){
                    final IChemObjectBuilder bldr = selection.getBuilder();
                    IChemModel selectionModel = bldr.newInstance(IChemModel.class);
                    selectionModel.setMoleculeSet(bldr.newInstance(IAtomContainerSet.class));
                    selectionModel.getMoleculeSet().addAtomContainer(selection);
                    sysClip.setContents(new SmilesSelection(CreateSmilesAction.getSmiles(selectionModel)), null);
                }else{
                    sysClip.setContents(new SmilesSelection(CreateSmilesAction.getSmiles(chemModel)),null);
View Full Code Here

Examples of org.osgi.service.component.ComponentFactory.newInstance()

        final ComponentFactory factory = ( ComponentFactory ) bundleContext.getService( refs[0] );
        TestCase.assertNotNull( factory );

        Hashtable<String, String> props = new Hashtable<String, String>();
        props.put( PROP_NAME_FACTORY, PROP_NAME_FACTORY );
        final ComponentInstance instance = factory.newInstance( props );
        TestCase.assertNotNull( instance );
        TestCase.assertNotNull( instance.getInstance() );
        TestCase.assertEquals( SimpleComponent.INSTANCE, instance.getInstance() );

        // ensure instance is bound
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sequence.SequenceDescription.newInstance()

      final SequenceDescription defaultSequence = getDefaultSequence();
      if (defaultSequence == null)
      {
        return null;
      }
      return defaultSequence.newInstance();
    }

    protected void setQuerySelected(final boolean querySelected)
    {
      super.setQuerySelected(querySelected);
View Full Code Here

Examples of org.qi4j.api.composite.TransientBuilder.newInstance()

    {
        try
        {
            Class aClass = FirstComposite.class;
            TransientBuilder builder = module.newTransientBuilder( aClass );
            builder.newInstance();
            fail(
                "CompositeBuilderFactory.newInstance() should return MixinTypeNotAvailableException when creating a new instance for "
                + aClass.getName() );
        }
        catch( NoSuchCompositeException e )
View Full Code Here

Examples of org.qi4j.api.structure.ApplicationDescriptor.newInstance()

                return true;
            }
        });

        model.newInstance( is.spi() );

    }

    interface TestService
        extends ServiceComposite
View Full Code Here

Examples of org.qi4j.api.value.ValueBuilder.newInstance()

                            else
                                return (Iterable<EntityReference>) ref;
                        }
                    });

            return valueBuilder.newInstance();
        } else
        {
            try
            {
                if( json instanceof JSONObject )
View Full Code Here

Examples of org.qi4j.runtime.composite.MixinModel.newInstance()

    public Object newMixin( EntityInstance entityInstance, StateHolder state, Object[] mixins, Method method )
    {
        MixinModel model = methodImplementation.get( method );
        InjectionContext injectionContext = new InjectionContext( entityInstance, UsesInstance.EMPTY_USES, state );
        Object mixin = model.newInstance( injectionContext );
        mixins[ methodIndex.get( method ) ] = mixin;
        return mixin;
    }

    public void invokeLifecycle( boolean create, Object[] mixins, CompositeInstance instance, StateHolder state )
View Full Code Here

Examples of org.qi4j.runtime.composite.ValueConstraintsModel.newInstance()

        ValueConstraintsModel valueConstraintsModel = constraintsFor( annotations, GenericPropertyInfo.getPropertyType( accessor ), ((Member) accessor)
                .getName(), optional, constraintClasses, accessor );
        ValueConstraintsInstance valueConstraintsInstance = null;
        if( valueConstraintsModel.isConstrained() )
        {
            valueConstraintsInstance = valueConstraintsModel.newInstance();
        }
        MetaInfo metaInfo = stateDeclarations.getMetaInfo( accessor );
        boolean useDefaults = metaInfo.get( UseDefaults.class ) != null || stateDeclarations.isUseDefaults( accessor );
        Object initialValue = stateDeclarations.getInitialValue( accessor );
        return new PropertyModel( accessor, true, useDefaults, valueConstraintsInstance, metaInfo, initialValue );
View Full Code Here

Examples of org.radargun.stats.DefaultStatistics.newInstance()

            } catch (Exception e) {
               terminate(stressors);
               return errorResponse("Failed to create the filter or converter", e);
            }
            IteratingStressor stressor = new IteratingStressor(i, iterable, containerName, filter, converter,
                  maxNextFailures, numLoops, startLatch, stats.newInstance());
            stressors.add(stressor);
            stressor.start();
         }
      } finally {
         startLatch.countDown();
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.