public final class Obj extends Object
| Constructor and Description |
|---|
Obj(Obj x)
Creates a new abstract object as a copy of the given.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addToScopeChain(ScopeChain newscope)
Adds to the internal [[Scope]] property.
|
void |
clearModified()
Clears modified flags for all values.
|
void |
diff(Obj old,
StringBuilder b)
Returns a description of the changes from the old object to this object.
|
boolean |
equals(Object obj)
Checks whether the given abstract object is equal to this one.
|
Set<ObjectLabel> |
getAllObjectLabels()
Returns the set of all object labels used in this abstract object
'unknown' values are ignored.
|
Value |
getDefaultArrayProperty()
Returns the value of the default array property.
|
Value |
getDefaultNonArrayProperty()
Returns the value of the default non-array property.
|
Value |
getInternalPrototype()
Returns the value of the internal [[Prototype]] property.
|
Value |
getInternalValue()
Returns the value of the internal [[Value]] property.
|
static int |
getNumberOfMakeWritablePropertiesCalls()
Returns the total number of makeWritableProperties operations.
|
static int |
getNumberOfObjsCreated()
Returns the total number of Obj objects created.
|
int |
getNumberOfProperties()
Returns the size of the properties map.
|
Map<String,Value> |
getProperties()
Returns all properties, excluding the defaults and internal properties.
|
Value |
getProperty(String propertyname)
Returns the value of the given property, considering defaults if necessary.
|
Set<String> |
getPropertyNames()
Returns all property names, excluding the defaults and internal properties.
|
ScopeChain |
getScopeChain()
Returns the value of the internal [[Scope]] property.
|
Value |
getValue(PropertyReference prop)
Returns the designated value.
|
int |
hashCode()
Computes the hash code for this abstract object.
|
boolean |
isNone()
Checks whether all properties have the none value.
|
boolean |
isScopeChainUnknown()
Returns true if internal [[Scope]] property is 'unknown'.
|
boolean |
isSomeNonArrayPropertyUnknown()
Checks whether some non-array property is unknown, including the default.
|
boolean |
isUnknown()
Checks whether all properties have 'unknown' value.
|
static Obj |
makeAbsentModified()
Constructs an abstract object where all properties are absent (but modified) and scope is set to empty.
|
static Obj |
makeNone()
Constructs an abstract object where all properties are none and scope is set to empty.
|
static Obj |
makeUnknown()
Constructs an abstract object where all properties have 'unknown' value.
|
String |
printModified()
Prints the maybe modified properties.
|
void |
remove(Obj obj)
Removes the parts of this object that are also in the given object.
|
void |
replaceNonModifiedParts(Obj other)
Replaces all definitely non-modified properties in this object by the corresponding properties of other.
|
void |
replaceObjectLabel(ObjectLabel oldlabel,
ObjectLabel newlabel,
Map<ScopeChain,ScopeChain> cache)
Replaces all occurrences of oldlabel by newlabel.
|
void |
replaceObjectLabels(Map<ObjectLabel,ObjectLabel> m,
Map<ScopeChain,ScopeChain> cache)
Replaces all object labels according to the given map.
|
static void |
reset()
Resets the global counters.
|
void |
setDefaultArrayProperty(Value v)
Sets the value of the default array property.
|
void |
setDefaultNonArrayProperty(Value v)
Sets the value of the default non-array property.
|
void |
setInternalPrototype(Value v)
Sets the internal [[Prototype]] property.
|
void |
setInternalValue(Value v)
Sets the internal [[Value]] property.
|
void |
setProperties(Map<String,Value> properties)
Sets the property map.
|
void |
setProperty(String propertyname,
Value v)
Sets the given property.
|
void |
setScopeChain(ScopeChain scope)
Sets the internal [[Scope]] property.
|
void |
setTo(Obj x)
Sets this object to be a copy of the given.
|
void |
summarize(Summarized s)
Summarizes the object labels in this object.
|
String |
toString()
Produces a string description of this abstract object.
|
void |
trim(Obj obj)
Trims this object according to the given existing object.
|
public Obj(Obj x)
public boolean addToScopeChain(ScopeChain newscope)
public void clearModified()
public void diff(Obj old, StringBuilder b)
public boolean equals(Object obj)
public Set<ObjectLabel> getAllObjectLabels()
public Value getDefaultArrayProperty()
public Value getDefaultNonArrayProperty()
public Value getInternalPrototype()
public Value getInternalValue()
public static int getNumberOfMakeWritablePropertiesCalls()
public static int getNumberOfObjsCreated()
public int getNumberOfProperties()
public Map<String,Value> getProperties()
public Value getProperty(String propertyname)
public Set<String> getPropertyNames()
public ScopeChain getScopeChain()
public Value getValue(PropertyReference prop)
public int hashCode()
public boolean isNone()
public boolean isScopeChainUnknown()
public boolean isSomeNonArrayPropertyUnknown()
public boolean isUnknown()
public static Obj makeAbsentModified()
public static Obj makeNone()
public static Obj makeUnknown()
public String printModified()
public void remove(Obj obj)
public void replaceNonModifiedParts(Obj other)
public void replaceObjectLabel(ObjectLabel oldlabel, ObjectLabel newlabel, Map<ScopeChain,ScopeChain> cache)
public void replaceObjectLabels(Map<ObjectLabel,ObjectLabel> m, Map<ScopeChain,ScopeChain> cache)
public static void reset()
public void setDefaultArrayProperty(Value v)
public void setDefaultNonArrayProperty(Value v)
public void setInternalPrototype(Value v)
public void setInternalValue(Value v)
public void setProperties(Map<String,Value> properties)
public void setScopeChain(ScopeChain scope)
public void setTo(Obj x)
public void summarize(Summarized s)
public String toString()
public void trim(Obj obj)
Copyright © 2012 Aarhus University