}
@SuppressWarnings("PMD.EmptyCatchBlock")
public static ImmutableList<String> getThriftDocumentation(Method method)
{
ThriftDocumentation documentation = method.getAnnotation(ThriftDocumentation.class);
if (documentation == null) {
try {
Class<?> swiftDocsClass = getSwiftMetaClassOf(method.getDeclaringClass());
documentation = swiftDocsClass.getDeclaredMethod(method.getName()).getAnnotation(ThriftDocumentation.class);
}
catch (ReflectiveOperationException e) {
// ignored
}
}
return documentation == null ? ImmutableList.<String>of() : ImmutableList.copyOf(documentation.value());
}