Do not call the new
method to instantiate components. Instead, retrieve components by using the Habitat
instance. The simplest way to use the Habitat
instance is through a getComponent(Class
T contract)
call:
public <T> T getComponent(Class<T> clazz) throws ComponentException;
More APIs are available at Habitat
.