java.lang.Object
dev.netcode.util.Utils
This class contains some different functions so that you dont need to implement them
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringThis function returns the name of the class that contained the function that called this function (think about it. it makes sense).static StringgetCaller(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 StringgetDate()static StringgetTime()
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
getTime
- Returns:
- current time in HH:mm:ss format (e.g. 17:59:38)
-
getDate
- Returns:
- current date in d.MM.YYYY format (e.g. 21.01.2021)
-
getCaller
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:
ClassNotFoundException- shouldn't really be thrown
-
getCaller
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:
ClassNotFoundException- shouldn't really be thrown
-