Examples of newInstance()


Examples of org.apache.solr.core.SolrResourceLoader.newInstance()

          NamedList spellchecker = (NamedList) initParams.getVal(i);
          String className = (String) spellchecker.get("classname");
          if (className == null)
            className = IndexBasedSpellChecker.class.getName();
          SolrResourceLoader loader = core.getResourceLoader();
          SolrSpellChecker checker = (SolrSpellChecker) loader.newInstance(className);
          if (checker != null) {
            String dictionary = checker.init(spellchecker, core);
            if (dictionary != null) {
              boolean isDefault = dictionary.equals(SolrSpellChecker.DEFAULT_DICTIONARY_NAME);
              if (isDefault == true && hasDefault == false){
View Full Code Here

Examples of org.apache.struts.action.DynaActionFormClass.newInstance()

        // Create a new form bean instance
        if (fbConfig.getDynamic()) {
            try {
                DynaActionFormClass dynaClass =
                    DynaActionFormClass.createDynaActionFormClass(fbConfig);
                instance = (ActionForm) dynaClass.newInstance();
                if (log.isDebugEnabled()) {
                    log.debug
                        (" Creating new DynaActionForm instance " +
                         "of type '" + fbConfig.getType() + "'");
                    log.trace(" --> " + instance);
View Full Code Here

Examples of org.apache.tajo.catalog.FunctionDesc.newInstance()

    try {
    CatalogProtos.FunctionType functionType = funcDesc.getFuncType();
    if (functionType == CatalogProtos.FunctionType.GENERAL
        || functionType == CatalogProtos.FunctionType.UDF) {
      return new GeneralFunctionEval(funcDesc, (GeneralFunction) funcDesc.newInstance(), givenArgs);
    } else if (functionType == CatalogProtos.FunctionType.AGGREGATION
        || functionType == CatalogProtos.FunctionType.UDA) {
      if (!ctx.currentBlock.hasNode(NodeType.GROUP_BY)) {
        ctx.currentBlock.setAggregationRequire();
      }
View Full Code Here

Examples of org.apache.tapestry.beaneditor.BeanModel.newInstance()

        train_getContainerResources(overrides, containerResources);

        train_create(source, RegistrationData.class, true, containerResources, model);

        expect(model.newInstance()).andReturn(data);

        replay();

        BeanEditor component = new BeanEditor();
View Full Code Here

Examples of org.apache.tapestry.internal.services.Instantiator.newInstance()

    {
        Instantiator ins = newMock(Instantiator.class);

        expect(ins.getModel()).andReturn(model).anyTimes();

        expect(ins.newInstance(EasyMock.isA(InternalComponentResources.class)))
                .andReturn(component);

        return ins;
    }
}
View Full Code Here

Examples of org.apache.tapestry.services.ComponentConstructor.newInstance()

        ComponentConstructor cc = _componentConstructorFactory.getComponentConstructor(
                spec,
                className);

        IComponent result = (IComponent) cc.newInstance();

        result.setNamespace(namespace);
        result.setPage(page);
        result.setContainer(container);
        result.setId(id);
View Full Code Here

Examples of org.apache.tapestry.test.Creator.newInstance()

        IRequestCycle cycle = newCycle();
        ErrorLog log = newLog();

        Creator creator = new Creator();

        PageFixture page = (PageFixture) creator.newInstance(PageFixture.class);

        MockControl sourcec = newControl(PropertyPersistenceStrategySource.class);
        PropertyPersistenceStrategySource source = (PropertyPersistenceStrategySource) sourcec
                .getMock();
View Full Code Here

Examples of org.apache.tapestry5.beaneditor.BeanModel.newInstance()

        train_create(source, RegistrationData.class, true, messages, model);

        train_getOverrideMessages(overrides, messages);

        expect(model.newInstance()).andReturn(data);

        replay();

        BeanEditor component = new BeanEditor();
View Full Code Here

Examples of org.apache.tapestry5.internal.services.Instantiator.newInstance()

        transformation.finish();

        Instantiator instantiator = transformation.createInstantiator();

        Object component = instantiator.newInstance(resources);

        // Test the companion flag field

        expect(manager.exists(asoClass)).andReturn(true);
View Full Code Here

Examples of org.apache.tapestry5.plastic.ClassInstantiator.newInstance()

                plasticClass.addToString(String.format("<Shadow: property %s of %s>", propertyName, source));
            }
        });

        return propertyType.cast(instantiator.newInstance());
    }
}
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.