Package org.htmlunit.corejs.javascript
Class AbstractEcmaObjectOperations
- java.lang.Object
-
- org.htmlunit.corejs.javascript.AbstractEcmaObjectOperations
-
class AbstractEcmaObjectOperations extends java.lang.Object
Abstract Object Operations as defined by EcmaScript- See Also:
- Abstract
Operations - Operations on Objects
Notes
- all methods are to deviate from the method signature defined in the EcmaScript specification, by taking an additional 1st parameter of type Context: (downstream) methods may need the Context object to read flags and we want to avoid having to look up the current context (for performance reasons)
- all methods that implement an Abstract Operation as defined by EcmaScript are to be package-scopes methods, to prevent them from being used directly by 3rd party code, which would hamper evolving them over time to adept to newer EcmaScript specifications
- a link to the method specification of the specific (EcmaScript) version implemented will be put in the JavaDoc of each method that implements an Abstract Operations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
AbstractEcmaObjectOperations.INTEGRITY_LEVEL
-
Constructor Summary
Constructors Constructor Description AbstractEcmaObjectOperations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.util.List<java.lang.Object>
createListFromArrayLike(Context cx, Scriptable o, java.util.function.Predicate<java.lang.Object> elementTypesPredicate, java.lang.String msg)
CreateListFromArrayLike ( obj [ , elementTypes ] )(package private) static boolean
hasOwnProperty(Context cx, java.lang.Object o, java.lang.Object property)
Implementation of Abstract Object operation HasOwnProperty as defined by EcmaScript(package private) static boolean
isCompatiblePropertyDescriptor(boolean extensible, ScriptableObject desc, ScriptableObject current)
IsCompatiblePropertyDescriptor ( Extensible, Desc, Current )(package private) static long
lengthOfArrayLike(Context cx, Scriptable o)
LengthOfArrayLike ( obj )(package private) static void
put(Context cx, Scriptable o, int p, java.lang.Object v, boolean isThrow)
Set ( O, P, V, Throw)(package private) static void
put(Context cx, Scriptable o, java.lang.String p, java.lang.Object v, boolean isThrow)
Set ( O, P, V, Throw)(package private) static boolean
setIntegrityLevel(Context cx, java.lang.Object o, AbstractEcmaObjectOperations.INTEGRITY_LEVEL level)
Implementation of Abstract Object operation setIntegrityLevel as defined by EcmaScript(package private) static Constructable
speciesConstructor(Context cx, Scriptable s, Constructable defaultConstructor)
Implement the ECMAScript abstract operation "SpeciesConstructor" defined in section 7.2.33 of ECMA262.(package private) static boolean
testIntegrityLevel(Context cx, java.lang.Object o, AbstractEcmaObjectOperations.INTEGRITY_LEVEL level)
Implementation of Abstract Object operation testIntegrityLevel as defined by EcmaScript(package private) static boolean
validateAndApplyPropertyDescriptor(Scriptable o, Scriptable p, boolean extensible, ScriptableObject desc, ScriptableObject current)
ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )
-
-
-
Method Detail
-
hasOwnProperty
static boolean hasOwnProperty(Context cx, java.lang.Object o, java.lang.Object property)
Implementation of Abstract Object operation HasOwnProperty as defined by EcmaScript
-
testIntegrityLevel
static boolean testIntegrityLevel(Context cx, java.lang.Object o, AbstractEcmaObjectOperations.INTEGRITY_LEVEL level)
Implementation of Abstract Object operation testIntegrityLevel as defined by EcmaScript- Parameters:
cx
-o
-level
-- Returns:
- boolean
- See Also:
- TestIntegrityLevel
-
setIntegrityLevel
static boolean setIntegrityLevel(Context cx, java.lang.Object o, AbstractEcmaObjectOperations.INTEGRITY_LEVEL level)
Implementation of Abstract Object operation setIntegrityLevel as defined by EcmaScript- Parameters:
cx
-o
-level
-- Returns:
- boolean
- See Also:
- SetIntegrityLevel
-
speciesConstructor
static Constructable speciesConstructor(Context cx, Scriptable s, Constructable defaultConstructor)
Implement the ECMAScript abstract operation "SpeciesConstructor" defined in section 7.2.33 of ECMA262.
-
put
static void put(Context cx, Scriptable o, java.lang.String p, java.lang.Object v, boolean isThrow)
Set ( O, P, V, Throw)https://262.ecma-international.org/12.0/#sec-set-o-p-v-throw
-
put
static void put(Context cx, Scriptable o, int p, java.lang.Object v, boolean isThrow)
Set ( O, P, V, Throw)https://262.ecma-international.org/12.0/#sec-set-o-p-v-throw
-
createListFromArrayLike
static java.util.List<java.lang.Object> createListFromArrayLike(Context cx, Scriptable o, java.util.function.Predicate<java.lang.Object> elementTypesPredicate, java.lang.String msg)
CreateListFromArrayLike ( obj [ , elementTypes ] )https://262.ecma-international.org/12.0/#sec-createlistfromarraylike
-
lengthOfArrayLike
static long lengthOfArrayLike(Context cx, Scriptable o)
LengthOfArrayLike ( obj )https://262.ecma-international.org/12.0/#sec-lengthofarraylike
-
isCompatiblePropertyDescriptor
static boolean isCompatiblePropertyDescriptor(boolean extensible, ScriptableObject desc, ScriptableObject current)
IsCompatiblePropertyDescriptor ( Extensible, Desc, Current )https://262.ecma-international.org/12.0/#sec-iscompatiblepropertydescriptor
-
validateAndApplyPropertyDescriptor
static boolean validateAndApplyPropertyDescriptor(Scriptable o, Scriptable p, boolean extensible, ScriptableObject desc, ScriptableObject current)
ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )https://262.ecma-international.org/12.0/#sec-validateandapplypropertydescriptor
-
-