mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 03:16:41 +00:00
Fixed utility classes having constructors.
This commit is contained in:
@ -18,7 +18,10 @@
|
||||
|
||||
package com.sk89q.util;
|
||||
|
||||
public class ArrayUtil {
|
||||
public final class ArrayUtil {
|
||||
|
||||
private ArrayUtil() {
|
||||
}
|
||||
|
||||
public static String[] removePortionOfArray(String[] array, int from, int to, String replace) {
|
||||
String[] newArray = new String[from + array.length - to - (replace == null ? 1 : 0)];
|
||||
|
@ -24,7 +24,11 @@ import java.lang.reflect.Field;
|
||||
/**
|
||||
* @author zml2008
|
||||
*/
|
||||
public class ReflectionUtil {
|
||||
public final class ReflectionUtil {
|
||||
|
||||
private ReflectionUtil() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T getField(Object from, String name) {
|
||||
Class<?> checkClass = from.getClass();
|
||||
@ -39,4 +43,5 @@ public class ReflectionUtil {
|
||||
} while (checkClass.getSuperclass() != Object.class && ((checkClass = checkClass.getSuperclass()) != null));
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,7 +26,11 @@ import java.util.Map;
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public class StringUtil {
|
||||
public final class StringUtil {
|
||||
|
||||
private StringUtil() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Trim a string if it is longer than a certain length.
|
||||
*
|
||||
|
Reference in New Issue
Block a user