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