Register a {@link CommandOutput} type with its {@link CommandOutputFactory}.

@param commandOutputClass must not be {@literal null}.
@param commandOutputFactory must not be {@literal null}.
351728
public <T extends CommandOutput<?, ?, ?>> void register(Class<T> commandOutputClass,
            CommandOutputFactory commandOutputFactory) {

        LettuceAssert.notNull(commandOutputClass, "CommandOutput class must not be null");
        LettuceAssert.notNull(commandOutputFactory, "CommandOutputFactory must not be null");

        register(registry, commandOutputClass, commandOutputFactory);
    }
6178
public static void initClass() {

        // registers a factory for creating new instances of this widget
        CmsWidgetFactoryRegistry.instance().registerFactory(WIDGET_TYPE, new I_CmsFormWidgetFactory() {

            /**
             * @see org.opencms.gwt.client.ui.input.form.I_CmsFormWidgetFactory#createWidget(java.util.Map, com.google.common.base.Optional)
             */
            public I_CmsFormWidget createWidget(Map<String, String> widgetParams, Optional<String> defaultValue) {

                Map<String, CmsPair<String, Boolean>> entries = new HashMap<String, CmsPair<String, Boolean>>();
                String label = "Select";
                if (widgetParams.containsKey("label")) {
                    label = widgetParams.get("label");
                    widgetParams.remove("label");
                }
                for (Map.Entry<String, String> entry : widgetParams.entrySet()) {
                    entries.put(entry.getKey(), CmsPair.create(entry.getValue(), Boolean.FALSE));
                }
                CmsMultiSelectCell cell = new CmsMultiSelectCell(entries);
                cell.setOpenerText(label);
                CmsMultiSelectBox box = new CmsMultiSelectBox();
                box.addOption(cell);
                return box;
            }
        });
    }
1020397
public void addConverterFactory(final IStringConverterFactory converterFactory) {
        addConverterInstanceFactory(new IStringConverterInstanceFactory() {
            @SuppressWarnings("unchecked")
            @Override
            public IStringConverter<?> getConverterInstance(Parameter parameter, Class<?> forType, String optionName) {
                final Class<? extends IStringConverter<?>> converterClass = converterFactory.getConverter(forType);
                try {
                    if(optionName == null) {
                        optionName = parameter.names().length > 0 ? parameter.names()[0] : "[Main class]";
                    }
                    return converterClass != null ? instantiateConverter(optionName, converterClass) : null;
                } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
                    throw new ParameterException(e);
                }
            }
        });
    }
150754
public <A extends Annotation> void register(final Class<A> anno, final ConversionProcessorFactory<A> factory) {
        factoryMap.put(anno, factory);
    }
1345805
private void init() {

		factories.put(NotEmptyQuery.class,     new NotEmptyQueryFactory(this));
		factories.put(FulltextQuery.class,     new KeywordQueryFactory(this));
		factories.put(SpatialQuery.class,      new SpatialQueryFactory(this));
		factories.put(GroupQuery.class,        new GroupQueryFactory(this));
		factories.put(RangeQuery.class,        new RangeQueryFactory(this));
		factories.put(ExactQuery.class,        new KeywordQueryFactory(this));
		factories.put(ArrayQuery.class,        new ArrayQueryFactory(this));
		factories.put(EmptyQuery.class,        new EmptyQueryFactory(this));
		factories.put(TypeQuery.class,         new TypeQueryFactory(this));
		factories.put(UuidQuery.class,         new UuidQueryFactory(this));
		factories.put(RelationshipQuery.class, new RelationshipQueryFactory(this));
		factories.put(ComparisonQuery.class,   new ComparisonQueryFactory(this));

		converters.put(Boolean.class, new BooleanTypeConverter());
		converters.put(String.class,  new StringTypeConverter());
		converters.put(Date.class,    new DateTypeConverter());
		converters.put(Long.class,    new LongTypeConverter());
		converters.put(Short.class,   new ShortTypeConverter());
		converters.put(Integer.class, new IntTypeConverter());
		converters.put(Float.class,   new FloatTypeConverter());
		converters.put(Double.class,  new DoubleTypeConverter());
		converters.put(byte.class,    new ByteTypeConverter());
	}
1192147
@Deprecated
   public void injectFactoryForComponent(Class<?> componentType, Class<?> factoryType) {
      factories.put(componentType.getName(), factoryType.getName());
   }
