本文介绍了ToStringBuilder.reflectionToString(Object)以什么格式显示日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ToStringBuilder.reflectionToString(Object) 显示日期?根据 Apache Commons Lang 2.4文档ToStringBuilder.reflectionToString(Object)委托 ReflectionToStringBuilder.toString(Object) ,它通过反射使用默认的ToStringStyle生成toString值".因此,默认 ToStringStyle 显示日期?

In what format does ToStringBuilder.reflectionToString(Object) display dates? According to the Apache Commons Lang 2.4 documentation, ToStringBuilder.reflectionToString(Object) delegates to ReflectionToStringBuilder.toString(Object) which "Builds a toString value using the default ToStringStyle through reflection." So, in what format does the default ToStringStyle display dates?

推荐答案

DefaultToStringStyle 只是ToStringStyle的不可变子类,因此它依赖于处理. ToStringStyle对日期没有任何特殊处理,因此仅使用DatetoString.

DefaultToStringStyle is just an immutable subclass of ToStringStyle, so it falls back on that for handling. ToStringStyle does not have any special handling for dates, so it just uses Date's toString.

但是,实际上有一个添加示例.

这篇关于ToStringBuilder.reflectionToString(Object)以什么格式显示日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 22:39