Class FactoryProvider<I> (2.0.0)

public abstract class FactoryProvider<I> implements Comparable<FactoryProvider<?>>

A base class for service factory creation that can be registered with the ProviderRegistry.

Inheritance

Object > FactoryProvider<I>

Type Parameter

Name Description
I

Constructors

FactoryProvider(Class<I> baseInterface)

protected FactoryProvider(Class<I> baseInterface)
Parameter
Name Description
baseInterface Class<I>

Methods

compareTo(FactoryProvider<?> o)

public int compareTo(FactoryProvider<?> o)

This ensures that a list of these will be sorted so that higher precedence entries come later in the list.

Parameter
Name Description
o FactoryProvider<?>
Returns
Type Description
int

equals(Object o)

public boolean equals(Object o)

Included to support sorting by precedence (@see #compareTo(FactoryProvider))

Parameter
Name Description
o Object
Returns
Type Description
boolean
Overrides

getBaseInterface()

protected Class<I> getBaseInterface()
Returns
Type Description
Class<I>

getFactoryInstance()

protected abstract I getFactoryInstance()

Return an instance of the factory

Returns
Type Description
I

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides