Class Utils


  • public class Utils
    extends java.lang.Object
    This class contains some different functions so that you dont need to implement them
    • Constructor Summary

      Constructors 
      Constructor Description
      Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getCaller()
      This function returns the name of the class that contained the function that called this function (think about it. it makes sense).
      static java.lang.String getCaller​(int offset)
      This function returns the name of the class that contained the function that called this function (think about it. it makes sense).
      static java.lang.String getDate()  
      static java.lang.String getTime()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • getTime

        public static java.lang.String getTime()
        Returns:
        current time in HH:mm:ss format (e.g. 17:59:38)
      • getDate

        public static java.lang.String getDate()
        Returns:
        current date in d.MM.YYYY format (e.g. 21.01.2021)
      • getCaller

        public static java.lang.String getCaller()
                                          throws java.lang.ClassNotFoundException
        This function returns the name of the class that contained the function that called this function (think about it. it makes sense). That way you can find out which class called a specific function.
        Returns:
        the caller of the function that called this function
        Throws:
        java.lang.ClassNotFoundException - shouldn't really be thrown
      • getCaller

        public static java.lang.String getCaller​(int offset)
                                          throws java.lang.ClassNotFoundException
        This function returns the name of the class that contained the function that called this function (think about it. it makes sense). That way you can find out which class called a specific function.
        Parameters:
        offset - to add to the stack trace if it was passed through any other class
        Returns:
        the name of the calling class
        Throws:
        java.lang.ClassNotFoundException - shouldn't really be thrown