code: public static <T> MethodLiteral<T, Method> get(Method method, TypeLiteral<T> declaringType) {
      Preconditions.checkArgument(method.getDeclaringClass().equals(declaringType.getRawType()),
          "declaringType (%s) must be the type literal where method was declared (%s)!",
          declaringType, method.getDeclaringClass());
      return new ConcreteMethodLiteral<T>(method, declaringType);
    }
docs: Creates a new {@code MethodLiteral} based on the passed method and its
  declaring type.
  
  @param method method for which the literal is constructed
  @param declaringType type declaring the passed method
  @return new method literal