guava/src/com/google/common/reflect/TypeToken.java
public final Invokable<T, Object> method(Method method) {
    checkArgument(
        this.someRawTypeIsSubclassOf(method.getDeclaringClass()),
        "%s not declared by %s",
        method,
        this);
    return new Invokable.MethodInvokable<T>(method) {
      @Override
      Type getGenericReturnType() {
        return getCovariantTypeResolver().resolveType(super.getGenericReturnType());
      }

      @Override
      Type[] getGenericParameterTypes() {
        return getInvariantTypeResolver().resolveTypesInPlace(super.getGenericParameterTypes());
      }

      @Override
      Type[] getGenericExceptionTypes() {
        return getCovariantTypeResolver().resolveTypesInPlace(super.getGenericExceptionTypes());
      }

      @Override
      public TypeToken<T> getOwnerType() {
        return TypeToken.this;
      }

      @Override
      public String toString() {
        return getOwnerType() + "." + super.toString();
      }
    };
  }
public final Invokable<T, Object> method(Method method) {
    checkArgument(
        this.someRawTypeIsSubclassOf(method.getDeclaringClass()),
        "%s not declared by %s",
        method,
        this);
    return new Invokable.MethodInvokable<T>(method) {
      @Override
      Type getGenericReturnType() {
        return getCovariantTypeResolver().resolveType(super.getGenericReturnType());
      }

      @Override
      Type[] getGenericParameterTypes() {
        return getInvariantTypeResolver().resolveTypesInPlace(super.getGenericParameterTypes());
      }

      @Override
      Type[] getGenericExceptionTypes() {
        return getCovariantTypeResolver().resolveTypesInPlace(super.getGenericExceptionTypes());
      }

      @Override
      public TypeToken<T> getOwnerType() {
        return TypeToken.this;
      }

      @Override
      public String toString() {
        return getOwnerType() + "." + super.toString();
      }
    };
  }
public final Invokable < T , Object > method ( Method method ) { checkArgument ( this . someRawTypeIsSubclassOf ( method . getDeclaringClass ( ) ) , "%s not declared by %s" , method , this ) ; return new Invokable . MethodInvokable < T > ( method ) { @ Override Type getGenericReturnType ( ) { return getCovariantTypeResolver ( ) . resolveType ( super . getGenericReturnType ( ) ) ; } @ Override Type [ ] getGenericParameterTypes ( ) { return getInvariantTypeResolver ( ) . resolveTypesInPlace ( super . getGenericParameterTypes ( ) ) ; } @ Override Type [ ] getGenericExceptionTypes ( ) { return getCovariantTypeResolver ( ) . resolveTypesInPlace ( super . getGenericExceptionTypes ( ) ) ; } @ Override public TypeToken < T > getOwnerType ( ) { return TypeToken . this ; } @ Override public String toString ( ) { return getOwnerType ( ) + "." + super . toString ( ) ; } } ; }
Returns the {@link Invokable} for {@code method}, which must be a member of {@code T}.

@since 14.0
Returns the { @link Invokable } for { @code method } which must be a member of { @code T } .