ControllerContext context = this.getKernel().getController().getContext(name, null);
// Ensure Bound
if (context == null || context.getTarget() == null)
{
throw new NotBoundException("Requested value bound at name \"" + name + "\" is not bound.");
}
// If we're checking for installed
if (checkInstalled)
{
// Get State
ControllerState state = context.getState();
// If State is other than INSTALLED
if (!state.equals(ControllerState.INSTALLED))
{
throw new NotBoundException("Object is bound at key " + name
+ ", but is not fully installed, instead of state: " + state);
}
}