javax.mail
Class Message.RecipientType
java.lang.Object
javax.mail.Message.RecipientType
- Message
- Serializable
public static class Message.RecipientType
extends java.lang.Object
implements Serializable
This inner class defines the types of recipients allowed by the
Message class.
The currently defined types are TO, CC and BCC.
Note that this class only has a protected constructor,
thereby restricting new Recipient types to either this class or
subclasses. This effectively implements an enumeration of the allowed
Recipient types. The following code sample shows how to use this class
to obtain the "TO" recipients from a message.
protected Object | readResolve() - When deserializing a RecipientType, we need to make sure to return
only one of the known static final instances defined in this class.
|
type
protected String type
The type of recipient, usually the name of a corresponding Internet
standard header.
RecipientType
protected RecipientType(String type)
Constructor for use by subclasses.
readResolve
protected Object readResolve()
throws ObjectStreamException
When deserializing a RecipientType, we need to make sure to return
only one of the known static final instances defined in this class.
Subclasses must implement their own readResolve method that checks
for their known instances before calling this super method.