|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.7.0) E17060-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.odi.domain.util.Assert
public class Assert
This class is designed as replacement of Spring's Assert, but with support of I18N ODI MessageHandle.
Each method with MessageHandle has version without this argument. In such case it will use default messages. If no arguments is passed to default version of method it will use generic version of message (e.g. "Parameter must be true." instead of "Parameter 'paramName' must be true.").
ErrorMessageUtils
, MessageHandle
Constructor Summary | |
---|---|
Assert() |
Method Summary | |
---|---|
static void |
hasLength(java.lang.String text, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args) Assert that a string is not empty; that is, it must not be null and not empty (note: it can contains whitespace characters only - method don't check this case. |
static void |
hasLength(java.lang.String text, java.lang.Object... args) Assert that a string is not empty; that is, it must not be null and not empty (note: it can contains whitespace characters only - method don't check this case. |
static void |
hasText(java.lang.String text, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args) Assert that a string has valid text content; that is, it must not be null and must contain at least one non-whitespace character. |
static void |
hasText(java.lang.String text, java.lang.Object... args) Assert that a string has valid text content; that is, it must not be null and must contain at least one non-whitespace character.Default message: Parameter {0} must have text; it must not be null, empty, or blank. |
static void |
isAssignable(java.lang.Class<?> superType, java.lang.Class<?> subType) Assert that superType.isAssignableFrom(subType) is true .Default message: Class {subType} is not assignable to {superType}. |
static void |
isAssignable(java.lang.Class<?> superType, java.lang.Class<?> subType, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args) Assert that superType.isAssignableFrom(subType) is true . |
static void |
isFalse(boolean expression, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args) Assert a boolean expression, throwing DomainRuntimeException if the test result is true . |
static void |
isFalse(boolean expression, java.lang.Object... args) Assert a boolean expression, throwing DomainRuntimeException with default message if the test result is true . |
static void |
isInstanceOf(java.lang.Class<?> clazz, java.lang.Object obj, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args) Assert that the provided object is an instance of the provided class. |
static void |
isInstanceOf(java.lang.Class<?> clazz, java.lang.Object obj, java.lang.Object... args) Assert that the provided object is an instance of the provided class. Default message: Parameter '{0}' must be instance of '{clazz}'. |
static void |
isNull(java.lang.Object value, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args) Assert that an object is null . |
static void |
isNull(java.lang.Object value, java.lang.Object... args) Assert that an object is null .Default message: Parameter '{0}' must be null. |
static void |
isTrue(boolean expression, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args) Assert a boolean expression, throwing DomainRuntimeException if the test result is false . |
static void |
isTrue(boolean expression, java.lang.Object... args) Assert a boolean expression, throwing DomainRuntimeException with default message if the test result is false . |
static void |
notNull(java.lang.Object value, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args) Assert that an object isn't null . |
static void |
notNull(java.lang.Object value, java.lang.Object... args) Assert that an object isn't null .Default message: Parameter '{0}' must not be null. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Assert()
Method Detail |
---|
public static void isTrue(boolean expression, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args)
DomainRuntimeException
if the test result is false
.expression
-msgHandle
-args
-public static void isTrue(boolean expression, java.lang.Object... args)
DomainRuntimeException
with default message if the test result is false
.expression
-args
-public static void isFalse(boolean expression, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args)
DomainRuntimeException
if the test result is true
.expression
-msgHandle
-args
-public static void isFalse(boolean expression, java.lang.Object... args)
DomainRuntimeException
with default message if the test result is true
.expression
-args
-public static void isNull(java.lang.Object value, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args)
null
.value
-msgHandle
-args
-public static void isNull(java.lang.Object value, java.lang.Object... args)
null
.value
-args
-public static void notNull(java.lang.Object value, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args)
null
.value
-msgHandle
-args
-public static void notNull(java.lang.Object value, java.lang.Object... args)
null
.value
-args
-public static void isInstanceOf(java.lang.Class<?> clazz, java.lang.Object obj, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args)
clazz
-obj
-msgHandle
-args
-public static void isInstanceOf(java.lang.Class<?> clazz, java.lang.Object obj, java.lang.Object... args)
clazz
-obj
-args
-public static void isAssignable(java.lang.Class<?> superType, java.lang.Class<?> subType, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args)
superType.isAssignableFrom(subType)
is true
.superType
-subType
-msgHandle
-args
-public static void isAssignable(java.lang.Class<?> superType, java.lang.Class<?> subType)
superType.isAssignableFrom(subType)
is true
.superType
-subType
-public static void hasText(java.lang.String text, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args)
null
and must contain at least one non-whitespace character.text
-msgHandle
-args
-public static void hasText(java.lang.String text, java.lang.Object... args)
null
and must contain at least one non-whitespace character.text
-args
-public static void hasLength(java.lang.String text, oracle.odi.internal.util.MessageHandle msgHandle, java.lang.Object... args)
null
and not empty (note: it can contains whitespace characters only - method don't check this case. If you need more strict check - use method hasText(String, MessageHandle, Object...)
).text
-msgHandle
-args
-public static void hasLength(java.lang.String text, java.lang.Object... args)
null
and not empty (note: it can contains whitespace characters only - method don't check this case. If you need more strict check - use method hasText(String, MessageHandle, Object...)
).null
or empty.text
-args
-
|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.7.0) E17060-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |