Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   General Discussion (http://siteownersforums.com/forumdisplay.php?f=2)
-   -   Examples of GoF Design Patterns in Java's core libraries? (http://siteownersforums.com/showthread.php?t=280844)

palashmohane 05-11-2018 09:32 PM

Examples of GoF Design Patterns in Java's core libraries?
 
Abstract factory (recognizeable by creational methods returning the factory itself which in turn can be used to create another abstract/interface type)

javax.xml.parsers.DocumentBuilderFactory#newInstan ce()
javax.xml.transform.TransformerFactory#newInstance ()
javax.xml.xpath.XPathFactory#newInstance()
Builder (recognizeable by creational methods returning the instance itself)
java.lang.StringBuilder#append() (unsynchronized)
java.lang.StringBuffer#append() (synchronized)
java.nio.ByteBuffer#put() (also on CharBuffer, ShortBuffer, IntBuffer, LongBuffer, FloatBuffer and DoubleBuffer)
javax.swing.GroupLayout.Group#addComponent()
All implementations of java.lang.Appendable
java.util.stream.Stream.Builder
Factory method (recognizeable by creational methods returning an implementation of an abstract/interface type)

for more info on this topic visit. w3tech JAVA programming sector.


All times are GMT -7. The time now is 06:44 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.