通过{@link #serviceLocator}路由到缓存的方法，并且执行

@param objClass
服务接口class
@param obj
服务实现bean
@param methodName
方法名称
@param argTypes
方法参数类型数组
@param args
方法参数数组
@param appId
appId
@param token
token
@return 调用结果
@throws RpcException
504999
private Object invoke(Class<?> objClass, Object obj, String methodName, String[] argTypes,
            Object[] args, String appId, String token) throws RpcException {
        Object res;
        try {
            MethodDescriptor<String> desc = serviceLocator
                    .getServiceDescriptor(new MethodWrapper(objClass.getName(), methodName,
                            StringUtil.toString4Array(argTypes)).toString());
            if (desc == null) {
                throw new MethodNotFoundException(String.format(
                        "Service method not found. class=%s, method=%s, argTypes=%s", objClass,
                        methodName, StringUtil.toString4Array(argTypes)));
            }

            if (!isAuthoriedAccess(desc, appId, token)) {
                throw new AuthAccessDeniedException("AppId or token is not valid to access");
            }

            res = desc.getMethod().invoke(desc.getTarget(), args);
        } catch (MethodNotFoundException e1) {
            throw new InvalidParamException(e1);
        } catch (IllegalArgumentException e1) {
            throw new InvalidParamException(e1);
        } catch (IllegalAccessException e1) {
            throw new InvalidAccessException(e1);
        } catch (AuthAccessDeniedException e1) {
            throw new RpcException(e1);
        } catch (InvocationTargetException e1) {
            Throwable e2 = e1.getTargetException();
            if (e2 instanceof RpcException) {
                throw (RpcException) e2;
            } else {
                throw new ServerErrorException(e2);
            }
        }
        if (res == void.class) {
            return null;
        } else {
            return res;
        }
    }
1092767
@FFDCIgnore(Throwable.class)
    private static Object createEclipseNamespaceMapper(Class<?> mcls, Map<String, String> map) {
        ASMHelper helper = new ASMHelper();
        String className = "org.apache.cxf.jaxb.EclipseNamespaceMapper";
        String slashedName = "org/apache/cxf/jaxb/EclipseNamespaceMapper";
        Class<?> cls = helper.findClass(className, JAXBUtils.class);

        if (cls == null) {
            ClassWriter cw = helper.createClassWriter();
            if (cw == null) {
                return null;
            }
            String superName = "org/eclipse/persistence/internal/oxm/record/namespaces/MapNamespacePrefixMapper";
            FieldVisitor fv;
            MethodVisitor mv;
            cw.visit(Opcodes.V1_6,
                     Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER,
                     slashedName, null,
                     superName, null);

            cw.visitSource("EclipseNamespaceMapper.java", null);

            fv = cw.visitField(Opcodes.ACC_PRIVATE, "nsctxt", "[Ljava/lang/String;", null, null);
            fv.visitEnd();


            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", "(Ljava/util/Map;)V",
                                "(Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;)V", null);
            mv.visitCode();
            Label l0 = helper.createLabel();
            mv.visitLabel(l0);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                               superName, "<init>", "(Ljava/util/Map;)V", false);
            Label l1 = helper.createLabel();
            mv.visitLabel(l1);
            mv.visitInsn(Opcodes.RETURN);
            Label l2 = helper.createLabel();
            mv.visitLabel(l2);
            mv.visitMaxs(2, 2);
            mv.visitEnd();


            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "setContextualNamespaceDecls", "([Ljava/lang/String;)V",
                                null, null);
            mv.visitCode();
            l0 = helper.createLabel();
            mv.visitLabel(l0);
            mv.visitLineNumber(47, l0);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            mv.visitFieldInsn(Opcodes.PUTFIELD, slashedName, "nsctxt", "[Ljava/lang/String;");
            l1 = helper.createLabel();
            mv.visitLabel(l1);
            mv.visitLineNumber(48, l1);
            mv.visitInsn(Opcodes.RETURN);
            l2 = helper.createLabel();
            mv.visitLabel(l2);
            mv.visitLocalVariable("this", "L" + slashedName + ";", null, l0, l2, 0);
            mv.visitLocalVariable("contextualNamespaceDecls", "[Ljava/lang/String;", null, l0, l2, 1);
            mv.visitMaxs(2, 2);
            mv.visitEnd();

            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "getContextualNamespaceDecls", "()[Ljava/lang/String;", null, null);
            mv.visitCode();
            l0 = helper.createLabel();
            mv.visitLabel(l0);
            mv.visitLineNumber(51, l0);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitFieldInsn(Opcodes.GETFIELD, slashedName, "nsctxt", "[Ljava/lang/String;");
            mv.visitInsn(Opcodes.ARETURN);
            l1 = helper.createLabel();

            mv.visitLabel(l1);
            mv.visitLocalVariable("this", "L" + slashedName + ";", null, l0, l1, 0);

            mv.visitMaxs(1, 1);
            mv.visitEnd();


            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "getPreDeclaredNamespaceUris", "()[Ljava/lang/String;", null, null);
            mv.visitCode();
            l0 = helper.createLabel();
            mv.visitLabel(l0);
            mv.visitLineNumber(1036, l0);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                               superName,
                               "getPreDeclaredNamespaceUris", "()[Ljava/lang/String;", false);
            mv.visitVarInsn(Opcodes.ASTORE, 1);
            l1 = helper.createLabel();
            mv.visitLabel(l1);
            mv.visitLineNumber(1037, l1);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitFieldInsn(Opcodes.GETFIELD, slashedName, "nsctxt", "[Ljava/lang/String;");
            l2 = helper.createLabel();
            mv.visitJumpInsn(Opcodes.IFNONNULL, l2);
            Label l3 = helper.createLabel();
            mv.visitLabel(l3);
            mv.visitLineNumber(1038, l3);
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            mv.visitInsn(Opcodes.ARETURN);
            mv.visitLabel(l2);
            mv.visitLineNumber(1040, l2);
            mv.visitFrame(Opcodes.F_APPEND, 1, new Object[] {"[Ljava/lang/String;"}, 0, null);
            mv.visitTypeInsn(Opcodes.NEW, "java/util/ArrayList");
            mv.visitInsn(Opcodes.DUP);
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/util/Arrays", "asList",
                               "([Ljava/lang/Object;)Ljava/util/List;", false);
            mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/util/ArrayList", "<init>", "(Ljava/util/Collection;)V", false);
            mv.visitVarInsn(Opcodes.ASTORE, 2);
            Label l4 = helper.createLabel();
            mv.visitLabel(l4);
            mv.visitLineNumber(1041, l4);
            mv.visitInsn(Opcodes.ICONST_1);
            mv.visitVarInsn(Opcodes.ISTORE, 3);
            Label l5 = helper.createLabel();
            mv.visitLabel(l5);
            Label l6 = helper.createLabel();
            mv.visitJumpInsn(Opcodes.GOTO, l6);
            Label l7 = helper.createLabel();
            mv.visitLabel(l7);
            mv.visitLineNumber(1042, l7);
            mv.visitFrame(Opcodes.F_APPEND, 2, new Object[] {"java/util/List", Opcodes.INTEGER}, 0, null);
            mv.visitVarInsn(Opcodes.ALOAD, 2);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitFieldInsn(Opcodes.GETFIELD, slashedName, "nsctxt", "[Ljava/lang/String;");
            mv.visitVarInsn(Opcodes.ILOAD, 3);
            mv.visitInsn(Opcodes.AALOAD);
            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "remove", "(Ljava/lang/Object;)Z", true);
            mv.visitInsn(Opcodes.POP);
            Label l8 = helper.createLabel();
            mv.visitLabel(l8);
            mv.visitLineNumber(1041, l8);
            mv.visitIincInsn(3, 2);
            mv.visitLabel(l6);
            mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            mv.visitVarInsn(Opcodes.ILOAD, 3);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitFieldInsn(Opcodes.GETFIELD,
                              slashedName,
                              "nsctxt", "[Ljava/lang/String;");
            mv.visitInsn(Opcodes.ARRAYLENGTH);
            mv.visitJumpInsn(Opcodes.IF_ICMPLT, l7);
            Label l9 = helper.createLabel();
            mv.visitLabel(l9);
            mv.visitLineNumber(1044, l9);
            mv.visitVarInsn(Opcodes.ALOAD, 2);
            mv.visitVarInsn(Opcodes.ALOAD, 2);
            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            mv.visitTypeInsn(Opcodes.ANEWARRAY, "java/lang/String");
            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List",
                               "toArray", "([Ljava/lang/Object;)[Ljava/lang/Object;", true);
            mv.visitTypeInsn(Opcodes.CHECKCAST, "[Ljava/lang/String;");
            mv.visitInsn(Opcodes.ARETURN);
            Label l10 = helper.createLabel();
            mv.visitLabel(l10);
            mv.visitLocalVariable("this", "L" + slashedName + ";",
                                  null, l0, l10, 0);
            mv.visitLocalVariable("sup", "[Ljava/lang/String;", null, l1, l10, 1);
            mv.visitLocalVariable("s", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", l4, l10, 2);
            mv.visitLocalVariable("x", "I", null, l5, l9, 3);
            mv.visitMaxs(3, 4);
            mv.visitEnd();

            cw.visitEnd();

            byte[] bts = cw.toByteArray();
            cls = helper.loadClass(className,
                                   mcls, bts);
        }
        try {
            return cls.getConstructor(Map.class).newInstance(map);
        } catch (Throwable e) {
            e.printStackTrace();
            return null;
        }
    }
