Package com.luna.common.check
Class Preconditions
java.lang.Object
com.luna.common.check.Preconditions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheck(boolean expression, ResultEnum error) 校验表达式是否正确static voidcheckExpression(boolean expression, ResultEnum resultEnum) static voidcheckExpression(boolean expression, String msg) static <T> TcheckNotNull(T reference, ResultEnum bizErrorEnum) static <T> TcheckNotNull(T reference, String errorMessage) static <T> TcheckParamNotNull(T reference) static voidtriggerException(String message)
-
Constructor Details
-
Preconditions
public Preconditions()
-
-
Method Details
-
check
校验表达式是否正确- Parameters:
expression-error- FxErrorCode枚举
-
checkExpression
-
checkExpression
-
checkNotNull
-
checkNotNull
-
checkParamNotNull
public static <T> T checkParamNotNull(T reference) -
triggerException
-