Java 类retrofit.http.RestMethod 实例源码

项目:android-bulking    文件:ResolvedSignatureRequest.java   
private RequestSignatureResolver prepareRequestSignatureResolver(Method requestInterface)
        throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
    for (Annotation annotation : requestInterface.getAnnotations()) {
        for (Class<?> declaredInterface : annotation.getClass().getInterfaces()) {
            for (Annotation metaAnnotation : declaredInterface.getAnnotations()) {
                for (Class<?> declaredMetaInterface : metaAnnotation.getClass().getInterfaces()) {
                    if (declaredMetaInterface == RestMethod.class) {
                        return new RequestSignatureResolver(declaredInterface, annotation);
                    }
                }
            }
        }
    }
    throw new NoSuchMethodException();
}