Assert { public static void isNull(final Object obj, final int errorCode, final Object... params) throws AssertException { if (obj != null) { throw new AssertException(errorCode, params); } }  static void notNull(final Object obj, final int errorCode, final Object... params); static void isNull(final Object obj, final int errorCode, final Object... params); static void notEmpty(final String str, final int errorCode, final Object... params); static void isEmpty(final String str, final int errorCode, final Object... params); static void notEmpty(final T[] str, final int errorCode, final Object... params); static void isEmpty(final T[] str, final int errorCode, final Object... params); static void notEmpty(final Collection<?> str, final int errorCode, final Object... params); static void isEmpty(final Collection<?> str, final int errorCode, final Object... params); static void notEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void isEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void equals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void notEquals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void isTrue(final boolean result, final int errorCode, final Object... params); static void isFalse(final boolean result, final int errorCode, final Object... params);  }
@Test public void isNull() { Object obj = null; Assert.isNull(obj, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("obj 是null对象"); }