@Override
  public MasterCoprocessor checkAndGetInstance(Class<?> implClass)
    throws InstantiationException, IllegalAccessException {
    try {
      if (MasterCoprocessor.class.isAssignableFrom(implClass)) {
        return implClass.asSubclass(MasterCoprocessor.class).getDeclaredConstructor().newInstance();
      } else {
        LOG.error("{} is not of type MasterCoprocessor. Check the configuration of {}",
          implClass.getName(), CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY);
        return null;
      }
    } catch (NoSuchMethodException | InvocationTargetException e) {
      throw (InstantiationException) new InstantiationException(implClass.getName()).initCause(e);
    }
  }
@return An instance of MasterServices, an object NOT for general user-space Coprocessor
        consumption.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterCoprocessorHost.java