use of com.developmentontheedge.be5.api.Component in project be5 by DevelopmentOnTheEdge.
the class Be5Injector method getComponent.
/**
* Returns a created component.
*/
@Override
public Component getComponent(String componentId) {
try {
Class<?> klass = getComponentClass(componentId);
Component component = (Component) klass.newInstance();
configureIfConfigurable(component, configurations);
injectAnnotatedFields(component);
return component;
} catch (InstantiationException | IllegalAccessException | ClassCastException e) {
throw Be5Exception.internal(e, "Can't create component");
}
}
Aggregations