Learn Design Pattern Code in Java.
- Creational Patterns
- Structural Patters
- Behavoral Patters
Command run code:
mvn compile # Need re-compile code after update code.
mvn exec:java -Pfactory-method # factory-method profile was defined in pom.xml.
# Also combine 2 command lines to 1 line
mvn compile && mvn exec:java -Pfactory-method
Command run code:
mvn compile && mvn exec:java -Pabstract-factory
Command run code:
mvn compile && mvn exec:java -Pbuilder
Command run code:
mvn compile && mvn exec:java -Pprototype
Command run code:
mvn compile && mvn exec:java -Padapter
Command run code:
mvn compile && mvn exec:java -Pbridge
Command run code:
mvn compile && mvn exec:java -Pcompositor
Command run code:
mvn compile && mvn exec:java -Pdecorator
Command run code:
mvn compile && mvn exec:java -Pfacade