List of usage examples for com.google.common.reflect Invokable getDeclaringClass
@SuppressWarnings("unchecked") @Override public final Class<? super T> getDeclaringClass()
From source file:org.jclouds.rest.config.SyncToAsyncHttpInvocationModule.java
/** * In JDK7 Closeable.close is declared in AutoCloseable, which throws * Exception vs IOException, so we have to be more lenient about exception * type declarations.// w w w . j a v a 2 s. co m * * <h4>note</h4> * * This will be refactored out when we delete Async code in jclouds 1.7. */ private static boolean isCloseable(Invokable<?, ?> delegatedMethod) { return "close".equals(delegatedMethod.getName()) && Closeable.class.isAssignableFrom(delegatedMethod.getDeclaringClass()); }