OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adf.view.js.assert
Class AdfAssert

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.assert.AdfAssert

public class AdfAssert
extends Object
AdfAssertion utilities. The container is expected to have already initialized the AdfAssert Object before this code is executed and initialized the AdfAssert.DEBUG flag/



Field Summary

public static Object
CLASS_NAME_PROPERTY
public static Object
FUNC_NAME_PROPERTY
AdfAssertion utilities.
private static Object
_MAX_STACK_DEPTH_LIMIT
private static Object
_PARAMS_NAME_PROPERTY


Fields inherited from org.ecmascript.object.Object

constructor, prototype


Constructor Summary

public
AdfAssert()
AdfAssertion utilities.


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)


Field Detail


CLASS_NAME_PROPERTY

public static Object CLASS_NAME_PROPERTY

FUNC_NAME_PROPERTY

public static Object FUNC_NAME_PROPERTY

AdfAssertion utilities. The container is expected to have already initialized the AdfAssert Object before this code is executed and initialized the AdfAssert.DEBUG flag/

_MAX_STACK_DEPTH_LIMIT

private static Object _MAX_STACK_DEPTH_LIMIT

_PARAMS_NAME_PROPERTY

private static Object _PARAMS_NAME_PROPERTY

Constructor Detail


AdfAssert

public AdfAssert()

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 Detail


assert

public static Object assert(Object condition,
                            Object message)

AdfAsserts that a condition is true. If the condition does not evaluate to true, an exception is thrown with the optional message and reason

Parameters:
condition    
message    
Return:
Object

assertArray

public static Object assertArray(Object target,
                                 Object message)

AdfAsserts that the target object is an Array

Parameters:
target    
message    
Return:
Object

assertArrayOrNull

public static Object assertArrayOrNull(Object target,
                                       Object message)

AdfAsserts that the target object is an Array or null

Parameters:
target    
message    
Return:
Object

assertBoolean

public static Object assertBoolean(Object target,
                                   Object prefix)

AdfAsserts that the target is a boolean

Parameters:
target    
prefix    
Return:
Object

assertDomElement

public static Object assertDomElement(Object target,
                                      Object nodeName)

AdfAsserts that the target is a DOM Element and optionally has the specified element name

Parameters:
target    
nodeName    
Return:
Object

assertDomElementOrNull

public static Object assertDomElementOrNull(Object target,
                                            Object nodeName)

AdfAsserts that the target is a DOM Element and optionally has the specified element name

Parameters:
target    
nodeName    
Return:
Object

assertDomNode

public static Object assertDomNode(Object target,
                                   Object depth)

AdfAsserts that the target is a DOM Node

Parameters:
target    
depth    
Return:
Object

assertDomNodeOrNull

public static Object assertDomNodeOrNull(Object target,
                                         Object depth)

AdfAsserts that the target is a DOM Node or Null

Parameters:
target    
depth    
Return:
Object

assertFunction

public static Object assertFunction(Object target,
                                    Object prefix)

AdfAsserts that the target is a Function

Parameters:
target    
prefix    
Return:
Object

assertFunctionOrNull

public static Object assertFunctionOrNull(Object target,
                                          Object prefix)

AdfAsserts that the target is a Function or null

Parameters:
target    
prefix    
Return:
Object

assertInSet

public static Object assertInSet(Object value,
                                 Object set,
                                 Object message)

Parameters:
value    
set    
message    
Return:
Object

assertionFailed

public static Object assertionFailed(Object message,
                                     Object skipLevel,
                                     Object reason)

Base assertion failure support that supports specifying the stack skipping level

Parameters:
message    
skipLevel    
reason    
Return:
Object

assertNonEmptyString

public static Object assertNonEmptyString(Object target,
                                          Object prefix)

AdfAsserts that the target is a non-empty String

Parameters:
target    
prefix    
Return:
Object

assertNonNumeric

public static Object assertNonNumeric(Object target,
                                      Object message)

AdfAsserts that the target object is not either a number, or convertible to a number

Parameters:
target    
message    
Return:
Object

assertNumber

public static Object assertNumber(Object target,
                                  Object prefix)

AdfAsserts that the target is a number

Parameters:
target    
prefix    
Return:
Object

assertNumberOrNull

public static Object assertNumberOrNull(Object target,
                                        Object prefix)

AdfAsserts that the target is a number or Null

Parameters:
target    
prefix    
Return:
Object

assertNumeric

public static Object assertNumeric(Object target,
                                   Object message)

AdfAsserts that the target object is either a number, or convertible to a number

Parameters:
target    
message    
Return:
Object

assertObject

public static Object assertObject(Object target,
                                  Object prefix)

AdfAsserts that the target is an Object

Parameters:
target    
prefix    
Return:
Object

assertObjectOrNull

public static Object assertObjectOrNull(Object target,
                                        Object prefix)

AdfAsserts that the target is an Object or null

Parameters:
target    
prefix    
Return:
Object

assertPrototype

public static Object assertPrototype(Object target,
                                     Object theConstructor,
                                     Object reason)

AdfAsserts that the the target object has the same prototype as the example type

Parameters:
target    
theConstructor    
reason    
Return:
Object

assertPrototypeOrNull

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.

Parameters:
target    
theConstructor    
reason    
Return:
Object

assertPrototypes

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

Parameters:
target    
instanceOne    
instanceTwo    
reason    
Return:
Object

assertString

public static Object assertString(Object target,
                                  Object prefix)

AdfAsserts that the target is a String

Parameters:
target    
prefix    
Return:
Object

assertStringOrNull

public static Object assertStringOrNull(Object target,
                                        Object prefix)

AdfAsserts that the target is a String or null

Parameters:
target    
prefix    
Return:
Object

assertType

public static Object assertType(Object target,
                                Object type,
                                Object prefix,
                                Object depth,
                                Object nullOK)

AdfAsserts that the target object has the typeof specified

Parameters:
target    
type    
prefix    
depth    
nullOK    
Return:
Object

failedInAbstractFunction

public static Object failedInAbstractFunction()

Convenience function for asserting when an abstact function is called

Return:
Object

_getFuncParams

private static Object _getFuncParams(Object func)

Returns the param String for a function, or null if there are no parameters

Parameters:
func    
Return:
Object

getFunctionName

public static Object getFunctionName(Object func)

Returns the name of a function, or null if the name can't be determined

Parameters:
func    
Return:
Object

getStackString

public static Object getStackString(Object depth)

Returns the stack trace as a string

Parameters:
depth    
Return:
Object

_getStackString

private static Object _getStackString(Object stackTrace)

Parameters:
stackTrace    
Return:
Object

_getStackTrace

private static Object _getStackTrace(Object skipLevel)

Returns the stack trace as an array of function callers

Parameters:
skipLevel    
Return:
Object

_safeJoin

private static Object _safeJoin(Object arr,
                                Object sep)

Parameters:
arr    
sep    
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2011.04.27 02:28 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.