> > On Thursday, July 12, 2012 2:34:00 AM UTC+2, Marius Kruger wrote:
> >> B) Lombok must automagically cast to whatever subclass the result is
> >> assigned to:
> >> but then I think you can't mix them around so this is probably a bad
> >> idea.
Why, what is wrong with this? (taken from an actual project)
public <T extends BaseResponse> T setResponseStatus(final EzResponseCode status) {
responseStatus = status;
@SuppressWarnings("unchecked") final T that = (T) this;
return that;
}
This has worked for me so far…
bye,
//mirabilos
--
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn •
http://www.tarent.de/
Tel:
+49 228 54881-393 • Fax:
+49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
*************************************************
Mit unserem Consulting bieten wir Unternehmen maßgeschneiderte Angebote in
Form von Beratung, Trainings sowie Workshops in den Bereichen
Softwaretechnologie, IT Strategie und Architektur, Innovation und Umsetzung
sowie Agile Organisation.
Besuchen Sie uns auf
https://www.tarent.de/consulting .
Wir freuen uns auf Ihren Kontakt.
*************************************************