You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BetterReflection:
+ Added an int Pattern
+ Added some primitives to the primitives map
+ Added the method #getBetterReflectionClasses(), which will return a copy of the betterReflectionClasses list
+ Added #getVersion(), which will return a hard-coded value that will be changed on each version
+ Added #getLatestVersion(), which will query GitHub and return the latest version as a String
+ Added #isUpToDate(), which will call #getLatestVersion() and #getVersion() to check if the current version is up to date
+ Added #versionToInts(String), which will convert a String (e.g. "0.4") to an array of integers (such as { 0, 4 })
* Replaced the betterReflectionClasses CopyOnWriteArrayList with a simple synchronized ArrayList
BetterReflectionClass:
+ Added the #forName() method, this will simply return #BetterReflectionClass(String) but return null if a ClassNotFoundException is to be thrown.
+ #getName() - returns the class' name
+ #getSimpleName() - returns the class' simple name
+ #getCanonicalName() - returns the class' canonical name
+ #getTypeName() - returns the class' type name
* Replaced BetterReflectionUtils#getClasses to BetterReflectionUtils#getTypes (renamed)
BetterReflectionUtils:
+ Added a public static final File that holds the current jar file the program is being run from
+ Added the method #getCurrentJarFile() which returns the current jar file the program is being run from (not cached, will be retrieved every time)
+ Added the method #getCurrentJar() which returns the current jar File wrapped in a JarFile class
+ Added the method #isRunningFromJar() which returns true if the program is running off of a jar, false if it's running in an IDE
+ Added #getJavaVersion(), which will return the current java version as int
+ Added #setFinal(Field field, boolean final), which will set a field to the desired final state (works in Java 12+ too but that'd require some additional JVM arguments)
* Fixed the class' content being pasted twice
* Renamed #getClasses(String) -> #getClassesInPackage(String), which returns a list of classes in the current package and now works both when running in an IDE and off of a jar, if the jar is still present
* Renamed #getClassByNameStart(String, String) -> #getClassesFromNameBeginning(String, String) (now works when running off a jar too)
- Removed #findClasses(File, String)
Tests:
* Now using nanoseconds instead of milliseconds
- Removed Timer class
Now also including sources in jar file, this way the javadocs will be accessible when using a good IDE.
0 commit comments