Autumn

A microscopically small alternative to Spring Framework that creates singleton objects

License

License

GroupId

GroupId

uk.co.datumedge
ArtifactId

ArtifactId

autumn
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Autumn
A microscopically small alternative to Spring Framework that creates singleton objects
Project URL

Project URL

https://github.com/hertzsprung/autumn
Source Code Management

Source Code Management

http://github.com/hertzsprung/autumn

Download autumn

How to add to project

<!-- https://jarcasting.com/artifacts/uk.co.datumedge/autumn/ -->
<dependency>
    <groupId>uk.co.datumedge</groupId>
    <artifactId>autumn</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/uk.co.datumedge/autumn/
implementation 'uk.co.datumedge:autumn:1.0'
// https://jarcasting.com/artifacts/uk.co.datumedge/autumn/
implementation ("uk.co.datumedge:autumn:1.0")
'uk.co.datumedge:autumn:jar:1.0'
<dependency org="uk.co.datumedge" name="autumn" rev="1.0">
  <artifact name="autumn" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.co.datumedge', module='autumn', version='1.0')
)
libraryDependencies += "uk.co.datumedge" % "autumn" % "1.0"
[uk.co.datumedge/autumn "1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.javassist : javassist jar 3.17.1-GA

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.hamcrest : hamcrest-library jar 1.3

Project Modules

There are no modules declared in this project.

Build Status

A microscopically small alternative to Spring Framework that creates singleton objects. The library is released under the MIT license.

Installation

Installing from Maven Central

<dependency>
	<groupId>uk.co.datumedge</groupId>
	<artifactId>autumn</artifactId>
	<version>1.0</version>
</dependency>

Installing from source

mvn install

Getting started

public interface Module {
	double random();
	double anotherRandom();
}

public static class ModuleImplementation implements Module {
	@Override public double random() {
		return Math.random();
	}

	@Override public double anotherRandom() {
		return random();
	}
}

public static void main(String[] args) {
	Module module = Singletoniser.singletonise(Module.class, new ModuleImplementation());
	System.out.println(module.random());
	System.out.println(module.random());
	System.out.println(module.anotherRandom());
	// all invocations print the same value
}

Resources

Versions

Version
1.0