actually, in my case the operations are like that:
class A {
processPdfAttachment(PdfAttachment obj) { ... }
processFlashAttachment(FlashAttachment obj) { ... }
processGifAttachment(GifAttachment obj) { ... }
processHtmlAttachment(HtmlAttachment obj) { ... }
}
all these "attachments types" are subclasses of the AbstractAttachment.....
the idea was:
class A {
processAttachment(Attachment<T> obj) { ... }
}