868903
private void createQueryFutureMethod(JavaClass jClass,
                                       Method method)
  {
    Class<?> []parameterTypes = method.getParameterTypes();
    Annotation [][]parameterAnns = method.getParameterAnnotations();

    int paramLength = parameterTypes.length;
    
    addMethod(method);
    
    CodeWriterAttribute code = createMethodHeader(jClass, method);
    
    code.setMaxLocals(1 + 2 * parameterTypes.length);
    code.setMaxStack(10 + 2 * parameterTypes.length);
    
    code.pushObjectVar(0);
    code.getField(jClass.getThisClass(),
                  "_messageFactory",
                  MessageFactoryAmp.class);
    
    // code.pushObjectVar(getLength(parameterTypes, resultOffset) + 1);
    
    Timeout timeoutAnn = method.getAnnotation(Timeout.class);
    
    if (timeoutAnn != null) {
      long timeout = timeoutAnn.unit().toMillis(timeoutAnn.value());
      code.pushConstant(timeout);
    }
    
    
    code.pushObjectVar(0);
    code.getField(jClass.getThisClass(),
                  "_serviceRef",
                  ServiceRefAmp.class);
    
    code.pushObjectVar(0);
    code.getField(jClass.getThisClass(),
                  fieldName(method),
                  MethodAmp.class);
    
    partitionMethod(code, parameterTypes, parameterAnns);
    
    pushParameters(code, parameterTypes, parameterAnns,
                   1, 0, paramLength, -1);

    if (timeoutAnn != null) {
      code.invokeInterface(MessageFactoryAmp.class,
                           "queryFuture",
                           Object.class, // QueryWithResultMessage.class,
                           long.class,
                           ServiceRefAmp.class,
                           MethodAmp.class,
                           Object[].class);
    }
    else {
      code.invokeInterface(MessageFactoryAmp.class,
                           "queryFuture",
                           Object.class, // QueryWithResultMessage.class,
                           ServiceRefAmp.class,
                           MethodAmp.class,
                           Object[].class);
    }

    popReturn(code, method.getReturnType());

    code.close();
  }
