Code style: move private constructors for singleton classes to the top of the file
This commit is contained in:
+2
-2
@@ -42,6 +42,8 @@ import java.util.Set;
|
||||
* Utility class for converting between Sponge and LuckPerms context and tristate classes
|
||||
*/
|
||||
public final class CompatibilityUtil {
|
||||
private CompatibilityUtil() {}
|
||||
|
||||
private static final Set<Context> EMPTY = ImmutableSet.of();
|
||||
|
||||
public static ImmutableContextSet convertContexts(Set<Context> contexts) {
|
||||
@@ -92,6 +94,4 @@ public final class CompatibilityUtil {
|
||||
}
|
||||
}
|
||||
|
||||
private CompatibilityUtil() {}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public final class SpongeCommandUtils {
|
||||
private SpongeCommandUtils() {}
|
||||
|
||||
public static Tristate parseTristate(int index, List<String> args) throws ArgumentParser.ArgumentException {
|
||||
String s = args.get(index).toLowerCase();
|
||||
@@ -90,6 +91,4 @@ public final class SpongeCommandUtils {
|
||||
return MessageUtils.contextSetToString(localeManager, set);
|
||||
}
|
||||
|
||||
private SpongeCommandUtils() {}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ import org.spongepowered.api.service.permission.SubjectData;
|
||||
* Provides proxy instances which implement the SpongeAPI using the LuckPerms model.
|
||||
*/
|
||||
public final class ProxyFactory {
|
||||
private ProxyFactory() {}
|
||||
|
||||
private static final boolean IS_API_7 = isApi7();
|
||||
private static boolean isApi7() {
|
||||
try {
|
||||
@@ -89,6 +91,4 @@ public final class ProxyFactory {
|
||||
me.lucko.luckperms.sponge.service.proxy.api6.DescriptionBuilder.registerDescription(service, description);
|
||||
}
|
||||
|
||||
private ProxyFactory() {}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -31,8 +31,9 @@ import me.lucko.luckperms.sponge.service.model.calculated.CalculatedSubject;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class SubjectInheritanceGraphs {
|
||||
private static final SubjectInheritanceGraph NON_CONTEXTUAL = new NonContextual();
|
||||
private SubjectInheritanceGraphs() {}
|
||||
|
||||
private static final SubjectInheritanceGraph NON_CONTEXTUAL = new NonContextual();
|
||||
|
||||
public static SubjectInheritanceGraph getGraph() {
|
||||
return NON_CONTEXTUAL;
|
||||
@@ -73,6 +74,4 @@ public final class SubjectInheritanceGraphs {
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
private SubjectInheritanceGraphs() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user