Package org.htmlunit.corejs.javascript
Class NativeConsole
java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.IdScriptableObject
org.htmlunit.corejs.javascript.NativeConsole
- All Implemented Interfaces:
Serializable
,ConstProperties
,DebuggableObject
,IdFunctionCall
,Scriptable
,SymbolScriptable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static enum
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
ScriptableObject.KeyComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Object
private final Map
<String, AtomicInteger> private static final String
private static final Pattern
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private final NativeConsole.ConsolePrinter
private static final long
Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
count
(Context cx, Scriptable scope, Object[] args) private void
countReset
(Context cx, Scriptable scope, Object[] args) execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) 'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable should be returned.protected int
static String
format
(Context cx, Scriptable scope, Object[] args) private static String
formatFloat
(Object val) private static String
private static String
formatObj
(Context cx, Scriptable scope, Object arg) private static String
formatString
(Object val) Return the name of the class.static void
init
(Scriptable scope, boolean sealed, NativeConsole.ConsolePrinter printer) protected void
initPrototypeId
(int id) private void
jsAssert
(Context cx, Scriptable scope, Object[] args) private double
nano2Milli
(Long nano) private void
print
(Context cx, Scriptable scope, NativeConsole.Level level, String msg) private void
time
(Context cx, Scriptable scope, Object[] args) private void
timeEnd
(Context cx, Scriptable scope, Object[] args) private void
timeLog
(Context cx, Scriptable scope, Object[] args) Methods inherited from class org.htmlunit.corejs.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findInstanceIdInfo, findPrototypeId, get, get, getAttributes, getAttributes, getIds, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, getOwnPropertyDescriptor, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributes, setInstanceIdAttributes, setInstanceIdValue
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
addLazilyInitializedValue, applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildClassCtor, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, checkValidAttributes, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getBase, getBase, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putImpl, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
CONSOLE_TAG
-
DEFAULT_LABEL
- See Also:
-
FMT_REG
-
timers
-
counters
-
printer
-
Id_toSource
private static final int Id_toSource- See Also:
-
Id_trace
private static final int Id_trace- See Also:
-
Id_debug
private static final int Id_debug- See Also:
-
Id_log
private static final int Id_log- See Also:
-
Id_info
private static final int Id_info- See Also:
-
Id_warn
private static final int Id_warn- See Also:
-
Id_error
private static final int Id_error- See Also:
-
Id_assert
private static final int Id_assert- See Also:
-
Id_count
private static final int Id_count- See Also:
-
Id_countReset
private static final int Id_countReset- See Also:
-
Id_time
private static final int Id_time- See Also:
-
Id_timeEnd
private static final int Id_timeEnd- See Also:
-
Id_timeLog
private static final int Id_timeLog- See Also:
-
LAST_METHOD_ID
private static final int LAST_METHOD_ID- See Also:
-
MAX_ID
private static final int MAX_ID- See Also:
-
-
Constructor Details
-
NativeConsole
-
-
Method Details
-
init
-
getClassName
Description copied from class:ScriptableObject
Return the name of the class.This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
- Specified by:
getClassName
in interfaceScriptable
- Specified by:
getClassName
in classScriptableObject
-
initPrototypeId
protected void initPrototypeId(int id) - Overrides:
initPrototypeId
in classIdScriptableObject
-
execIdCall
public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Description copied from class:IdScriptableObject
'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable should be returned.- Specified by:
execIdCall
in interfaceIdFunctionCall
- Overrides:
execIdCall
in classIdScriptableObject
-
print
-
format
-
formatString
-
formatInt
-
formatFloat
-
formatObj
-
jsAssert
-
count
-
countReset
-
time
-
timeEnd
-
timeLog
-
nano2Milli
-
findPrototypeId
- Overrides:
findPrototypeId
in classIdScriptableObject
-