Class AbstractComponentLoader
java.lang.Object
com.zachsthings.libcomponents.loader.AbstractComponentLoader
- All Implemented Interfaces:
ComponentLoader
- Direct Known Subclasses:
ConfigListedComponentLoader,FileComponentLoader,StaticComponentLoader
A parent class that contains several useful component loader helper methods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ConfigurationFilecreateConfigurationNode(File configFile)getConfiguration(AbstractComponent component)protected Loggerprotected AbstractComponentinstantiateComponent(Class<?> clazz)Instantiates a component, performing checks for various requirements.booleanisComponentClass(Class<?> clazz)toFileName(AbstractComponent component)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.zachsthings.libcomponents.loader.ComponentLoader
loadComponents
-
Constructor Details
-
AbstractComponentLoader
-
-
Method Details
-
getConfiguration
- Specified by:
getConfigurationin interfaceComponentLoader
-
createConfigurationNode
-
instantiateComponent
Instantiates a component, performing checks for various requirements.- Parameters:
clazz- The class that should be the component;- Returns:
- An instance of the component class
- Throws:
Throwable- when an error occurs while initializing the component for some reason.
-
isComponentClass
-
toFileName
-
getLogger
-