Static Factory Methods - Effective Java, Item 1
Автор: nipafx
Загружено: 2018-09-23
Просмотров: 6166
Описание:
Static factory methods are awesome! They allow us to overcome three shortcomings of constructors by allowing us to freely choose a name, take control over returned instances, and take control over the returned type. I use them every day.
Also, I'm actually sorry about all the "actuallies". 😉
Table of contents:
00:00 What's wrong with constructors?
01:14 Quick introduction to static factory methods
01:28 Named constructors
02:23 Instance control
04:16 └ Immutability and documentation
05:15 └ Value-based classes
06:02 Type control
07:57 Where to put static factory methods?
08:22 Discoverability
10:07 Make constructor inaccessible
11:03 Refactoring to static factory methods
12:33 Not the factory patterns!
13:53 Summary
Repository with examples: https://github.com/CodeFX-org/effecti...
BED-Con in Berlin: http://www.bed-con.org/
Twitter-poll: / 1037310344585261056
§1 GG: / 1038376068728676353
Value-based classes: https://blog.codefx.org/java/value-ba...
Comment your &*☠# Code: https://blog.codefx.org/techniques/do...
Nicolai:
home: http://codefx.org
online Java courses: http://courses.codefx.org
on Twitter: / nipafx
Affiliate links for Effective Java, Third Edition:
InformIT (the publisher): http://tiny.cc/effective-java-3rd
Amazon USA: https://amzn.to/2QI0D0S
Amazon Germany: https://amzn.to/2OvsWOu
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: