Skip to content
This repository was archived by the owner on Nov 18, 2020. It is now read-only.

Commit bbbd9e4

Browse files
committed
rearrange code
1 parent 3c56b8d commit bbbd9e4

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/main/java/io/github/benas/easyproperties/DaemonThreadFactory.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,19 @@
3232
*/
3333
class DaemonThreadFactory implements ThreadFactory {
3434

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+
3544
@Override
3645
public Thread newThread(Runnable runnable) {
3746
Thread thread = new Thread(runnable);
3847
thread.setDaemon(true);
3948
return thread;
4049
}
41-
42-
public static DaemonThreadFactory newDaemonThreadFactory() {
43-
return new DaemonThreadFactory();
44-
}
4550
}

src/main/java/io/github/benas/easyproperties/ReflectionUtils.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,23 @@
3535
*/
3636
class ReflectionUtils {
3737

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+
*/
3848
public static List<Field> getAllFields(final Object object) {
3949
List<Field> allFields = new ArrayList<>();
4050
allFields.addAll(getDeclaredFields(object));
4151
allFields.addAll(getInheritedFields(object));
4252
return allFields;
4353
}
4454

45-
private ReflectionUtils() {
46-
47-
}
48-
4955
private static List<Field> getDeclaredFields(final Object object) {
5056
return new ArrayList<>(Arrays.asList(object.getClass().getDeclaredFields()));
5157
}

0 commit comments

Comments
 (0)