Code style: move private constructors for singleton classes to the top of the file

This commit is contained in:
Luck
2019-03-05 12:36:09 +00:00
Unverified
parent 3726f6de41
commit 0a50df6557
43 changed files with 53 additions and 82 deletions
@@ -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() {}
}
@@ -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() {}
}