@Override
  public MasterEnvironment createEnvironment(final MasterCoprocessor instance, final int priority,
    final int seq, final Configuration conf) {
    // If coprocessor exposes any services, register them.
    for (Service service : instance.getServices()) {
      masterServices.registerService(service);
    }
    // If a CoreCoprocessor, return a 'richer' environment, one laden with MasterServices.
    return instance.getClass().isAnnotationPresent(CoreCoprocessor.class)
      ? new MasterEnvironmentForCoreCoprocessors(instance, priority, seq, conf, masterServices)
      : new MasterEnvironment(instance, priority, seq, conf, masterServices);
  }
@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