Archiv für den Tag: 2010-12-25

I’m just wri­ting so­me Ja­va code and for the thousand-and-first time the­re is so­me­thing li­ke pu­blic vo­id someMethod(AnyType a) {  if (a in­s­tan­ce­of De­ri­va­teOfAny­Ty­pe) {   De­ri­va­teOfAny­Ty­pe d=(DerivateOfAnyType)a;   d.someMethodOfDerivate();  } } Even though the­se-days Ja­va has Ge­ne­rics, An­no­ta­ti­ons and that other cool stuff, you still have need for such casts, and […]

Au­to­cas­ting in Ja­va – An ap­proach