public final class GeneralCodingRules
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ArchCondition<JavaClass> |
ACCESS_STANDARD_STREAMS |
static ArchRule |
NO_CLASSES_SHOULD_ACCESS_STANDARD_STREAMS
It is generally good practice to use correct logging instead of writing to the console.
|
static ArchRule |
NO_CLASSES_SHOULD_THROW_GENERIC_EXCEPTIONS
It is generally good practice to throw specific exceptions like
IllegalArgumentException
or custom exceptions, instead of throwing generic exceptions like RuntimeException . |
static ArchRule |
NO_CLASSES_SHOULD_USE_JAVA_UTIL_LOGGING
Most projects use the more powerful LOG4J or Logback instead of java.util.logging, often hidden behind
SLF4J.
|
static ArchCondition<JavaClass> |
THROW_GENERIC_EXCEPTIONS |
static ArchCondition<JavaClass> |
USE_JAVA_UTIL_LOGGING |
public static final ArchCondition<JavaClass> ACCESS_STANDARD_STREAMS
public static final ArchRule NO_CLASSES_SHOULD_ACCESS_STANDARD_STREAMS
public static final ArchCondition<JavaClass> THROW_GENERIC_EXCEPTIONS
public static final ArchRule NO_CLASSES_SHOULD_THROW_GENERIC_EXCEPTIONS
IllegalArgumentException
or custom exceptions, instead of throwing generic exceptions like RuntimeException
.public static final ArchCondition<JavaClass> USE_JAVA_UTIL_LOGGING
public static final ArchRule NO_CLASSES_SHOULD_USE_JAVA_UTIL_LOGGING