public class TestInitLoader extends InitLoader
Class.forName and cast to
an InitLoader instance. During production this class (and the test
harness module) are not expected to be on the classpath.| Constructor and Description |
|---|
TestInitLoader() |
TestInitLoader(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 TestInitLoader()
public TestInitLoader(ClassLoader classLoader)
public boolean isValidState()
isValidState in class InitLoaderpublic boolean hasConfig()
AndHowInit instances available
from the loader, even if more than one.hasConfig in class InitLoaderpublic AndHowConfiguration getAndHowConfiguration(AndHowConfiguration defaultConfig)
isValidState will return
false if there is more than one instance found by the service loader.getAndHowConfiguration in class InitLoaderdefaultConfig - Config to use if no AndHowInit is found to provide one.public List<AndHowInit> getInitInstances()
getInitInstances in class InitLoaderpublic void reload()
reload in class InitLoaderCopyright © 2022. All rights reserved.