529137
public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type, String label) {
    if (type == null || label == null) {
      throw new NullPointerException();
    }
    if (subtypeToLabel.containsKey(type) || labelToSubtype.containsKey(label)) {
      throw new IllegalArgumentException("types and labels must be unique");
    }
    labelToSubtype.put(label, type);
    subtypeToLabel.put(type, label);
    return this;
  }
257521
protected void initType() {
        try {
            this.type = getEnhancedAnnotated().getJavaClass();
        } catch (ClassCastException e) {
            Type type = Beans.getDeclaredBeanType(getClass());
            throw BeanLogger.LOG.producerCastError(getEnhancedAnnotated().getJavaClass(), (type == null ? " unknown " : type), e);
        }
    }
631498
private void initTangoFactory() {
        // we get the properties with instance of objects
        final Properties properties = getPropertiesFile();
        // if(properties == null || properties.size() == 0 ||
        // !properties.containsKey(TANGO_FACTORY))
        // {
        // //tangoFactory = new DefaultTangoFactoryImpl();
        // //TANGO_FACTORY = fr.esrf.TangoApi.factory.WebTangoFactoryImpl
        //
        // tangoFactory = (ITangoFactory)getObject("");
        // isDefaultFactory = false;
        // }
        // else
        // {

        String factoryClassName = properties.getProperty(TANGO_FACTORY);
        if (factoryClassName == null) {
            factoryClassName = "fr.esrf.TangoApi.factory.DefaultTangoFactoryImpl";
        }
        //System.out.println("TANGO_FACTORY " + factoryClassName);
        tangoFactory = (ITangoFactory) getObject(factoryClassName);
        isDefaultFactory = false;
        // }
    }
484752
protected final FactorySimple
    createPutFactorySimple(
      final Class<?> pBeanClass) throws Exception {
    FactorySimple factory = new FactorySimple();
    factory.setObjectClass(pBeanClass);
    //assigning fully initialized object:
    this.factoriesMap
      .put(pBeanClass, factory);
    return factory;
  }
971514
public void registerBeanFactory(String theName, String groupName, final Class beanClass) {
        getProxyBuilder().registerFactory(theName, new AbstractFactory() {
            public Object newInstance(FactoryBuilderSupport builder, Object name, Object value,
                                      Map properties) throws InstantiationException, IllegalAccessException {
                if (checkValueIsTypeNotString(value, name, beanClass)) {
                    return value;
                } else {
                    return beanClass.newInstance();
                }
            }
        });
        getRegistrationGroup(groupName).add(theName);
    }
1139177
public void setActionStubFactory(ActionStubFactory actionStubFactory) {
		this.actionStubFactory = actionStubFactory;
		if (actionStubFactory != null) {
			actionStubFactory.init(new ActionStubFactoryContext() {

				@Override
				public ServiceUrlProvider getServiceUrlProvider() {
					return moduleRegistry.getResourceRegistry().getServiceUrlProvider();
				}

				@Override
				public HttpAdapter getHttpAdapter() {
					return httpAdapter;
				}
			});
		}
	}
1274229
public void set(BridgeFactory factory) {
        if (factory.getNearType() != nearType) {
            throw new IllegalArgumentException("Type mismatch: " + nearType + ": " + factory.getNearType());
        }
        factorySetting.set(factory);
    }
503551
public <T> void registerConverter(final Class<T> clazz, final CellConverterFactory<T> converterFactory) {
        ArgUtils.notNull(clazz, "clazz");
        ArgUtils.notNull(converterFactory, "converterFactory");
        
        converterFactoryMap.put(clazz, converterFactory);
    }
1057814
<E extends Entity> void registerStaticEntityFactory(EntityFactory<E, ?> staticEntityFactory) {
    String entityTypeId = staticEntityFactory.getEntityTypeId();
    staticEntityFactoryMap.put(entityTypeId, staticEntityFactory);
  }
1217600
@Override
    protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
        beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(servletContext));
        beanFactory.ignoreDependencyInterface(ServletContextAware.class);
        beanFactory.registerResolvableDependency(ServletContext.class, servletContext);

        WebApplicationContextUtils.registerWebApplicationScopes(beanFactory);
    }
263736
public void addMessageSelectorFactory(MessageSelectorFactory<?> factory) {
        if (factory instanceof BeanFactoryAware) {
            ((BeanFactoryAware) factory).setBeanFactory(beanFactory);
        }

        this.factories.add(factory);
    }