AdfAssertion utilities. The container is expected to have already initialized the AdfAssert Object before this code is executed and initialized the AdfAssert.DEBUG flag/
Method Summary
|
public static Object |
assert(Object condition, Object message)
-
AdfAsserts that a condition is true.
|
public static Object |
assertArray(Object target, Object message)
-
AdfAsserts that the target object is an Array
|
public static Object |
assertArrayOrNull(Object target, Object message)
-
AdfAsserts that the target object is an Array or null
|
public static Object |
assertBoolean(Object target, Object prefix)
-
AdfAsserts that the target is a boolean
|
public static Object |
assertDomElement(Object target, Object nodeName)
-
AdfAsserts that the target is a DOM Element and optionally has the specified element name
|
public static Object |
assertDomElementOrNull(Object target, Object nodeName)
-
AdfAsserts that the target is a DOM Element and optionally has the specified element name
|
public static Object |
assertDomNode(Object target, Object depth)
-
AdfAsserts that the target is a DOM Node
|
public static Object |
assertDomNodeOrNull(Object target, Object depth)
-
AdfAsserts that the target is a DOM Node or Null
|
public static Object |
assertFunction(Object target, Object prefix)
-
AdfAsserts that the target is a Function
|
public static Object |
assertFunctionOrNull(Object target, Object prefix)
-
AdfAsserts that the target is a Function or null
|
public static Object |
assertInSet(Object value, Object set, Object message)
|
public static Object |
assertionFailed(Object message, Object skipLevel, Object reason)
-
Base assertion failure support that supports specifying the stack skipping level
|
public static Object |
assertNonEmptyString(Object target, Object prefix)
-
AdfAsserts that the target is a non-empty String
|
public static Object |
assertNonNumeric(Object target, Object message)
-
AdfAsserts that the target object is not either a number, or convertible to a number
|
public static Object |
assertNumber(Object target, Object prefix)
-
AdfAsserts that the target is a number
|
public static Object |
assertNumberOrNull(Object target, Object prefix)
-
AdfAsserts that the target is a number or Null
|
public static Object |
assertNumeric(Object target, Object message)
-
AdfAsserts that the target object is either a number, or convertible to a number
|
public static Object |
assertObject(Object target, Object prefix)
-
AdfAsserts that the target is an Object
|
public static Object |
assertObjectOrNull(Object target, Object prefix)
-
AdfAsserts that the target is an Object or null
|
public static Object |
assertPrototype(Object target, Object theConstructor, Object reason)
-
AdfAsserts that the the target object has the same prototype as the example type
|
public static Object |
assertPrototypeOrNull(Object target, Object theConstructor, Object reason)
-
AdfAsserts that the the target object has the same prototype as the example type or is null.
|
public static Object |
assertPrototypes(Object target, Object instanceOne, Object instanceTwo, Object reason)
-
AdfAsserts that the the target object has the same prototype as the example types
|
public static Object |
assertString(Object target, Object prefix)
-
AdfAsserts that the target is a String
|
public static Object |
assertStringOrNull(Object target, Object prefix)
-
AdfAsserts that the target is a String or null
|
public static Object |
assertType(Object target, Object type, Object prefix, Object depth, Object nullOK)
-
AdfAsserts that the target object has the typeof specified
|
public static Object |
failedInAbstractFunction()
-
Convenience function for asserting when an abstact function is called
|
private static Object |
_getFuncParams(Object func)
-
Returns the param String for a function, or null if there are no parameters
|
public static Object |
getFunctionName(Object func)
-
Returns the name of a function, or null if the name can't be determined
|
public static Object |
getStackString(Object depth)
-
Returns the stack trace as a string
|
private static Object |
_getStackString(Object stackTrace)
|
private static Object |
_getStackTrace(Object skipLevel)
-
Returns the stack trace as an array of function callers
|
private static Object |
_safeJoin(Object arr, Object sep)
|