467300
private EJBMethodInfoImpl mapMethodInfo(EJSDeployedSupport s,
                                            EJSWrapperBase wrapper, int methodId,
                                            String methodSignature) {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2

        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "mapMethodInfo(" + methodId + "," + methodSignature + ")");

        EJBMethodInfoImpl rtnInfo = null; // d122418-1 //d140003.20

        s.methodId = methodId; //130230 d140003.19
        s.ivWrapper = wrapper; // d366807.1

        if (methodId < 0) {
            if (methodId == MID_BUSINESS_REMOVE) {
                // Internal remove method for business interfaces.        F743-29185
                rtnInfo = s.ivThreadData.getEJBMethodInfoStack().get(
                                                                     "$remove:", null, wrapper,
                                                                     wrapper.ivInterface == WrapperInterface.BUSINESS_LOCAL ? MethodInterface.LOCAL : MethodInterface.REMOTE,
                                                                     wrapper.bmd.usesBeanManagedTx ? TransactionAttribute.TX_BEAN_MANAGED : TransactionAttribute.TX_NOT_SUPPORTED);
                rtnInfo.setClassLoader = true; // d661827
            } else {
                rtnInfo = ivEntityHelper.getPMMethodInfo(s, wrapper, methodId, methodSignature);
            }
        } else // d122418-1
        { // d122418-1
          // d206696 - Account for case where
          // methodInfos array is null (which occurs if WS invocation
          // API is used on an SLSB with no service endpoint interface defined)
            if (wrapper.methodInfos == null)
                throw new IllegalStateException("An attempt was made to invoke a method on a bean interface that is not defined.");
            rtnInfo = wrapper.methodInfos[methodId]; // d122418-1
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "mapMethodInfo");

        return rtnInfo; // d122418-1
    }
