Class DevMarkers

java.lang.Object
nz.ac.vuw.ecs.swen225.gp22.domain.DevMarkers

public class DevMarkers extends Object
This class is used to aid my development of this module. I use custom annotations to mark certain parts of code that are still being worked on, or need to be changed to a notable degree. These annotations will be printed out when running the main method in this file, to make tracking these markers easier.

This file also acts as a testing ground for features that have not yet been fully implemented and thus do not benefit from a unit test.

Author:
Abdul
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Used when an element needs to enforce postconditions.
    static @interface 
    Used when an element needs to enforce preconditions.
    static @interface 
    A custom repeatable annotation where extra info can be provided about the work that needs to be done.
    protected static @interface 
    Allows WIP to be repeatable.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static boolean
    Determines whether or not custom annotations will be printed at runtime.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Set<Class<?>>
    Finds all classes in a given package.
    static void
    main(String[] args)
    Used to test interactions between objects whilst creating the implementation for certain classes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • markersEnabled

      public static boolean markersEnabled
      Determines whether or not custom annotations will be printed at runtime.
  • Constructor Details

    • DevMarkers

      public DevMarkers()
  • Method Details

    • main

      public static void main(String[] args)
      Used to test interactions between objects whilst creating the implementation for certain classes. Also prints out any custom annotations if markersEnabled is true.
      Parameters:
      args - Command line arguments.
    • findPackageClasses

      public static Set<Class<?>> findPackageClasses(String packageName)
      Finds all classes in a given package. This uses the system class loader and turns it into a stream which can then find all the classes.

      Used: https://www.baeldung.com/java-find-all-classes-in-package

      Parameters:
      packageName - Name of package to find classes in.
      Returns:
      Set of classes in package.