This repository was archived by the owner on Nov 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-8
lines changed
src/main/java/io/github/benas/easyproperties Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 32
32
*/
33
33
class DaemonThreadFactory implements ThreadFactory {
34
34
35
+ /**
36
+ * Create a new {@link DaemonThreadFactory}.
37
+ *
38
+ * @return a new {@link DaemonThreadFactory}
39
+ */
40
+ public static DaemonThreadFactory newDaemonThreadFactory () {
41
+ return new DaemonThreadFactory ();
42
+ }
43
+
35
44
@ Override
36
45
public Thread newThread (Runnable runnable ) {
37
46
Thread thread = new Thread (runnable );
38
47
thread .setDaemon (true );
39
48
return thread ;
40
49
}
41
-
42
- public static DaemonThreadFactory newDaemonThreadFactory () {
43
- return new DaemonThreadFactory ();
44
- }
45
50
}
Original file line number Diff line number Diff line change 35
35
*/
36
36
class ReflectionUtils {
37
37
38
+ private ReflectionUtils () {
39
+
40
+ }
41
+
42
+ /**
43
+ * Get declared and inherited fields of a given object.
44
+ *
45
+ * @param object to introspect
46
+ * @return declared and inherited fields
47
+ */
38
48
public static List <Field > getAllFields (final Object object ) {
39
49
List <Field > allFields = new ArrayList <>();
40
50
allFields .addAll (getDeclaredFields (object ));
41
51
allFields .addAll (getInheritedFields (object ));
42
52
return allFields ;
43
53
}
44
54
45
- private ReflectionUtils () {
46
-
47
- }
48
-
49
55
private static List <Field > getDeclaredFields (final Object object ) {
50
56
return new ArrayList <>(Arrays .asList (object .getClass ().getDeclaredFields ()));
51
57
}
You can’t perform that action at this time.
0 commit comments