Examples of newInstance()


Examples of org.codehaus.plexus.component.factory.ComponentFactory.newInstance()

            else
            {
                componentFactory = componentFactoryManager.getDefaultComponentFactory();
            }

            component = componentFactory.newInstance( componentDescriptor, plexusRealm, this );
        }
        catch ( UndefinedComponentFactoryException e )
        {
            throw new ComponentInstantiationException( "Unable to create component as factory '" + componentFactoryId + "' could not be found", e );
        }
View Full Code Here

Examples of org.destecs.core.xmlrpc.extensions.AnnotationClientFactory.newInstance()

      clients.add(client);
      // add factory for annotations for generated protocol
      AnnotationClientFactory factory = new AnnotationClientFactory(client);

      ICoSimProtocol protocol = (ICoSimProtocol) factory.newInstance(ICoSimProtocol.class);

      protocolProxy = new ProxyICoSimProtocol(protocol);
    } catch (Exception e)
    {
      abort(simulator, "Connect faild to: " + url, e);
View Full Code Here

Examples of org.dmd.dms.ClassDefinition.newInstance()

   
    if (cd == null)
      throw new IllegalStateException("Unknown class ID: " + classID + " ensure that you have loaded the required schemas.");
   
    // Instantiate the object
    rc = cd.newInstance();
    dmo = rc.getDmcObject();
       
    // Add the auxiliary classes if they exist
    if (classCount > 1){
      for(int i=1; i<classCount; i++){
View Full Code Here

Examples of org.drools.core.rule.builder.dialect.asm.ClassGenerator.newInstance()

        generator.addMethod(ACC_PUBLIC,
                            "evaluate",
                            generator.methodDescr(boolean.class, Object.class, InternalWorkingMemory.class, LeftTuple.class),
                            new EvaluateMethodGenerator(condition, declarations, leftTuple));

        return generator.newInstance(Declaration[].class, declarations);
    }

    private static String getUniqueClassName() {
        return getUniqueName("ConditionEvaluator");
    }
View Full Code Here

Examples of org.drools.definition.type.FactType.newInstance()

        // Retrieve the generated fact type
        FactType cheeseFact = kbase.getFactType( "org.drools.generatedbeans",
                                                 "Cheese" );

        // Create a new Fact instance
        Object cheese = cheeseFact.newInstance();

        // Set a field value using the more verbose method chain...
        // should we add short cuts?
        //        cheeseFact.getField( "type" ).set( cheese,
        //                                           "stilton" );
View Full Code Here

Examples of org.drools.rule.FactType.newInstance()

        // Retrieve the generated fact type
        FactType cheeseFact = ruleBase.getFactType( "org.drools.generatedbeans.Cheese" );

        // Create a new Fact instance
        Object cheese = cheeseFact.newInstance();

        // Set a field value using the more verbose method chain...
        // should we add short cuts?
        //        cheeseFact.getField( "type" ).getFieldAccessor().setValue( cheese,
        //                                                             "stilton" );
View Full Code Here

Examples of org.drools.rule.builder.dialect.asm.ClassGenerator.newInstance()

        generator.addMethod(ACC_PUBLIC,
                            "evaluate",
                            generator.methodDescr(boolean.class, Object.class, InternalWorkingMemory.class, LeftTuple.class),
                            new EvaluateMethodGenerator(condition, declarations, leftTuple));

        return generator.newInstance(Declaration[].class, declarations);
    }

    private static String getUniqueClassName() {
        return getUniqueName("ConditionEvaluator");
    }
View Full Code Here

Examples of org.easymock.internal.DefaultClassInstantiator.newInstance()

    @Test
    public void privateConstructor() {
        final DefaultClassInstantiator instantiator = new DefaultClassInstantiator();
        try {
            instantiator.newInstance(PrivateConstructorClass.class);
            fail("Shouldn't be able to mock a class with a private constructor using DefaultInstantiator");
        } catch (final Exception e) {
        }
    }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType.newInstance()

   private static ILaunchConfigurationWorkingCopy createConfig(String label, IVMInstall vmInstall, String classToLaunch, List<IPath> classpath, String[] bootClasspath, String vmArgs, String prgArgs, boolean debug, boolean showInDebugger, boolean saveConfig) throws CoreException {
    ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationType launchType = manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
   
    ILaunchConfigurationWorkingCopy config = launchType.newInstance(null, label);
    config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, JavaRuntime.newJREContainerPath(vmInstall).toString());
   
    config.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
    config.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector");
   
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass.newInstance()

            if (clr != null) {
              loadData.setClr(clr);
            }
          }
          if (targetObject == null) {
            targetObject = metaclass.newInstance(parameters);
            invokeCreatededAction(element, targetObject);
            Widget widget = UserData.getWidget(targetObject);
            if (widget != null) {
              Object clr = loadData.getClr();
              if (clr != null) {
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.