DomainPostmasterRecipientAST domainPostmasterRecipientAST =
(DomainPostmasterRecipientAST) recipientAST;
DomainPostmasterSpecification domainPostmaster =
new DomainPostmasterSpecification();
RemotePart remotePart =
mailAddressFactory
.createRemotePartFromAST(domainPostmasterRecipientAST.mailboxAST.remotePartAST);
domainPostmaster.setRemotePart(remotePart);
return domainPostmaster;
} else if (recipientAST instanceof MailboxRecipientAST) {
MailboxRecipientAST mailboxRecipientAST = (MailboxRecipientAST) recipientAST;
LocalPartSpecification localPart =
new CaseInsensitiveLocalPartSpecification(
mailboxRecipientAST.pathAST.mailboxAST.localPartAST.spelling);
RemotePart remotePart =
mailAddressFactory
.createRemotePartFromAST(mailboxRecipientAST.pathAST.mailboxAST.remotePartAST);
return new LocalRemoteCombinedRecipientSpecification(localPart,
remotePart);
} else {