Java Reference
In-Depth Information
Table 4-11. The List of Properties and Methods of Object with Their Descriptions
Property/Method
Description
Object.prototype
It is the prototype object for Object . Its
writable , enumerable , and configurable
properties are set to false
Object.prototype.constructor
Contains reference to the constructor
function that creates the object
Object.create(p, descriptor)
Creates a new object setting the specified p
as the prototype and adding all properties
in the descriptor to the new object. The
descriptor parameter is optional
Object.defineProperties(obj,
descriptors)
Creates or updates properties of the
specified object
Object.defineProperty(obj, prop,
descriptor)
Creates or updates the specified property
with of the specified object
Object.freeze(obj)
Freezes the specified object by making
it nonextensible, nonconfigurable, and
making all its properties read-only
Object.getOwnPropertyDescriptor(obj,
prop)
Returns a property descriptor for the
specified property of the specified object
Object.getOwnPropertyNames(obj)
Returns an array containing names of all
own properties of the specified object. The
array also includes the nonenumerable
properties
Object.getPrototypeOf(obj)
Returns the prototype of the specified
object
Object.isExtensible(obj)
Returns true of the specified object is
extensible, false otherwise
Object.isFrozen(obj)
Returns true of the specified object is
frozen, false otherwise
Object.isSealed(obj)
Returns true of the specified object is
sealed, false otherwise
Object.keys(obj)
Returns an array containing the names of
all enumerable, noninherited properties of
the specified object
Object.preventExtensions(object)
Makes the specified object nonextensible
so that no new properties can be added to
the object
( continued )
Search WWH ::




Custom Search