Package com.sun.mail.util.logging
Class MailHandler.TailNameFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- com.sun.mail.util.logging.MailHandler.TailNameFormatter
-
- Enclosing class:
- MailHandler
private static final class MailHandler.TailNameFormatter extends java.util.logging.FormatterUsed for naming attachment file names and the main subject line.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringnameThe value used as the output.
-
Constructor Summary
Constructors Modifier Constructor Description privateTailNameFormatter(java.lang.String name)Use the factory method instead of this constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Equals method.java.lang.Stringformat(java.util.logging.LogRecord record)java.lang.StringgetTail(java.util.logging.Handler h)inthashCode()Hash code method.(package private) static java.util.logging.Formatterof(java.lang.String name)Creates or gets a formatter from the given name.java.lang.StringtoString()
-
-
-
Method Detail
-
of
static java.util.logging.Formatter of(java.lang.String name)
Creates or gets a formatter from the given name. This method is used so class verification of assignments in MailHandler doesn't require loading this class which otherwise can occur when using the constructor. Default access to avoid generating extra class files.- Parameters:
name- any not null string.- Returns:
- a formatter for that string.
- Since:
- JavaMail 1.5.6
-
format
public final java.lang.String format(java.util.logging.LogRecord record)
- Specified by:
formatin classjava.util.logging.Formatter
-
getTail
public final java.lang.String getTail(java.util.logging.Handler h)
- Overrides:
getTailin classjava.util.logging.Formatter
-
equals
public final boolean equals(java.lang.Object o)
Equals method.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the other object.- Returns:
- true if equal
- Since:
- JavaMail 1.4.4
-
hashCode
public final int hashCode()
Hash code method.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash code.
- Since:
- JavaMail 1.4.4
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-