public class Object extends Object
Modifier and Type | Field and Description |
---|---|
Function |
constructor
The initial value of Object.prototype.constructor is the standard
built-in Object constructor.
|
static Object |
prototype
A reference to the prototype for a class of objects.
|
Modifier and Type | Method and Description |
---|---|
static Object |
$applyStatic() |
static Object |
$applyStatic(Object value) |
boolean |
$delete(String key)
Deletes the value of the given key.
|
boolean |
$delete(String key)
Deletes the value of the given key.
|
<T> T |
$get(String key)
Gets the value for the given key.
|
<T> T |
$get(String key)
Gets the value for the given key.
|
<T> T |
$set(String key,
T value)
Sets the value for the given key.
|
<T> T |
$set(String key,
T value)
Sets the value for the given key.
|
Object |
$super(Object... params)
A syntax macro to call super in a constructor, without the regular Java
constraints (can call super even if not the first statement).
|
static Object |
assign(Object target,
Object... sources) |
static Object |
create(Object o)
Creates an object that has the specified prototype, and that optionally
contains specified properties.
|
static Object |
create(Object o,
PropertyDescriptorMap properties)
Creates an object that has the specified prototype, and that optionally
contains specified properties.
|
static Object |
defineProperties(Object o,
PropertyDescriptorMap properties)
Adds one or more properties to an object, and/or modifies attributes of
existing properties.
|
static Object |
defineProperty(Object o,
String p,
PropertyDescriptor attributes)
Adds a property to an object, or modifies attributes of an existing
property.
|
static Object |
defineProperty(Object o,
String p,
PropertyDescriptor attributes)
Adds a property to an object, or modifies attributes of an existing
property.
|
static <T> T |
freeze(T o)
Prevents the modification of existing property attributes and values, and
prevents the addition of new properties.
|
static PropertyDescriptor |
getOwnPropertyDescriptor(Object o,
String p)
Gets the own property descriptor of the specified object.
|
static Array<String> |
getOwnPropertyNames(Object o)
Returns the names of the own properties of an object.
|
static Object |
getPrototypeOf(Object o)
Returns the prototype of an object.
|
Boolean |
hasOwnProperty(double v)
Determines whether an object has a property with the specified name.
|
Boolean |
hasOwnProperty(String v)
Determines whether an object has a property with the specified name.
|
Boolean |
hasOwnProperty(String v)
Determines whether an object has a property with the specified name.
|
static Boolean |
isExtensible(Object o)
Returns a value that indicates whether new properties can be added to an
object.
|
static Boolean |
isFrozen(Object o)
Returns true if existing property attributes and values cannot be
modified in an object, and new properties cannot be added to the object.
|
Boolean |
isPrototypeOf(Object v)
Determines whether an object exists in another object's prototype chain.
|
static Boolean |
isSealed(Object o)
Returns true if existing property attributes cannot be modified in an
object and new properties cannot be added to the object.
|
static Array<String> |
keys(Object o)
Returns the names of the enumerable properties and methods of an object.
|
static <T> T |
preventExtensions(T o)
Prevents the addition of new properties to an object.
|
Boolean |
propertyIsEnumerable(double v)
Determines whether a specified property is enumerable.
|
Boolean |
propertyIsEnumerable(String v)
Determines whether a specified property is enumerable.
|
Boolean |
propertyIsEnumerable(String v)
Determines whether a specified property is enumerable.
|
static <T> T |
seal(T o)
Prevents the modification of attributes of existing properties, and
prevents the addition of new properties.
|
String |
toJSString()
Returns a JavaScript string representation of an object.
|
String |
toLocaleString()
Returns a date converted to a string using the current locale.
|
String |
toString()
Returns a string representation of an object.
|
Object |
valueOf()
Returns the primitive value of the specified object.
|
public Function constructor
public static Object prototype
public Object(Object value)
public Object()
public String toString()
@Name(value="toString") public String toJSString()
public String toLocaleString()
public Object valueOf()
public Boolean isPrototypeOf(Object v)
v
- Another object whose prototype chain is to be checked.public static Object $applyStatic()
public static Object getPrototypeOf(Object o)
o
- The object that references the prototype.public static PropertyDescriptor getOwnPropertyDescriptor(Object o, String p)
o
- Object that contains the property.p
- Name of the property.public static Array<String> getOwnPropertyNames(Object o)
o
- Object that contains the own properties.public static Object create(Object o, PropertyDescriptorMap properties)
o
- Object to use as a prototype. May be nullproperties
- JavaScript object that contains one or more property
descriptors.public static Object defineProperty(Object o, String p, PropertyDescriptor attributes)
o
- Object on which to add or modify the property. This can be a
native JavaScript object (that is, a user-defined object or a
built in object) or a DOM object.p
- The property name.attributes
- Descriptor for the property. It can be for a data property or
an accessor property.public static Object defineProperty(Object o, String p, PropertyDescriptor attributes)
o
- Object on which to add or modify the property. This can be a
native JavaScript object (that is, a user-defined object or a
built in object) or a DOM object.p
- The property name.attributes
- Descriptor for the property. It can be for a data property or
an accessor property.public static Object defineProperties(Object o, PropertyDescriptorMap properties)
o
- Object on which to add or modify the properties. This can be a
native JavaScript object or a DOM object.properties
- JavaScript object that contains one or more descriptor
objects. Each descriptor object describes a data property or
an accessor property.public static <T> T seal(T o)
o
- Object on which to lock the attributes.public static <T> T freeze(T o)
o
- Object on which to lock the attributes.public static <T> T preventExtensions(T o)
o
- Object to make non-extensible.public static Boolean isSealed(Object o)
o
- Object to test.public static Boolean isFrozen(Object o)
o
- Object to test.public static Boolean isExtensible(Object o)
o
- Object to test.public static Array<String> keys(Object o)
o
- Object that contains the properties and methods. This can be
an object that you created or an existing Document Object
Model (DOM) object.public Boolean hasOwnProperty(String v)
v
- A property name.public Boolean propertyIsEnumerable(String v)
v
- A property name.public static Object create(Object o)
o
- Object to use as a prototype. May be nullproperties
- JavaScript object that contains one or more property
descriptors.public Boolean hasOwnProperty(double v)
v
- A property name.public Boolean hasOwnProperty(String v)
v
- A property name.public Boolean propertyIsEnumerable(String v)
v
- A property name.public Boolean propertyIsEnumerable(double v)
v
- A property name.public <T> T $get(String key)
this[key]
.public <T> T $get(String key)
this[key]
.public <T> T $set(String key, T value)
this[key]=value
.public <T> T $set(String key, T value)
this[key]=value
.public boolean $delete(String key)
delete this[key]
.public boolean $delete(String key)
delete this[key]
.