Skip to content
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

Resolves checkstyle errors for remaining m #1090

Merged
merged 12 commits into from
Nov 16, 2019
Merged
Next Next commit
Reduces checkstyle errors in marker
  • Loading branch information
anuragagarwal561994 committed Nov 15, 2019
commit 1c0f8baa10237044144085f75712575fefe4fff6
30 changes: 13 additions & 17 deletions marker/src/main/java/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,23 @@
import org.slf4j.LoggerFactory;

/**
* Created by Alexis on 28-Apr-17.
* With Marker interface idea is to make empty interface and extend it.
* Basically it is just to identify the special objects from normal objects.
* Like in case of serialization , objects that need to be serialized must implement serializable interface
* (it is empty interface) and down the line writeObject() method must be checking
* if it is a instance of serializable or not.
* <p>
* Marker interface vs annotation
* Marker interfaces and marker annotations both have their uses,
* neither of them is obsolete or always better then the other one.
* If you want to define a type that does not have any new methods associated with it,
* a marker interface is the way to go.
* If you want to mark program elements other than classes and interfaces,
* to allow for the possibility of adding more information to the marker in the future,
* or to fit the marker into a framework that already makes heavy use of annotation types,
* then a marker annotation is the correct choice
* Created by Alexis on 28-Apr-17. With Marker interface idea is to make empty interface and extend
* it. Basically it is just to identify the special objects from normal objects. Like in case of
* serialization , objects that need to be serialized must implement serializable interface (it is
* empty interface) and down the line writeObject() method must be checking if it is a instance of
* serializable or not.
*
* <p>Marker interface vs annotation Marker interfaces and marker annotations both have their uses,
* neither of them is obsolete or always better then the other one. If you want to define a type
* that does not have any new methods associated with it, a marker interface is the way to go. If
* you want to mark program elements other than classes and interfaces, to allow for the possibility
* of adding more information to the marker in the future, or to fit the marker into a framework
* that already makes heavy use of annotation types, then a marker annotation is the correct choice
*/
public class App {

/**
* Program entry point
* Program entry point.
*
* @param args command line args
*/
Expand Down
2 changes: 1 addition & 1 deletion marker/src/main/java/Guard.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.slf4j.LoggerFactory;

/**
* Class defining Guard
* Class defining Guard.
*/
public class Guard implements Permission {

Expand Down
3 changes: 1 addition & 2 deletions marker/src/main/java/Permission.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
*/

/**
* Interface without any methods
* Marker interface is based on that assumption
* Interface without any methods Marker interface is based on that assumption.
*/
public interface Permission {
}
2 changes: 1 addition & 1 deletion marker/src/main/java/Thief.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.slf4j.LoggerFactory;

/**
* Class defining Thief
* Class defining Thief.
*/
public class Thief {

Expand Down