class_body
{ "{"
line_comment "// A lot of the speed in this class comes from caching, but "...
line_comment "// from the special int to StringBuffer conversion."
line_comment "//"
line_comment "// The following produces a padded 2 digit number:"
line_comment "// buffer.append((char)(value / 10 + '0'));"
line_comment "// buffer.append((char)(value % 10 + '0'));"
line_comment "//"
line_comment "// Note that the fastest append to StringBuffer is a single "...
line_comment "// Note that Integer.toString() is not called, the conversio"...
line_comment "// taking the value and adding (mathematically) the ASCII va"...
line_comment "// So, don't change this code! It works and is very fast."
block_comment "/**\n * Required for serialization support.\n * \n "...
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
block_comment "/**\n * FULL locale dependent date or time style.\n */"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FULL"
= "="
field_access
identifier "DateFormat"
. "."
identifier "FULL"
; ";"
block_comment "/**\n * LONG locale dependent date or time style.\n */"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "LONG"
= "="
field_access
identifier "DateFormat"
. "."
identifier "LONG"
; ";"
block_comment "/**\n * MEDIUM locale dependent date or time style.\n "...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "MEDIUM"
= "="
field_access
identifier "DateFormat"
. "."
identifier "MEDIUM"
; ";"
block_comment "/**\n * SHORT locale dependent date or time style.\n *"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "SHORT"
= "="
field_access
identifier "DateFormat"
. "."
identifier "SHORT"
; ";"
line_comment "//@GuardedBy(\"this\")"
field_declaration
modifiers
private "private"
static "static"
type_identifier "String"
variable_declarator
identifier "cDefaultPattern"
; ";"
line_comment "// lazily initialised by getInstance()"
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
block_comment "/**\n * The pattern.\n */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "String"
variable_declarator
identifier "mPattern"
; ";"
block_comment "/**\n * The time zone.\n */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "TimeZone"
variable_declarator
identifier "mTimeZone"
; ";"
block_comment "/**\n * Whether the time zone overrides any on Calendars."...
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "mTimeZoneForced"
; ";"
block_comment "/**\n * The locale.\n */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Locale"
variable_declarator
identifier "mLocale"
; ";"
block_comment "/**\n * Whether the locale overrides the default.\n */"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "mLocaleForced"
; ";"
block_comment "/**\n * The parsed rules.\n */"
field_declaration
modifiers
private "private"
transient "transient"
array_type
type_identifier "Rule"
dimensions
[ "["
] "]"
variable_declarator
identifier "mRules"
; ";"
block_comment "/**\n * The estimated maximum length.\n */"
field_declaration
modifiers
private "private"
transient "transient"
integral_type
int "int"
variable_declarator
identifier "mMaxLengthEstimate"
; ";"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets a formatter instance using the default pa"...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * <p>Gets a formatter instance using the specified "...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * <p>Gets a formatter instance using the specified "...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Gets a formatter instance using the specified "...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Gets a formatter instance using the specified "...
method_declaration (+100 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets a date formatter instance using the speci"...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * <p>Gets a date formatter instance using the speci"...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * <p>Gets a date formatter instance using the speci"...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * <p>Gets a date formatter instance using the speci"...
method_declaration (+225 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets a time formatter instance using the speci"...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * <p>Gets a time formatter instance using the speci"...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * <p>Gets a time formatter instance using the speci"...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * <p>Gets a time formatter instance using the speci"...
method_declaration (+237 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets a date/time formatter instance using the "...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>Gets a date/time formatter instance using the "...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * <p>Gets a date/time formatter instance using the "...
method_declaration (+40 nodes collapsed)
block_comment "/**\n * <p>Gets a date/time formatter instance using the "...
method_declaration (+247 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets the time zone display name, using a cache"...
method_declaration (+107 nodes collapsed)
block_comment "/**\n * <p>Gets the default pattern.</p>\n * \n * @"...
method_declaration (+46 nodes collapsed)
line_comment "// Constructor"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Constructs a new FastDateFormat.</p>\n * \n "...
constructor_declaration (+142 nodes collapsed)
block_comment "/**\n * <p>Initializes the instance for first use.</p>\n "...
method_declaration (+107 nodes collapsed)
line_comment "// Parse the pattern"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Returns a list of Rules given a pattern.</p>\n "...
method_declaration (+1072 nodes collapsed)
block_comment "/**\n * <p>Performs the parsing of tokens.</p>\n * \n "...
method_declaration (+388 nodes collapsed)
block_comment "/**\n * <p>Gets an appropriate rule for the padding requi"...
method_declaration (+75 nodes collapsed)
line_comment "// Format methods"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Formats a <code>Date</code>, <code>Calendar</c"...
method_declaration (+163 nodes collapsed)
block_comment "/**\n * <p>Formats a millisecond <code>long</code> value."...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * <p>Formats a <code>Date</code> object.</p>\n *"...
method_declaration (+60 nodes collapsed)
block_comment "/**\n * <p>Formats a <code>Calendar</code> object.</p>\n "...
method_declaration (+37 nodes collapsed)
block_comment "/**\n * <p>Formats a milliseond <code>long</code> value i"...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * <p>Formats a <code>Date</code> object into the\n "...
method_declaration (+52 nodes collapsed)
block_comment "/**\n * <p>Formats a <code>Calendar</code> object into th"...
method_declaration
modifiers
public "public"
type_identifier "StringBuffer"
identifier "format"
formal_parameters
( "("
formal_parameter
type_identifier "Calendar"
identifier "calendar"
, ","
formal_parameter
type_identifier "StringBuffer"
identifier "buf"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
identifier "mTimeZoneForced"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "calendar"
= "="
cast_expression
( "("
type_identifier "Calendar"
) ")"
method_invocation
identifier "calendar"
. "."
identifier "clone"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "calendar"
. "."
identifier "setTimeZone"
argument_list
( "("
identifier "mTimeZone"
) ")"
; ";"
} "}"
return_statement
return "return"
method_invocation
identifier "applyRules"
argument_list
( "("
identifier "calendar"
, ","
identifier "buf"
) ")"
; ";"
} "}"
block_comment "/**\n * <p>Performs the formatting by applying the rules "...
method_declaration (+83 nodes collapsed)
line_comment "// Parsing"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Parsing is not supported.</p>\n * \n * @"...
method_declaration (+45 nodes collapsed)
line_comment "// Accessors"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets the pattern used by this formatter.</p>\n "...
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getPattern"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mPattern"
; ";"
} "}"
block_comment "/**\n * <p>Gets the time zone used by this formatter.</p>"...
method_declaration
modifiers
public "public"
type_identifier "TimeZone"
identifier "getTimeZone"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mTimeZone"
; ";"
} "}"
block_comment "/**\n * <p>Returns <code>true</code> if the time zone of "...
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "getTimeZoneOverridesCalendar"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mTimeZoneForced"
; ";"
} "}"
block_comment "/**\n * <p>Gets the locale used by this formatter.</p>\n "...
method_declaration
modifiers
public "public"
type_identifier "Locale"
identifier "getLocale"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mLocale"
; ";"
} "}"
block_comment "/**\n * <p>Gets an estimate for the maximum string length"...
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMaxLengthEstimate"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mMaxLengthEstimate"
; ";"
} "}"
line_comment "// Basics"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Compares two objects for equality.</p>\n * "...
method_declaration (+160 nodes collapsed)
block_comment "/**\n * <p>Returns a hashcode compatible with equals.</p>"...
method_declaration (+91 nodes collapsed)
block_comment "/**\n * <p>Gets a debugging string version of this format"...
method_declaration (+30 nodes collapsed)
line_comment "// Serializing"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * Create the object after serialization. This imple"...
method_declaration (+35 nodes collapsed)
line_comment "// Rules"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Inner class defining a rule.</p>\n */"
interface_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Inner class defining a numeric rule.</p>\n "...
interface_declaration (+28 nodes collapsed)
block_comment "/**\n * <p>Inner class to output a constant single charac"...
class_declaration (+87 nodes collapsed)
block_comment "/**\n * <p>Inner class to output a constant string.</p>\n "...
class_declaration (+91 nodes collapsed)
block_comment "/**\n * <p>Inner class to output one of a set of values.<"...
class_declaration (+193 nodes collapsed)
block_comment "/**\n * <p>Inner class to output an unpadded number.</p>\n"...
class_declaration (+230 nodes collapsed)
block_comment "/**\n * <p>Inner class to output an unpadded month.</p>\n "...
class_declaration (+208 nodes collapsed)
block_comment "/**\n * <p>Inner class to output a padded number.</p>\n "...
class_declaration (+371 nodes collapsed)
block_comment "/**\n * <p>Inner class to output a two digit number.</p>\n"...
class_declaration (+196 nodes collapsed)
block_comment "/**\n * <p>Inner class to output a two digit year.</p>\n "...
class_declaration (+171 nodes collapsed)
block_comment "/**\n * <p>Inner class to output a two digit month.</p>\n "...
class_declaration (+171 nodes collapsed)
block_comment "/**\n * <p>Inner class to output the twelve hour field.</"...
class_declaration (+174 nodes collapsed)
block_comment "/**\n * <p>Inner class to output the twenty four hour fie"...
class_declaration (+174 nodes collapsed)
block_comment "/**\n * <p>Inner class to output a time zone name.</p>\n "...
class_declaration (+422 nodes collapsed)
block_comment "/**\n * <p>Inner class to output a time zone as a number "...
class_declaration (+339 nodes collapsed)
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Inner class that acts as a compound key for ti"...
class_declaration (+221 nodes collapsed)
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Helper class for creating compound objects.</p"...
class_declaration (+273 nodes collapsed)
} "}"