@SuppressWarnings("PMD.EmptyCatchBlock") public static Integer getMethodOrder(Method method) { ThriftOrder order = method.getAnnotation(ThriftOrder.class); if (order == null) { try { Class<?> swiftDocsClass = getSwiftMetaClassOf(method.getDeclaringClass()); order = swiftDocsClass.getDeclaredMethod(method.getName()).getAnnotation(ThriftOrder.class); } catch (ReflectiveOperationException e) { // ignored } } return order == null ? null : order.value(); }
@SuppressWarnings("PMD.EmptyCatchBlock") public static ImmutableList<String> getThriftDocumentation(Class<?> objectClass) { ThriftDocumentation documentation = objectClass.getAnnotation(ThriftDocumentation.class); if (documentation == null) { try { Class<?> swiftDocsClass = getSwiftMetaClassOf(objectClass); documentation = swiftDocsClass.getAnnotation(ThriftDocumentation.class); } catch (ClassNotFoundException e) { // ignored } } return documentation == null ? ImmutableList.<String>of() : ImmutableList.copyOf(documentation.value()); }
@SuppressWarnings("PMD.EmptyCatchBlock") public static Integer getMethodOrder(Method method) { ThriftOrder order = method.getAnnotation(ThriftOrder.class); if (order == null) { try { Class<?> swiftDocsClass = getSwiftMetaClassOf(method.getDeclaringClass()); order = swiftDocsClass.getDeclaredMethod(method.getName()).getAnnotation(ThriftOrder.class); } catch (ReflectiveOperationException e) { // ignored } } return order == null ? null : order.value(); }
@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()); }
@SuppressWarnings("PMD.EmptyCatchBlock") public static ImmutableList<String> getThriftDocumentation(Field field) { ThriftDocumentation documentation = field.getAnnotation(ThriftDocumentation.class); if (documentation == null) { try { Class<?> swiftDocsClass = getSwiftMetaClassOf(field.getDeclaringClass()); documentation = swiftDocsClass.getDeclaredField(field.getName()).getAnnotation(ThriftDocumentation.class); } catch (ReflectiveOperationException e) { // ignored } } return documentation == null ? ImmutableList.<String>of() : ImmutableList.copyOf(documentation.value()); }
@SuppressWarnings("PMD.EmptyCatchBlock") public static ImmutableList<String> getThriftDocumentation(Class<?> objectClass) { ThriftDocumentation documentation = objectClass.getAnnotation(ThriftDocumentation.class); if (documentation == null) { try { Class<?> swiftDocsClass = getSwiftMetaClassOf(objectClass); documentation = swiftDocsClass.getAnnotation(ThriftDocumentation.class); } catch (ClassNotFoundException e) { // ignored } } return documentation == null ? ImmutableList.<String>of() : ImmutableList.copyOf(documentation.value()); }
@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()); }
@SuppressWarnings("PMD.EmptyCatchBlock") public static ImmutableList<String> getThriftDocumentation(Field field) { ThriftDocumentation documentation = field.getAnnotation(ThriftDocumentation.class); if (documentation == null) { try { Class<?> swiftDocsClass = getSwiftMetaClassOf(field.getDeclaringClass()); documentation = swiftDocsClass.getDeclaredField(field.getName()).getAnnotation(ThriftDocumentation.class); } catch (ReflectiveOperationException e) { // ignored } } return documentation == null ? ImmutableList.<String>of() : ImmutableList.copyOf(documentation.value()); }