Package com.google.inject.InjectorImpl

Examples of com.google.inject.InjectorImpl.MethodInvoker


    // We can't use FastMethod if the method is private.
    int modifiers = method.getModifiers();
    if (Modifier.isPrivate(modifiers) || Modifier.isProtected(modifiers)) {
      method.setAccessible(true);
      methodInvoker = new MethodInvoker() {
        public Object invoke(Object target, Object... parameters)
            throws IllegalAccessException, InvocationTargetException {
          return method.invoke(target, parameters);
        }
      };
    } else {
      FastClass fastClass = newFastClass(method.getDeclaringClass(), Visibility.forMember(method));
      final FastMethod fastMethod = fastClass.getMethod(method);

      methodInvoker = new MethodInvoker() {
        public Object invoke(Object target, Object... parameters)
            throws IllegalAccessException, InvocationTargetException {
          return fastMethod.invoke(target, parameters);
        }
      };
View Full Code Here

TOP

Related Classes of com.google.inject.InjectorImpl.MethodInvoker

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.