public final class Obj
extends java.lang.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.
|
boolean |
containsObjectLabel(ObjectLabel objlabel)
Checks whether this object contains the given object label.
|
void |
diff(Obj old,
java.lang.StringBuilder b)
Returns a description of the changes from the old object to this object.
|
boolean |
equals(java.lang.Object obj)
Checks whether the given abstract object is equal to this one.
|
Obj |
freeze()
Makes this object non-writable (to allow sharing).
|
java.util.Set<ObjectLabel> |
getAllObjectLabels()
Returns the set of all object labels used in this abstract object
'unknown' values are ignored.
|
Value |
getDefaultNumericProperty()
Returns the value of the default numeric property.
|
Value |
getDefaultOtherProperty()
Returns the value of the default non-numeric 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.
|
java.util.Map<PKey,Value> |
getProperties()
Returns all properties, excluding the defaults and internal properties.
|
Value |
getProperty(PKey propertyname)
Returns the value of the given property, considering defaults if necessary.
|
java.util.Set<PKey> |
getPropertyNames()
Returns all property names, excluding the defaults and internal properties.
|
ScopeChain |
getScopeChain()
Returns the value of the internal [[Scope]] property.
|
Value |
getValue(ObjectProperty prop)
Returns the designated property value of this object.
|
int |
hashCode()
Computes the hash code for this abstract object.
|
boolean |
isAllNone()
Checks whether all properties have the none value.
|
boolean |
isScopeChainUnknown()
Returns true if internal [[Scope]] property is 'unknown'.
|
boolean |
isSomeModified()
Checks whether some property is maybe modified.
|
boolean |
isSomeNone()
Checks whether some property has the none value.
|
boolean |
isUnknown()
Checks whether all properties have 'unknown' value.
|
boolean |
isWritable()
Checks whether this object is writable.
|
boolean |
isWritableProperties()
Checks whether the properties of this object are writable.
|
void |
localize(Obj obj,
ObjectLabel objlabel,
State s)
Trims this object according to the given existing object.
|
static Obj |
makeAbsentModified()
Returns an abstract object where all properties are absent (but modified) and scope is set to empty.
|
static Obj |
makeNone()
Returns an abstract object where all properties are none and scope is set to empty.
|
static Obj |
makeNoneModified()
Returns an abstract object where all properties are none, but modified, and scope is set to empty.
|
static Obj |
makeUnknown()
Returns an abstract object where all properties have 'unknown' value.
|
void |
materialize(java.util.Set<java.lang.String> propertynames)
Materializes the given property names.
|
java.lang.String |
printModified()
Prints the maybe modified properties.
|
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,
java.util.Map<ScopeChain,ScopeChain> cache)
Replaces all occurrences of oldlabel by newlabel.
|
static void |
reset()
Resets the global counters.
|
void |
setDefaultNumericProperty(Value v)
Sets the value of the default numeric property.
|
void |
setDefaultOtherProperty(Value v)
Sets the value of the default non-numeric property.
|
void |
setInternalPrototype(Value v)
Sets the internal [[Prototype]] property.
|
void |
setInternalValue(Value v)
Sets the internal [[Value]] property.
|
void |
setProperties(java.util.Map<PKey,Value> properties)
Sets the property map.
|
void |
setProperty(PKey propertyname,
Value v)
Sets the given property.
|
void |
setScopeChain(ScopeChain scope)
Sets the internal [[Scope]] property.
|
void |
setScopeChainUnknown()
Sets the internal [[Scope]] property to 'unknown'.
|
void |
setValue(ObjectProperty prop,
Value v)
Sets the designated property value of this object.
|
Obj |
summarize(Summarized s)
Summarizes the object labels in this object.
|
java.lang.String |
toString()
Produces a string description of this abstract object.
|
public Obj(Obj x)
public boolean addToScopeChain(ScopeChain newscope)
public void clearModified()
public boolean containsObjectLabel(ObjectLabel objlabel)
public void diff(Obj old, java.lang.StringBuilder b)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Obj freeze()
public java.util.Set<ObjectLabel> getAllObjectLabels()
public Value getDefaultNumericProperty()
public Value getDefaultOtherProperty()
public Value getInternalPrototype()
public Value getInternalValue()
public static int getNumberOfMakeWritablePropertiesCalls()
public static int getNumberOfObjsCreated()
public java.util.Map<PKey,Value> getProperties()
public Value getProperty(PKey propertyname)
public java.util.Set<PKey> getPropertyNames()
public ScopeChain getScopeChain()
public Value getValue(ObjectProperty prop)
public int hashCode()
hashCode
in class java.lang.Object
public boolean isAllNone()
public boolean isScopeChainUnknown()
public boolean isSomeModified()
public boolean isSomeNone()
public boolean isUnknown()
public boolean isWritable()
public boolean isWritableProperties()
public void localize(Obj obj, ObjectLabel objlabel, State s)
public static Obj makeAbsentModified()
public static Obj makeNone()
public static Obj makeNoneModified()
public static Obj makeUnknown()
public void materialize(java.util.Set<java.lang.String> propertynames)
public java.lang.String printModified()
public void replaceNonModifiedParts(Obj other)
public void replaceObjectLabel(ObjectLabel oldlabel, ObjectLabel newlabel, java.util.Map<ScopeChain,ScopeChain> cache)
public static void reset()
Value.reset()
must be called before, not after, this method.public void setDefaultNumericProperty(Value v)
public void setDefaultOtherProperty(Value v)
public void setInternalPrototype(Value v)
public void setInternalValue(Value v)
public void setProperties(java.util.Map<PKey,Value> properties)
public void setScopeChain(ScopeChain scope)
public void setScopeChainUnknown()
public void setValue(ObjectProperty prop, Value v)
public Obj summarize(Summarized s)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009-2019 Aarhus University