-
-
Notifications
You must be signed in to change notification settings - Fork 27k
#567 Marker Interface pull request #572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
marker/README.md
Outdated
Use the Marker Interface pattern when | ||
|
||
* you want to identify the special objects from normal objects | ||
* define a type that is implemented by instances of the marked class, marker annotations can not do that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clarify this sentence
marker/README.md
Outdated
## Real world examples | ||
|
||
* [javase.7.docs.api.java.io.Serializable](https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html) | ||
* [javase.7.docs.api.java.lang.Cloneable](https://docs.oracle.com/javase/7/docs/api/java/lang/Cloneable.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please point to Java 8 docs
marker/pom.xml
Outdated
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<version>RELEASE</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason why you use JUnit 5 instead of 4? The rest of the project still uses 4. There is an issue #408 about moving to JUnit 5.
marker/src/main/java/Guard.java
Outdated
@@ -0,0 +1,10 @@ | |||
/** | |||
* Created by Alexis on 29-Apr-17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add proper JavaDoc instead of creator
marker/src/main/java/Thief.java
Outdated
@@ -0,0 +1,12 @@ | |||
/** | |||
* Created by Alexis on 02-May-17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add proper JavaDoc instead of creator
marker/src/main/java/App.java
Outdated
if (guard instanceof Permission) { | ||
guard.enter(); | ||
} else { | ||
System.out.println("You have no permission to enter, please leave this area"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use logging framework instead of printing to System.out
. See issue #502
@4lexis you have my review comments. Please notify when you've made the changes. |
@iluwatar Here, I made requested changes. |
Good work @4lexis thank you for the pattern contribution! 👍 |
@all-contributors please add @4lexis for code |
I've put up a pull request to add @4lexis! 🎉 |
Pull request for marker interface pattern #567