// Path: janos-api/src/main/java/org/apache/olingo/odata2/janos/processor/api/extension/ExtensionContext.java
// public interface ExtensionContext {
//   String PARA_URI_INFO = "~uriinfo";
//   String PARA_ACCEPT_HEADER = "~acceptheader";
//   String PARA_REQUEST_BODY = "~requestbody";
//   String PARA_REQUEST_TYPE = "~requesttype";
// 
//   ExtensionContext addParameter(String name, Object value);
// 
//   Object getParameter(String name);
// 
//   UriInfo getUriInfo();
// 
//   String getAcceptHeader();
// 
//   InputStream getRequestBody();
// 
//   Extension.Method getRequestType();
// 
//   ODataResponse proceed() throws Exception;
// }


import org.apache.olingo.odata2.janos.processor.api.extension.Extension;
import org.apache.olingo.odata2.janos.processor.api.extension.ExtensionContext;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
  static class ExtensionHolder {
    private final String entitySetName;
    private final Extension.Method type;
    private final Method method;
    private final Object instance;

    public ExtensionHolder(String entitySetName, Extension.Method type, Object instance, Method method) {
      this.entitySetName = entitySetName;
      this.type = type;
      this.instance = instance;
      this.method = method;
    }

    public String getEntitySetName() {
      return entitySetName;
    }

    public Extension.Method getType() {
      return type;
    }

    public Object getInstance() {
      return instance;
    }

    public Method getMethod() {
      return method;
    }

    public Object process(ExtensionProcessor extProcessor) throws InvocationTargetException, IllegalAccessException {
// Path: janos-api/src/main/java/org/apache/olingo/odata2/janos/processor/api/extension/ExtensionContext.java
// public interface ExtensionContext {
//   String PARA_URI_INFO = "~uriinfo";
//   String PARA_ACCEPT_HEADER = "~acceptheader";
//   String PARA_REQUEST_BODY = "~requestbody";
//   String PARA_REQUEST_TYPE = "~requesttype";
// 
//   ExtensionContext addParameter(String name, Object value);
// 
//   Object getParameter(String name);
// 
//   UriInfo getUriInfo();
// 
//   String getAcceptHeader();
// 
//   InputStream getRequestBody();
// 
//   Extension.Method getRequestType();
// 
//   ODataResponse proceed() throws Exception;
// }


// Path: janos-core/src/main/java/org/apache/olingo/odata2/janos/processor/core/extension/ExtensionRegistry.java
import org.apache.olingo.odata2.janos.processor.api.extension.Extension;
import org.apache.olingo.odata2.janos.processor.api.extension.ExtensionContext;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

  static class ExtensionHolder {
    private final String entitySetName;
    private final Extension.Method type;
    private final Method method;
    private final Object instance;

    public ExtensionHolder(String entitySetName, Extension.Method type, Object instance, Method method) {
      this.entitySetName = entitySetName;
      this.type = type;
      this.instance = instance;
      this.method = method;
    }

    public String getEntitySetName() {
      return entitySetName;
    }

    public Extension.Method getType() {
      return type;
    }

    public Object getInstance() {
      return instance;
    }

    public Method getMethod() {
      return method;
    }

    public Object process(ExtensionProcessor extProcessor) throws InvocationTargetException, IllegalAccessException {
      ExtensionContext context = extProcessor.createContext();