diff --git a/src/main/java/info/ronjenkins/slf4bukkit/AnsiColorMapper.java b/src/main/java/info/ronjenkins/slf4bukkit/AnsiColorMapper.java index 6ced4e0..b6a50eb 100644 --- a/src/main/java/info/ronjenkins/slf4bukkit/AnsiColorMapper.java +++ b/src/main/java/info/ronjenkins/slf4bukkit/AnsiColorMapper.java @@ -25,17 +25,27 @@ import org.fusesource.jansi.Ansi.Attribute; import java.util.Map; /** - * Maps {@link ChatColor} values to their JAnsi equivalents. + * Maps {@link ChatColor} values to their Jansi equivalents. * - *
This class might not always be instantiable as jansi might not be present at runtime.
+ *This class might not always be instantiable as Jansi might not be present at runtime.
* * @author Ronald Jack Jenkins Jr. */ final class AnsiColorMapper implements ColorMapper { + /** + * Creates a new instance. + * + *This class relies on Jansi. If this dependency is not present at runtime, it cannot be initialized as the JVM + * raises a {@code Throwable} due to missing dependencies.
+ * + *In this case callers of this constructor should fall back to an alternative {@code ColorMapper} + * implementation.
+ * + * @throws Throwable if Jansi is not present at runtime + */ AnsiColorMapper() throws Throwable { - // Calling this constructor could result in a Throwable because JAnsi, which is required to execute code - // in this class, might not be present at runtime, thus expected classes are not found. + //see javadoc } // @formatter:off