Package it.tidalwave.role.spi
Interface OwnerRoleFactoryProvider
-
- All Known Implementing Classes:
OwnerRoleFactoryProvider.SimpleOwnerRoleFactoryProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface OwnerRoleFactoryProvider
The provider of the singletonOwnerRoleFactory
.- Author:
- Fabrizio Giudici
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
OwnerRoleFactoryProvider.EmptyOwnerRoleFactory
static class
OwnerRoleFactoryProvider.Inner
static class
OwnerRoleFactoryProvider.SimpleOwnerRoleFactoryProvider
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description OwnerRoleFactory
createRoleFactory(java.lang.Object owner)
Creates anOwnerRoleFactory
for the given objectstatic OwnerRoleFactory
emptyRoleFactory()
Returns an empty implementation of factory.static OwnerRoleFactoryProvider
getInstance()
Returns the singleton instance ofOwnerRoleFactoryProvider
static void
reset()
Removes a previously installedOwnerRoleFactory
.static void
set(OwnerRoleFactory ownerRoleFactory)
Installs aOwnerRoleFactory
.
-
-
-
Method Detail
-
getInstance
@Nonnull static OwnerRoleFactoryProvider getInstance()
Returns the singleton instance ofOwnerRoleFactoryProvider
- Returns:
- the singleton instance
-
createRoleFactory
@Nonnull OwnerRoleFactory createRoleFactory(@Nonnull java.lang.Object owner)
Creates anOwnerRoleFactory
for the given object- Parameters:
owner
- the object- Returns:
AsDelegate
-
set
static void set(@Nonnull OwnerRoleFactory ownerRoleFactory)
Installs aOwnerRoleFactory
. This method is for testing only (used to set up a testing context).- Parameters:
ownerRoleFactory
- theOwnerRoleFactory
- See Also:
reset()
-
reset
static void reset()
Removes a previously installedOwnerRoleFactory
. This method is for testing only (used to clean up a testing context).- See Also:
set(OwnerRoleFactory)
-
emptyRoleFactory
@Nonnull static OwnerRoleFactory emptyRoleFactory()
Returns an empty implementation of factory. Useful for setting up a test environment.- Returns:
- the empty implementation
- Since:
- 3.2-ALPHA-1
-
-