/**
* Recursively builds a map from method_names to methods. Method types will be resolved as much
* as possible using {@code serviceType}.
*
* @param serviceType is the class object being inspected for service methods
*/
private void buildServiceMethods(
ImmutableListMultimap.Builder<EndpointMethod.ResolvedSignature, EndpointMethod> builder,
TypeToken<?> serviceType) {
for (TypeToken<?> typeToken : serviceType.getTypes().classes()) {
Class<?> serviceClass = typeToken.getRawType();
if (Object.class.equals(serviceClass)) {
return;
}
for (Method method : serviceClass.getDeclaredMethods()) {
if (!isServiceMethod(method)) {
continue;
}
EndpointMethod currentMethod = EndpointMethod.create(endpointClass, method, typeToken);
builder.put(currentMethod.getResolvedMethodSignature(), currentMethod);
}
}
}
MethodHierarchyReader.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:endpoints-java
作者:
评论列表
文章目录