View Javadoc

1   /**
2    * Project MI+
3    *
4    * Copyright (c) 2013, Syed Muhammad Humayun - smhumayun@gmail.com
5    *
6    * This project includes software developed by Syed Muhammad Humayun - smhumayun@gmail.com
7    * http://www.smhumayun.com
8    *
9    * Licensed under the Apache License, Version 2.0 (the
10   * "License"); you may not use this file except in compliance
11   * with the License. You may obtain a copy of the License at:
12   *
13   * http://www.apache.org/licenses/LICENSE-2.0
14   *
15   * Unless required by applicable law or agreed to in writing,
16   * software distributed under the License is distributed on
17   * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18   * KIND, either express or implied. See the License for the
19   * specific language governing permissions and limitations
20   * under the License.
21   */
22  package com.smhumayun.mi_plus;
23  
24  import com.smhumayun.mi_plus.util.Pair;
25  
26  import java.lang.reflect.Method;
27  import java.util.LinkedHashMap;
28  
29  /**
30   * Method Resolver to be used for MI Method Resolution
31   *
32   * @author smhumayun
33   * @since 1.0
34   */
35  public interface MIMethodResolver {
36  
37      /**
38       * Resolve method invoked method to target method and object
39       *
40       * @param miContainerClass      MI Container class - the class which has the {@link MISupport} annotation
41       * @param composedObjects       map of composed objects
42       * @param methodCall            method call made on Proxy
43       * @param methodCallArgs        method call arguments
44       * @return resolved target method and object
45       * @throws MIException {@link MIException}
46       */
47      Pair<Object, Method> resolve (Class miContainerClass, LinkedHashMap<Class, Object> composedObjects, Method methodCall
48              , Object[] methodCallArgs) throws MIException;
49  
50  }