332989
private Object invokeRpc(Method method, Object[] args) throws Exception {
		String methodName = method.getName();
		Class<?>[] parameterTypes = method.getParameterTypes();
		Annotation[][] parameterAnnotations = method.getParameterAnnotations();
		Time futureTimeout = extractRpcTimeout(parameterAnnotations, args, timeout);

		final RpcInvocation rpcInvocation = createRpcInvocationMessage(methodName, parameterTypes, args);

		Class<?> returnType = method.getReturnType();

		final Object result;

		if (Objects.equals(returnType, Void.TYPE)) {
			tell(rpcInvocation);

			result = null;
		} else {
			// execute an asynchronous call
			CompletableFuture<?> resultFuture = ask(rpcInvocation, futureTimeout);

			CompletableFuture<?> completableFuture = resultFuture.thenApply((Object o) -> {
				if (o instanceof SerializedValue) {
					try {
						return  ((SerializedValue<?>) o).deserializeValue(getClass().getClassLoader());
					} catch (IOException | ClassNotFoundException e) {
						throw new CompletionException(
							new RpcException("Could not deserialize the serialized payload of RPC method : "
								+ methodName, e));
					}
				} else {
					return o;
				}
			});

			if (Objects.equals(returnType, CompletableFuture.class)) {
				result = completableFuture;
			} else {
				try {
					result = completableFuture.get(futureTimeout.getSize(), futureTimeout.getUnit());
				} catch (ExecutionException ee) {
					throw new RpcException("Failure while obtaining synchronous RPC result.", ExceptionUtils.stripExecutionException(ee));
				}
			}
		}

		return result;
	}
