Commit 031de6c
committed
0.4 - Breaking changes.
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.1 parent 7910ed6 commit 031de6c
File tree
18 files changed
+456
-251
lines changed- Java-BetterReflection/src/me/wavelength/betterreflection
- exceptions
- Test/src/me/wavelength/betterreflection/test
- test
- tests
- better
- traditional
18 files changed
+456
-251
lines changedLines changed: 131 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
4 | 11 | | |
| 12 | + | |
5 | 13 | | |
6 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | | - | |
| 19 | + | |
| 20 | + | |
10 | 21 | | |
11 | 22 | | |
12 | | - | |
13 | | - | |
| 23 | + | |
| 24 | + | |
14 | 25 | | |
15 | 26 | | |
16 | 27 | | |
17 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
18 | 34 | | |
19 | 35 | | |
20 | | - | |
| 36 | + | |
21 | 37 | | |
22 | 38 | | |
23 | 39 | | |
24 | 40 | | |
25 | 41 | | |
26 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
27 | 48 | | |
28 | 49 | | |
29 | | - | |
30 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
31 | 59 | | |
32 | 60 | | |
33 | | - | |
34 | 61 | | |
35 | | - | |
36 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
37 | 67 | | |
38 | 68 | | |
39 | 69 | | |
40 | | - | |
| 70 | + | |
41 | 71 | | |
42 | 72 | | |
43 | | - | |
44 | 73 | | |
45 | | - | |
46 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
47 | 77 | | |
48 | 78 | | |
49 | 79 | | |
| |||
54 | 84 | | |
55 | 85 | | |
56 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
57 | 173 | | |
Lines changed: 55 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
42 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
43 | 84 | | |
44 | 85 | | |
45 | 86 | | |
| |||
62 | 103 | | |
63 | 104 | | |
64 | 105 | | |
65 | | - | |
| 106 | + | |
66 | 107 | | |
67 | 108 | | |
68 | 109 | | |
| |||
79 | 120 | | |
80 | 121 | | |
81 | 122 | | |
82 | | - | |
| 123 | + | |
83 | 124 | | |
84 | 125 | | |
85 | 126 | | |
| |||
96 | 137 | | |
97 | 138 | | |
98 | 139 | | |
99 | | - | |
| 140 | + | |
100 | 141 | | |
101 | 142 | | |
102 | 143 | | |
| |||
112 | 153 | | |
113 | 154 | | |
114 | 155 | | |
115 | | - | |
| 156 | + | |
116 | 157 | | |
117 | 158 | | |
118 | 159 | | |
| |||
146 | 187 | | |
147 | 188 | | |
148 | 189 | | |
149 | | - | |
| 190 | + | |
150 | 191 | | |
151 | 192 | | |
152 | 193 | | |
| |||
177 | 218 | | |
178 | 219 | | |
179 | 220 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
| 221 | + | |
185 | 222 | | |
186 | 223 | | |
187 | 224 | | |
188 | 225 | | |
189 | 226 | | |
190 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
191 | 236 | | |
0 commit comments