com.oracle.truffle.object

## Class LayoutImpl

- java.lang.Object
- - com.oracle.truffle.api.object.Layout
  - - com.oracle.truffle.object.LayoutImpl

Direct Known Subclasses:
  BasicLayout

    public abstract class LayoutImpl
    extends Layout

### Nested Class Summary

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

`Layout.ImplicitCast`

### Field Summary

### Fields inherited from class com.oracle.truffle.api.object.Layout

`INT_TO_DOUBLE, INT_TO_LONG, NONE, OPTION_PREFIX`

### Constructor Summary

Constructors
`protected` `LayoutImpl(java.util.EnumSet<Layout.ImplicitCast> allowedImplicitCasts, java.lang.Class<? extends DynamicObjectImpl> clazz, LayoutStrategy strategy)`

### Method Summary

Methods
`abstract Shape.Allocator` `createAllocator()` Create an allocator for static property creation.
`Shape` `createShape(ObjectType operations)`
`Shape` `createShape(ObjectType operations, java.lang.Object sharedData)`
`protected Location` `existingLocationForValue(java.lang.Object value, Location oldLocation, Shape oldShape)`
`protected abstract Location` `getObjectArrayLocation()`
`protected abstract int` `getObjectFieldCount()`
`protected abstract Location` `getPrimitiveArrayLocation()`
`protected abstract int` `getPrimitiveFieldCount()`
`LayoutStrategy` `getStrategy()`
`java.lang.Class<? extends DynamicObject>` `getType()`
`protected abstract boolean` `hasObjectExtensionArray()`
`protected abstract boolean` `hasPrimitiveExtensionArray()`
`boolean` `isAllowedIntToDouble()`
`boolean` `isAllowedIntToLong()`
`protected boolean` `isLocationAssignableFrom(Location destination, Location source)`
`boolean` `isPropertyUpcastOf(Property thiz, Property other)` Is this property an upcast of the other property?
`abstract DynamicObject` `newInstance(Shape shape)`
`protected abstract int` `objectFieldIndex(Location location)`

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

`createLayout, createLayout, createLayout, createShape, getFactory`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LayoutImpl

    protected LayoutImpl(java.util.EnumSet<Layout.ImplicitCast> allowedImplicitCasts,
              java.lang.Class<? extends DynamicObjectImpl> clazz,
              LayoutStrategy strategy)

### Method Detail

#### newInstance

    public abstract DynamicObject newInstance(Shape shape)

Specified by:
  `newInstance` in class `Layout`

#### getType

    public java.lang.Class<? extends DynamicObject> getType()

Specified by:
  `getType` in class `Layout`

#### createShape

    public final Shape createShape(ObjectType operations,
                    java.lang.Object sharedData)

Specified by:
  `createShape` in class `Layout`

#### createShape

    public final Shape createShape(ObjectType operations)

Specified by:
  `createShape` in class `Layout`

#### isAllowedIntToDouble

    public boolean isAllowedIntToDouble()

#### isAllowedIntToLong

    public boolean isAllowedIntToLong()

#### hasObjectExtensionArray

    protected abstract boolean hasObjectExtensionArray()

#### hasPrimitiveExtensionArray

    protected abstract boolean hasPrimitiveExtensionArray()

#### getObjectFieldCount

    protected abstract int getObjectFieldCount()

#### getPrimitiveFieldCount

    protected abstract int getPrimitiveFieldCount()

#### getObjectArrayLocation

    protected abstract Location getObjectArrayLocation()

#### getPrimitiveArrayLocation

    protected abstract Location getPrimitiveArrayLocation()

#### objectFieldIndex

    protected abstract int objectFieldIndex(Location location)

#### isLocationAssignableFrom

    protected boolean isLocationAssignableFrom(Location destination,
                                   Location source)

#### existingLocationForValue

    protected Location existingLocationForValue(java.lang.Object value,
                                    Location oldLocation,
                                    Shape oldShape)

#### isPropertyUpcastOf

    public boolean isPropertyUpcastOf(Property thiz,
                             Property other)

Is this property an upcast of the other property?

Parameters:
  `other` - the property being compared to
Returns:
  true if this is a upcast of the other property, false otherwise

#### createAllocator

    public abstract Shape.Allocator createAllocator()

Description copied from class: `Layout`
Create an allocator for static property creation. Reserves all array extension slots.

Specified by:
  `createAllocator` in class `Layout`

#### getStrategy

    public LayoutStrategy getStrategy()