815088
public final void voidInterfaceMethodDeclaratorRest() throws RecognitionException {
		int voidInterfaceMethodDeclaratorRest_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 35) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:439:5: ( formalParameters ( 'throws' qualifiedNameList )? ';' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:439:7: formalParameters ( 'throws' qualifiedNameList )? ';'
			{
			pushFollow(FOLLOW_formalParameters_in_voidInterfaceMethodDeclaratorRest1232);
			formalParameters();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:439:24: ( 'throws' qualifiedNameList )?
			int alt51=2;
			int LA51_0 = input.LA(1);
			if ( (LA51_0==113) ) {
				alt51=1;
			}
			switch (alt51) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:439:25: 'throws' qualifiedNameList
					{
					match(input,113,FOLLOW_113_in_voidInterfaceMethodDeclaratorRest1235); if (state.failed) return;
					pushFollow(FOLLOW_qualifiedNameList_in_voidInterfaceMethodDeclaratorRest1237);
					qualifiedNameList();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			match(input,52,FOLLOW_52_in_voidInterfaceMethodDeclaratorRest1241); if (state.failed) return;
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 35, voidInterfaceMethodDeclaratorRest_StartIndex); }

		}
	}
455819
public static Method getAccessibleMethod(final Object obj, final String methodName, final Class<?>... parameterTypes) {
		Asserts.notNull(obj, "object cannot be null.");

		for (Class<?> superClass = obj.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) {
			try {
				Method method = superClass.getDeclaredMethod(methodName, parameterTypes);
				method.setAccessible(true);
				return method;
			} catch (NoSuchMethodException e) {//NOSONAR
				// Method不在当前类定义,继续向上转型
			}
		}
		return null;
	}
742774
protected void invoke(Object pObject) throws APPErrorException {
        try {
            Method method =tgtools.util.ReflectionUtil.findMethod(mService.getClass(),getMethodName(),getModelClass());
            method.invoke(mService,pObject);
        }catch (Exception ex)
        {
            throw new APPErrorException("执行方法错误；原因："+ex.getCause().getMessage(),ex);
        }
    }
