delight-factories

Allows definition and management of lightweight factories.

Лицензия

Лицензия

GPL
Группа

Группа

org.javadelight
Идентификатор

Идентификатор

delight-factories
Последняя версия

Последняя версия

0.0.3
Дата

Дата

Тип

Тип

bundle
Описание

Описание

delight-factories
Allows definition and management of lightweight factories.
Ссылка на сайт

Ссылка на сайт

https://github.com/javadelight/delight-factories
Система контроля версий

Система контроля версий

https://github.com/javadelight/delight-factories

Скачать delight-factories

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
com.google.gwt : gwt-user jar 2.8.2

test (2)

Идентификатор библиотеки Тип Версия
org.eclipse.xtend : org.eclipse.xtend.lib.gwt jar 2.13.0
junit : junit jar 4.7

Модули Проекта

Данный проект не имеет модулей.

Build Status

delight-factories

A simple API for factories based on simple plain Java objects.

Part of Java Delight.

Usage

Create a collection of factories:

FactoryCollection factories = Factories.create();

Define classes for a factory:

private static class MyConfiguration implements Configuration {}
	
private static class MyDependencies implements Dependencies {}

Register a factory:

factories.register(new Factory<String, MyConfiguration, Dependencies>() {

	@Override
	public boolean canInstantiate(Configuration conf) {
		return (conf instanceof MyConfiguration);
	}

	@Override
	public String create(MyConfiguration conf, Dependencies dependencies) {
		
		return "Hello, World!";
	}
	
});

Instantiate an object:

Object created = factories.create(new MyConfiguration(), new MyDependencies());
// created == "Hello, WorlD!";

Maven Dependency

<dependency>
    <groupId>org.javadelight</groupId>
    <artifactId>delight-factories</artifactId>
    <version>[insert latest version]</version>
</dependency>

This artifact is available on Maven Central and BinTray.

Maven Central

Links

-> All Project Reports

Версии библиотеки

Версия
0.0.3