类 LocalDateTimeParser
- java.lang.Object
- org.springframework.format.datetime.joda.LocalDateTimeParser
- 所有已实现的接口:
Parser<LocalDateTime>
public final class LocalDateTimeParser extends Object implements Parser<LocalDateTime>
Parses JodaLocalDateTimeinstances using aDateTimeFormatter.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
构造器概要
构造器 构造器 说明 LocalDateTimeParser(DateTimeFormatter formatter)Create a new DateTimeParser.
构造器详细资料
LocalDateTimeParser
public LocalDateTimeParser(DateTimeFormatter formatter)
Create a new DateTimeParser.- 参数:
formatter- the Joda DateTimeFormatter instance
方法详细资料
parse
public LocalDateTime parse(String text, Locale locale) throws ParseException
从接口复制的说明:ParserParse a text String to produce a T.- 指定者:
parse在接口中Parser<LocalDateTime>- 参数:
text- the text stringlocale- the current user locale- 返回:
- an instance of T
- 抛出:
ParseException- when a parse exception occurs in a java.text parsing library