141608
public Observable<ServiceResponse<LuisApp>> exportWithServiceResponseAsync(UUID appId, String versionId) {
        if (this.client.endpoint() == null) {
            throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
        }
        if (appId == null) {
            throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
        }
        if (versionId == null) {
            throw new IllegalArgumentException("Parameter versionId is required and cannot be null.");
        }
        String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
        return service.export(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<LuisApp>>>() {
                @Override
                public Observable<ServiceResponse<LuisApp>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<LuisApp> clientResponse = exportDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
559768
private void lookupInstance(String args[]) {
        String serviceName = args[1];
        System.out.println("lookupInstance, serviceName=" + serviceName);
        try {
            ServiceInstance instance = ServiceDirectory.getLookupManager().lookupInstance(serviceName);
            printServiceInstance(instance);
        } catch (ServiceException e) {
            e.printStackTrace();
            fail(e.getServiceDirectoryError().getErrorMessage());
        }
    }
269209
public static MethodInstance getMethodInstanceEL(Object objMaybeNull, Class clazz, Collection.Key methodName, Object[] args) {
	checkAccessibility(objMaybeNull, clazz, methodName);
	args = cleanArgs(args);

	Method[] methods = mStorage.getMethods(clazz, methodName, args.length);// getDeclaredMethods(clazz);

	if (methods != null) {
	    Class[] clazzArgs = getClasses(args);
	    // exact comparsion
	    // print.e("exact:"+methodName);
	    outer: for (int i = 0; i < methods.length; i++) {
		if (methods[i] != null) {
		    Class[] parameterTypes = methods[i].getParameterTypes();
		    for (int y = 0; y < parameterTypes.length; y++) {
			if (toReferenceClass(parameterTypes[y]) != clazzArgs[y]) continue outer;
		    }
		    return new MethodInstance(methods[i], args);
		}
	    }
	    // like comparsion
	    // MethodInstance mi=null;
	    // print.e("like:"+methodName);
	    outer: for (int i = 0; i < methods.length; i++) {
		if (methods[i] != null) {
		    Class[] parameterTypes = methods[i].getParameterTypes();
		    for (int y = 0; y < parameterTypes.length; y++) {
			if (!like(clazzArgs[y], toReferenceClass(parameterTypes[y]))) continue outer;
		    }
		    return new MethodInstance(methods[i], args);
		}
	    }

	    // convert comparsion
	    // print.e("convert:"+methodName);
	    MethodInstance mi = null;
	    int _rating = 0;
	    outer: for (int i = 0; i < methods.length; i++) {
		if (methods[i] != null) {
		    RefInteger rating = (methods.length > 1) ? new RefIntegerImpl(0) : null;
		    Class[] parameterTypes = methods[i].getParameterTypes();
		    Object[] newArgs = new Object[args.length];
		    for (int y = 0; y < parameterTypes.length; y++) {
			try {
			    newArgs[y] = convert(args[y], toReferenceClass(parameterTypes[y]), rating);
			}
			catch (PageException e) {
			    continue outer;
			}
		    }
		    if (mi == null || rating.toInt() > _rating) {
			if (rating != null) _rating = rating.toInt();
			mi = new MethodInstance(methods[i], newArgs);
		    }
		    // return new MethodInstance(methods[i],newArgs);
		}
	    }
	    return mi;
	}
	return null;
    }
157883
private void traceJndiBegin(String methodname, Object... objs) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            String providerURL = "UNKNOWN";
            try {
                providerURL = (String) getEnvironment().get(Context.PROVIDER_URL);
            } catch (NamingException ne) {
                /* Ignore. */
            }
            Tr.debug(tc, JNDI_CALL + methodname + " [" + providerURL + "]", objs);
        }
    }
1337495
public static void callMethod(final Object obj, final String methodName, final boolean includePrivateMehtods, final Object... args)
			throws InvocationTargetException {
		final Class[] intArgsClass = initParamsClasses(args);
		try {
			Class<?> current = obj.getClass();
			Method method = null;
			while (current != Object.class) {
				try {
					method = current.getDeclaredMethod(methodName, intArgsClass);
					break;
				} catch (final NoSuchMethodException ex) {
					current = current.getSuperclass();
				}
			}
			if (method == null) {
				throw new NoSuchMethodException("Mehtod is not found in " + current);
			}
			method.setAccessible(true);
			method.invoke(obj, args);
		} catch (final InvocationTargetException e) {
			throw new InvocationTargetException(e.getCause());
		} catch (final Exception e) {
			throw new InvocationTargetException(e);
		}
	}
27910
private Map<InterceptorMethodKind, List<InterceptorProxy>> createInterceptorProxyMap(final Class<?> interceptorOrEjbClass, int index)
                    throws EJBConfigurationException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
        {
            Tr.entry(tc, "createInterceptorProxyMap: " + interceptorOrEjbClass.getName() + ", " + index);
        }

        // Create a LIFO LinkedList of Class objects starting with the interceptor or EJB class
        // itself and then each its the super classes. We create a LIFO so that the interceptor
        // methods in the most general superclass are invoked first as required by the
        // EJB specification.
        LinkedList<Class<?>> supers;
        supers = InterceptorMetaDataHelper.getLIFOSuperClassesList(interceptorOrEjbClass);

        // Get the EnumMap of interceptor methods to be processed.
        EnumMap<InterceptorMethodKind, List<Method>> enumMap = null;

        // Determine if this is the EJB class
        boolean ejbClass = (index < 0); //d451021
        if (ejbClass)
        {
            if (isTraceOn && tc.isDebugEnabled()) // d404960
            {
                Tr.debug(tc, "processing EJB class, ivHasComponentInterface = " + ivHasComponentInterface);
            }

            // EJB class, call helper to get the EnumMap for the EJB only
            // if there is a WCCM EnterpriseBean object for this EJB.
            // If null, then this EJB must be annotated rather than defined
            // in ejb-jar.xml file.
            EnterpriseBean bean = ivBmd.wccm.enterpriseBean;
            if (bean != null)
            {
                enumMap = InterceptorMetaDataHelper.getEJBInterceptorMethods(ivEjbClass, bean, supers, ivBmd.j2eeName);
            }
        }
        else
        {
            // Get EnumMap for this interceptor class. The EnumMap is built from
            // processing Interceptors stanza in ejb-jar.xml to get list of each
            // interceptor method specified via xml.
            IdentityHashMap<Class<?>, EnumMap<InterceptorMethodKind, List<Method>>> interceptorsMap;
            interceptorsMap = ivEJBModuleMetaDataImpl.ivInterceptorsMap;
            if (interceptorsMap != null) // d438904
            {
                enumMap = interceptorsMap.get(interceptorOrEjbClass);
            }
        }

        Map<InterceptorMethodKind, List<InterceptorProxy>> proxyMap =
                        new HashMap<InterceptorMethodKind, List<InterceptorProxy>>(); // d630717

        // For each class in the interceptor class inheritance tree.
        for (Class<?> superClass : supers)
        {
            Map<InterceptorMethodKind, InterceptorProxy> proxies =
                            new EnumMap<InterceptorMethodKind, InterceptorProxy>(InterceptorMethodKind.class); // F743-17763

            // If there were no Interceptor methods defined via xml, then EnumMap
            // is null.  So only process EnumMap if not null.
            if (enumMap != null)
            {
                // F743-17763 - Iterate over all interceptor kinds, and look for
                // interceptors of that type defined in XML.
                for (InterceptorMethodKind kind : InterceptorMethodKind.values())
                {
                    // Get methods specified via xml.
                    List<Method> methodList = enumMap.get(kind);
                    if (methodList != null)
                    {
                        for (Method m : methodList)
                        {
                            // Is the method overridden?
                            if (!InterceptorMetaDataHelper.isMethodOverridden(m, supers)) // d469514
                            {
                                if (kind.isLifecycle() && ejbClass && kind.isEJBCallbackMethodValidationRequired(this))
                                {
                                    validateEJBCallbackMethod(kind, m, false);
                                }

                                // Not overridden, so process the method.
                                if (m.getDeclaringClass() == superClass)
                                {
                                    // Validate.
                                    if (proxies.containsKey(kind))
                                    {
                                        // CNTR0223E: Only one method in the {0} class is allowed to be a {1} interceptor method.
                                        String className = superClass.getName();
                                        Object[] data = new Object[] { className, kind.getXMLElementName() };
                                        Tr.error(tc, "DUPLICATE_INTERCEPTOR_METHOD_CNTR0223E", data);
                                        throw new EJBConfigurationException("Only one " + kind.getXMLElementName()
                                                                            + " interceptor method is allowed in class " + className);
                                    }

                                    // Create an InterceptorProxy for it.
                                    addInterceptorProxy(kind, m, index, proxies, proxyMap);
                                }
                            }
                        }
                    }
                }
            }

            // Provided that metadata-complete is false, process annotation
            // in the superClass to determine if there is any interceptor
            // method to add that was not added already via xml.
            if (!ivMetadataComplete)
            {
                // For each method of the class.
                // For each method in a class of EJB class inheritance.
                Method[] methods = superClass.getDeclaredMethods();
                for (Method m : methods)
                {
                    // F743-17763 - Iterate over all interceptor kinds, and look for
                    // interceptors of that type defined in XML.
                    for (InterceptorMethodKind kind : InterceptorMethodKind.values())
                    {
                        // Does this method have the annotation?
                        Class<? extends Annotation> annotationClass = kind.getAnnotationClass();
                        if (annotationClass != null && m.isAnnotationPresent(annotationClass))
                        {
                            // Yes, is the method overridden?
                            if (!InterceptorMetaDataHelper.isMethodOverridden(m, supers)) // d469514
                            {
                                // Not overridden, so validate its signature if necessary.
                                if (kind.isLifecycle())
                                {
                                    if (ejbClass && kind.isEJBCallbackMethodValidationRequired(this))
                                    {
                                        validateEJBCallbackMethod(kind, m, true);
                                    }

                                    InterceptorMetaDataHelper.validateLifeCycleSignature(kind,
                                                                                         annotationClass.getSimpleName(),
                                                                                         m, ejbClass, ivBmd.j2eeName);
                                }
                                else
                                {
                                    InterceptorMetaDataHelper.validateAroundSignature(kind, m, ivBmd.j2eeName);
                                }

                                // Validate.
                                InterceptorProxy proxy = proxies.get(kind);
                                if (proxy == null)
                                {
                                    // Create an InterceptorProxy for it.
                                    addInterceptorProxy(kind, m, index, proxies, proxyMap);
                                }
                                else if (!m.equals(proxy.ivInterceptorMethod))
                                {
                                    // CNTR0223E: Only one method in the {0} class is allowed to be a {1} interceptor method.
                                    String className = superClass.getName();
                                    Object[] data = new Object[] { className, kind.getXMLElementName() };
                                    Tr.error(tc, "DUPLICATE_INTERCEPTOR_METHOD_CNTR0223E", data);
                                    throw new EJBConfigurationException("Only one " + kind.getXMLElementName()
                                                                        + " interceptor method is allowed in class " + className);
                                }
                            }
                        }
                        else if (kind.isLifecycle() && ejbClass && kind.isNonAnnotatedEJBCallbackMethodValidationRequired(this))
                        {
                            if (m.getName().equals(kind.getLifecycleCallbackMethodName()) &&
                                m.getParameterTypes().length == 0 &&
                                m.getReturnType() == java.lang.Void.TYPE) // d404960
                            {
                                InterceptorProxy proxy = proxies.get(kind);
                                if (proxy == null)
                                {
                                    addInterceptorProxy(kind, m, index, proxies, proxyMap);
                                }
                                else if (!m.equals(proxy.ivInterceptorMethod)) // d453498
                                {
                                    // CNTR0223E: Only one method in the {0} class is allowed to be a {1} interceptor method.
                                    String className = superClass.getName();
                                    Object[] data = new Object[] { className, kind.getXMLElementName() };
                                    Tr.error(tc, "DUPLICATE_INTERCEPTOR_METHOD_CNTR0223E", data);
                                    throw new EJBConfigurationException("Only one post-construct interceptor method is " +
                                                                        "allowed for class " + className + ". Both " +
                                                                        proxy.ivInterceptorMethod.getName() +
                                                                        " and " + m.getName() +
                                                                        " are configured as post-construct methods.");
                                }
                            }
                        }
                    }
                }
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
        {
            Tr.exit(tc, "createInterceptorProxyMap");
        }

        return proxyMap;
    }
253100
@SuppressWarnings("unused")
    public Callable<?> handle(Object instance, Method origin, Object[] arguments) throws Throwable {
        InvocationHandlerAdapter interceptor = interceptors.get(instance);
        if (interceptor == null) {
            return null;
        }

        return new ReturnValueWrapper(interceptor.interceptEntryHook(instance, origin, arguments,
                new SuperMethodCall(selfCallInfo, origin, instance, arguments)));
    }
1160266
public Observable<InputStream> downloadQueryLogsAsync(UUID appId) {
        return downloadQueryLogsWithServiceResponseAsync(appId).map(new Func1<ServiceResponse<InputStream>, InputStream>() {
            @Override
            public InputStream call(ServiceResponse<InputStream> response) {
                return response.body();
            }
        });
    }
1030291
public static <T> T invokeMethodByName(final Object obj, final String methodName, final Object[] args) {
		Method method = getAccessibleMethodByName(obj.getClass(), methodName);
		if (method == null) {
			throw new IllegalArgumentException(
					"Could not find method [" + methodName + "] on class [" + obj.getClass() + ']');
		}
		return invokeMethod(obj, method, args);
	}