Add Java annotation to code blocks in README files

This commit is contained in:
Wes Gilleland
2018-03-28 01:35:43 -04:00
parent 6879990857
commit 86ee59c232
13 changed files with 49 additions and 45 deletions

View File

@ -34,7 +34,7 @@ Wikipedia says
Taking our wizard tower example from above. Firstly we have the wizard tower interface and the ivory tower class
```
```java
public interface WizardTower {
void enter(Wizard wizard);
@ -53,7 +53,7 @@ public class IvoryTower implements WizardTower {
Then a simple wizard class
```
```java
public class Wizard {
private final String name;
@ -71,7 +71,7 @@ public class Wizard {
Then we have the proxy to add access control to wizard tower
```
```java
public class WizardTowerProxy implements WizardTower {
private static final Logger LOGGER = LoggerFactory.getLogger(WizardTowerProxy.class);
@ -100,7 +100,7 @@ public class WizardTowerProxy implements WizardTower {
And here is tower entering scenario
```
```java
WizardTowerProxy proxy = new WizardTowerProxy(new IvoryTower());
proxy.enter(new Wizard("Red wizard")); // Red wizard enters the tower.
proxy.enter(new Wizard("White wizard")); // White wizard enters the tower.