Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
* New commands can be created by implementing {@link SlashCommandInteractionEvent} or extending
* {@link SlashCommandAdapter}. They can then be registered in {@link Features}.
*/
public enum Application {
;
public class Application {
private Application() {
throw new UnsupportedOperationException("Utility class, construction not supported");
}

private static final Logger logger = LoggerFactory.getLogger(Application.class);
private static final String DEFAULT_CONFIG_PATH = "config.json";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
* A bootstrap launcher with minimal dependencies that sets up needed parts and workarounds for the
* main logic to take over.
*/
public enum BootstrapLauncher {
;
public class BootstrapLauncher {
private BootstrapLauncher() {
throw new UnsupportedOperationException("Utility class, construction not supported");
}

/**
* Starts the main application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@
* To add a new slash command, extend the commands returned by
* {@link #createFeatures(JDA, Database, Config)}.
*/
public enum Features {
;
public class Features {
private Features() {
throw new UnsupportedOperationException("Utility class, construction not supported");
}

/**
* Creates all features that should be registered with this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
* Utility class to work with images returned by the Wolfram Alpha API. For example to render and
* combine them.
*/
enum WolframAlphaImages {
;
class WolframAlphaImages {
static final String IMAGE_FORMAT = "png";
private static final Color IMAGE_BACKGROUND = Color.WHITE;
private static final int IMAGE_MARGIN_PX = 10;
Expand All @@ -35,7 +34,10 @@ enum WolframAlphaImages {
new FontRenderContext(new AffineTransform(), true, true);
private static final Color TITLE_COLOR = Color.decode("#3C3C3C");
private static final Font TITLE_FONT = new Font("Arial", Font.BOLD, 15);
private static final int TITLE_HEIGHT_PX = 20;

private WolframAlphaImages() {
throw new UnsupportedOperationException("Utility class, construction not supported");
}

static @NotNull BufferedImage renderTitle(@NotNull String title) {
Rectangle2D titleBounds = TITLE_FONT.getStringBounds(title, TITLE_RENDER_CONTEXT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
/**
* Utility class offering helpers revolving around user moderation, such as banning or kicking.
*/
public enum ModerationUtils {
;
public class ModerationUtils {
private ModerationUtils() {
throw new UnsupportedOperationException("Utility class, construction not supported");
}

private static final Logger logger = LoggerFactory.getLogger(ModerationUtils.class);
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
/**
* Utility for hashing data.
*/
public enum Hashing {
;
public class Hashing {
private Hashing() {
throw new UnsupportedOperationException("Utility class, construction not supported");
}

/**
* All characters available in the hexadecimal-system, as UTF-8 encoded array.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
* This class is meant to contain all utility methods for {@link Message} that can be used on all
* other commands to avoid similar methods appearing everywhere.
*/
public enum MessageUtils {
;
public class MessageUtils {
private MessageUtils() {
throw new UnsupportedOperationException("Utility class, construction not supported");
}

/**
* Disables all the buttons that a message has. Disabling buttons deems it as not clickable to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
/**
* Utility class for computing string distances, for example the edit distance between two words.
*/
public enum StringDistances {
;
public class StringDistances {
private StringDistances() {
throw new UnsupportedOperationException("Utility class, construction not supported");
}

/**
* Computes the candidate that matches the given query string best.
Expand Down