chore(hw-03): initialize gradle java project with design patterns structure
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
set BASE app/src/main/java/org/example
|
||||
|
||||
# Создание директорий
|
||||
mkdir -p $BASE/{strategy,chain,builder,proxy,decorator,adapter}
|
||||
|
||||
# Strategy
|
||||
touch $BASE/strategy/Strategy.java
|
||||
touch $BASE/strategy/ConcreteStrategyA.java
|
||||
touch $BASE/strategy/ConcreteStrategyB.java
|
||||
touch $BASE/strategy/Context.java
|
||||
|
||||
# Chain of Responsibility
|
||||
touch $BASE/chain/Handler.java
|
||||
touch $BASE/chain/AbstractHandler.java
|
||||
touch $BASE/chain/ConcreteHandlerA.java
|
||||
touch $BASE/chain/ConcreteHandlerB.java
|
||||
|
||||
# Builder
|
||||
touch $BASE/builder/Product.java
|
||||
touch $BASE/builder/ProductBuilder.java
|
||||
|
||||
# Proxy
|
||||
touch $BASE/proxy/Service.java
|
||||
touch $BASE/proxy/RealService.java
|
||||
touch $BASE/proxy/ServiceProxy.java
|
||||
|
||||
# Decorator
|
||||
touch $BASE/decorator/Component.java
|
||||
touch $BASE/decorator/ConcreteComponent.java
|
||||
touch $BASE/decorator/Decorator.java
|
||||
touch $BASE/decorator/ConcreteDecorator.java
|
||||
|
||||
# Adapter
|
||||
touch $BASE/adapter/Target.java
|
||||
touch $BASE/adapter/Adaptee.java
|
||||
touch $BASE/adapter/Adapter.java
|
||||
|
||||
echo "Java pattern files created successfully!"
|
||||
Reference in New Issue
Block a user