public class InitLoader extends Object
| Constructor and Description |
|---|
InitLoader() |
InitLoader(ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
AndHowConfiguration |
getAndHowConfiguration(AndHowConfiguration defaultConfig)
Returns an AndHowConfiguration from an AndHowInit instance from the service
loader, or if not found, the default one passed in.
|
List<AndHowInit> |
getInitInstances()
Returns all the AndHowInit instances found by the service loader.
|
boolean |
hasConfig()
Returns true if there are any
AndHowInit instances available
from the loader, even if more than one. |
boolean |
isValidState()
Returns true if there are no more than 1 production init and 1 test init.
|
void |
reload()
Forces a reload of the service loader, which normally caches instances.
|
public InitLoader()
public InitLoader(ClassLoader classLoader)
public boolean isValidState()
public boolean hasConfig()
AndHowInit instances available
from the loader, even if more than one.public AndHowConfiguration getAndHowConfiguration(AndHowConfiguration defaultConfig)
isValidState will return
false if there is more than one instance found by the service loader.defaultConfig - Config to use if no AndHowInit is found to provide one.public List<AndHowInit> getInitInstances()
public void reload()
Copyright © 2017. All rights reserved.