Package com.oracle.truffle.object

## Class Locations.ValueLocation

- java.lang.Object
- - com.oracle.truffle.api.object.Location
  - - com.oracle.truffle.object.LocationImpl
    - - com.oracle.truffle.object.Locations.ValueLocation

All Implemented Interfaces:
  `BaseLocation`

Direct Known Subclasses:
  `Locations.ConstantLocation`, `Locations.DeclaredLocation`

Enclosing class:
  Locations

    public abstract static class Locations.ValueLocation
    extends LocationImpl

### Nested Class Summary

### Nested classes/interfaces inherited from class com.oracle.truffle.object.LocationImpl

`LocationImpl.EffectivelyFinalLocation<T extends Location>, LocationImpl.InternalLongLocation, LocationImpl.TypedObjectLocation<T extends Location & ObjectLocation>`

### Constructor Summary

Constructors
`ValueLocation​(java.lang.Object value)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected boolean` `canStoreFinal​(DynamicObject store, java.lang.Object val)`
`boolean` `equals​(java.lang.Object obj)`
`java.lang.Object` `get​(DynamicObject store, boolean condition)` Get object value as object at this location in store.
`int` `hashCode()`
`void` `set​(DynamicObject store, java.lang.Object value, Shape shape)` Set object value at this location in store.
`void` `setInternal​(DynamicObject store, java.lang.Object value)` Like `Location.set(DynamicObject, Object, Shape)`, but does not invalidate final locations.
`java.lang.String` `toString()`

### Methods inherited from class com.oracle.truffle.object.LocationImpl

`canSet, canStore, getInternal, getWhereString, isConstant, isFinal, objectArrayCount, objectFieldCount, primitiveArrayCount, primitiveFieldCount, valueEquals`

### Methods inherited from class com.oracle.truffle.api.object.Location

`checkShape, finalLocation, get, incompatibleLocation, set, set`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ValueLocation

    public ValueLocation​(java.lang.Object value)

### Method Detail

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `LocationImpl`

#### equals

    public boolean equals​(java.lang.Object obj)

Overrides:
  `equals` in class `LocationImpl`

#### get

    public final java.lang.Object get​(DynamicObject store,
                                      boolean condition)

Description copied from interface: `BaseLocation`
Get object value as object at this location in store. For internal use only and subject to change, use `BaseLocation.get(DynamicObject, Shape)` instead.

Specified by:
  `get` in interface `BaseLocation`
Overrides:
  `get` in class `Location`
  `condition` - the result of a shape check or `false`
See Also:
  `BaseLocation.get(DynamicObject, Shape)`

#### set

    public final void set​(DynamicObject store,
                          java.lang.Object value,
                          Shape shape)
                   throws IncompatibleLocationException,
                          FinalLocationException

Description copied from interface: `BaseLocation`
Set object value at this location in store.

Specified by:
  `set` in interface `BaseLocation`
Overrides:
  `set` in class `LocationImpl`
  `shape` - the current shape of the storage object
Throws:
  `IncompatibleLocationException` - for storage type invalidations
  `FinalLocationException` - for effectively final fields

#### canStoreFinal

    protected boolean canStoreFinal​(DynamicObject store,
                                    java.lang.Object val)

Overrides:
  `canStoreFinal` in class `LocationImpl`

#### setInternal

    public final void setInternal​(DynamicObject store,
                                  java.lang.Object value)
                           throws IncompatibleLocationException

Description copied from class: `Location`
Like `Location.set(DynamicObject, Object, Shape)`, but does not invalidate final locations. For internal use only and subject to change, use `DynamicObjectFactory` to create objects with predefined properties.

Specified by:
  `setInternal` in class `LocationImpl`
Throws:
  `IncompatibleLocationException` - if value is of non-assignable type

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `LocationImpl`