com.oracle.truffle.object

## Class Locations.DeclaredDualLocation

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

All Implemented Interfaces:
  BaseLocation, TypedLocation

Enclosing class:
  Locations

    public static class Locations.DeclaredDualLocation
    extends Locations.DualLocation

### 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>`

### Field Summary

### Fields inherited from class com.oracle.truffle.object.Locations.DualLocation

`layout, objectLocation, primitiveLocation`

### Constructor Summary

Constructors
Constructor and Description
`Locations.DeclaredDualLocation(LocationImpl.InternalLongLocation primitiveLocation, ObjectLocation objectLocation, java.lang.Object defaultValue, LayoutImpl layout)`

### Method Summary

Methods
`boolean` `canStore(java.lang.Object value)` Returns `true` if the location is compatible with the value.
`Locations.DualLocation` `changeType(java.lang.Class<?> newType)`
`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` `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.Locations.DualLocation

`getObjectLocation, getType, isNonNull, objectArrayCount, objectFieldCount, primitiveArrayCount, primitiveFieldCount`

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

`canSet, canStoreFinal, getInternal, getWhereString, isConstant, isFinal, set, 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`

### Methods inherited from interface com.oracle.truffle.api.object.BaseLocation

`get, set, set, set`

### Constructor Detail

#### Locations.DeclaredDualLocation

    public Locations.DeclaredDualLocation(LocationImpl.InternalLongLocation primitiveLocation,
                                  ObjectLocation objectLocation,
                                  java.lang.Object defaultValue,
                                  LayoutImpl layout)

### Method Detail

#### get

    public 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 `Locations.DualLocation`
  `condition` - the result of a shape check or `false`
See Also:
  `BaseLocation.get(DynamicObject, Shape)`

#### setInternal

    public 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.

Overrides:
  `setInternal` in class `Locations.DualLocation`
Throws:
  `IncompatibleLocationException` - if value is of non-assignable type

#### equals

    public boolean equals(java.lang.Object obj)

Overrides:
  `equals` in class `Locations.DualLocation`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Locations.DualLocation`

#### changeType

    public Locations.DualLocation changeType(java.lang.Class<?> newType)

Overrides:
  `changeType` in class `Locations.DualLocation`

#### canStore

    public boolean canStore(java.lang.Object value)

Description copied from class: `Location`
Returns `true` if the location is compatible with the value. The value may still be rejected if `Location.canSet(DynamicObject, Object)` returns false.

Overrides:
  `canStore` in class `Locations.DualLocation`
Parameters:
  `value` - the value in question

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `Locations.DualLocation`