Resolves checkstyle errors for remaining m (#1090)
* Reduces checkstyle errors in marker * Reduces checkstyle errors in master-worker-pattern * Reduces checkstyle errors in mediator * Reduces checkstyle errors in memento * Reduces checkstyle errors in model-view-controller * Reduces checkstyle errors in model-view-presenter * Reduces checkstyle errors in module * Reduces checkstyle errors in monad * Reduces checkstyle errors in monostate * Reduces checkstyle errors in multiton * Reduces checkstyle errors in mute-idiom * Reduces checkstyle errors in mutex
This commit is contained in:
committed by
Ilkka Seppälä
parent
3ccc9baa1a
commit
1fdc650545
@ -25,27 +25,23 @@ import org.slf4j.Logger;
|
||||
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
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Class defining Guard
|
||||
* Class defining Guard.
|
||||
*/
|
||||
public class Guard implements Permission {
|
||||
|
||||
|
@ -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 {
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Class defining Thief
|
||||
* Class defining Thief.
|
||||
*/
|
||||
public class Thief {
|
||||
|
||||
|
Reference in New Issue
Block a user