Package org.japura.controller

Examples of org.japura.controller.ControllerException


  @Override
  public final <E> E get(Class<E> clss) {
  ChildController cc = clss.getAnnotation(ChildController.class);
  if (cc != null && cc.getOnlyFromGroup()) {
    throw new ControllerException(
      "You need get the child controller "
        + clss.getName()
        + " through the group. Use getGroup().get() or Controller.getFromGroup() method.");
  }
View Full Code Here


    try {
    Constructor<E> constructor =
      controllerClass.getConstructor(Context.class, Controller.class);
    controller = constructor.newInstance(context, parentController);
    } catch (NoSuchMethodException e) {
    throw new ControllerException(
      controllerClass.getName()
        + " must have a constructor with context and parent controller parameters.",
      e);
    } catch (Exception e) {
    throw new ControllerException("Controller constructor error", e);
    }
  } else {
    throw new IllegalArgumentException("Not a supported controller class: "
      + controllerClass.getName());
  }
View Full Code Here

TOP

Related Classes of org.japura.controller.ControllerException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.