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.Formatter
Used for naming attachment file names and the main subject line.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
The value used as the output.
-
Constructor Summary
Constructors Modifier Constructor Description private
TailNameFormatter(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 boolean
equals(java.lang.Object o)
Equals method.java.lang.String
format(java.util.logging.LogRecord record)
java.lang.String
getTail(java.util.logging.Handler h)
int
hashCode()
Hash code method.(package private) static java.util.logging.Formatter
of(java.lang.String name)
Creates or gets a formatter from the given name.java.lang.String
toString()
-
-
-
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:
format
in classjava.util.logging.Formatter
-
getTail
public final java.lang.String getTail(java.util.logging.Handler h)
- Overrides:
getTail
in classjava.util.logging.Formatter
-
equals
public final boolean equals(java.lang.Object o)
Equals method.- Overrides:
equals
in 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:
hashCode
in classjava.lang.Object
- Returns:
- the hash code.
- Since:
- JavaMail 1.4.4
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-