public class AnnComponentManager extends Object
Modifier and Type | Field and Description |
---|---|
static Class[] |
coreComponentClasses |
Modifier and Type | Method and Description |
---|---|
static boolean |
addComponentClassName(String e) |
static <T> boolean |
applyConfigEntry(AbstractComponent component,
String optionName,
T value)
Deprecated.
|
Class<? extends Component> |
getComponentClass(String componentName)
Get the corresponding component class given the long or short name.
|
Collection<Class<? extends Component>> |
getComponents()
Returns a list of all available components in this instance
of
ComponentManager . |
org.apache.commons.collections4.BidiMap<Class<? extends Component>,String> |
getComponentsNamed()
Convenience method, which returns a list of components along with
their name.
|
org.apache.commons.collections4.BidiMap<Class<? extends Component>,String> |
getComponentsNamedShort()
Convenience method, which returns a list of components along with
their name.
|
Collection<Class<? extends Component>> |
getComponentsOfType(Class type)
Get registered components which are of the specified type.
|
SortedSet<String> |
getComponentStrings()
Returns a list of all available components in this instance
of
ComponentManager . |
SortedSet<String> |
getComponentStringsOfType(Class type)
Get registered components which are of the specified type.
|
static Set<Field> |
getConfigOptions(Class<? extends Component> component)
Returns the config options of a DL-Learner component.
|
static List<Class<? extends Component>> |
getCoreComponentTypes(Class<? extends Component> component)
Convenience method to retrieve core types of a component.
|
static String |
getDescription(Class<? extends Component> component)
Returns the name of a DL-Learner component.
|
static String |
getDescription(Component component)
Returns the description of a DL-Learner component.
|
static AnnComponentManager |
getInstance()
Gets the singleton instance of
ComponentManager . |
static String |
getName(Class<? extends Component> component)
Returns the name of a DL-Learner component.
|
static String |
getName(Component component)
Returns the name of a DL-Learner component.
|
static String |
getName(Field f)
Returns the name of a config option
|
static String |
getShortName(Class<? extends Component> component)
Returns the name of a DL-Learner component.
|
static String |
getShortName(Component component)
Returns the short name of a DL-Learner component.
|
static double |
getVersion(Class<? extends Component> component)
Returns the version of a DL-Learner component.
|
static double |
getVersion(Component component)
Returns the version of a DL-Learner component.
|
static void |
setComponentClassNames(List<String> componentClassNames)
Explicitly sets the list of components to use.
|
static void |
setReflectionScanner(org.reflections.Reflections ref) |
public static final Class[] coreComponentClasses
public static void setComponentClassNames(List<String> componentClassNames)
public static void setReflectionScanner(org.reflections.Reflections ref)
public static AnnComponentManager getInstance()
ComponentManager
.ComponentManager
instance.public Collection<Class<? extends Component>> getComponents()
ComponentManager
.ComponentManager
.public SortedSet<String> getComponentStrings()
ComponentManager
.ComponentManager
.public SortedSet<String> getComponentStringsOfType(Class type)
type
- The super type.public Class<? extends Component> getComponentClass(String componentName)
componentName
- The long or short name of the component.public Collection<Class<? extends Component>> getComponentsOfType(Class type)
type
- The super type.public org.apache.commons.collections4.BidiMap<Class<? extends Component>,String> getComponentsNamed()
public org.apache.commons.collections4.BidiMap<Class<? extends Component>,String> getComponentsNamedShort()
@Deprecated public static <T> boolean applyConfigEntry(AbstractComponent component, String optionName, T value)
T
- Type of the config option.component
- A component object.optionName
- the option namevalue
- the value to setpublic static List<Class<? extends Component>> getCoreComponentTypes(Class<? extends Component> component)
component
- A component.public static String getName(Class<? extends Component> component)
component
- the componentpublic static String getName(Component component)
component
- the componentpublic static String getShortName(Class<? extends Component> component)
component
- the componentpublic static String getShortName(Component component)
component
- the componentpublic static String getDescription(Class<? extends Component> component)
component
- the componentpublic static String getDescription(Component component)
component
- the componentpublic static Set<Field> getConfigOptions(Class<? extends Component> component)
component
- the componentpublic static double getVersion(Class<? extends Component> component)
component
- the componentpublic static double getVersion(Component component)
component
- the componentpublic static boolean addComponentClassName(String e)
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann