public abstract class Layout extends Object
DynamicObject subclass and is used to create shapes.
An object may change its shape but only to shapes of the same layout.
NB: Instances of this class should be created only in static initializers.
Planned to be deprecated.| Modifier and Type | Class and Description |
|---|---|
protected static class |
Layout.Access
Internal package access helper.
|
static class |
Layout.Builder
Layout builder.
|
static class |
Layout.ImplicitCast
Specifies the allowed implicit casts between primitive types without losing type information.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
OPTION_PREFIX |
| Modifier | Constructor and Description |
|---|---|
protected |
Layout()
Constructor for subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
protected Shape |
buildShape(Object dynamicType,
Object sharedData,
int flags,
Assumption singleContextAssumption)
Create a root shape.
|
abstract Shape.Allocator |
createAllocator()
Create an allocator for static property creation.
|
static Layout |
createLayout()
Equivalent to
Layout.newLayout().build(). |
abstract Shape |
createShape(ObjectType objectType)
Create a root shape.
|
abstract Shape |
createShape(ObjectType objectType,
Object sharedData)
Create a root shape.
|
abstract Shape |
createShape(ObjectType objectType,
Object sharedData,
int flags)
Create a root shape.
|
protected static EnumSet<Layout.ImplicitCast> |
getAllowedImplicitCasts(Layout.Builder builder) |
protected static LayoutFactory |
getFactory() |
protected static boolean |
getPolymorphicUnboxing(Layout.Builder builder) |
abstract Class<? extends DynamicObject> |
getType() |
protected static Class<? extends DynamicObject> |
getType(Layout.Builder builder) |
static Layout.Builder |
newLayout()
Creates a new
Layout.Builder. |
public static final String OPTION_PREFIX
public static Layout.Builder newLayout()
Layout.Builder.Layout.Builderpublic static Layout createLayout()
Layout.newLayout().build().Layout.Builder.build()public abstract Class<? extends DynamicObject> getType()
public abstract Shape createShape(ObjectType objectType)
objectType - that describes the object instance with this shape.public abstract Shape createShape(ObjectType objectType, Object sharedData)
objectType - that describes the object instance with this shape.sharedData - for language-specific usepublic abstract Shape createShape(ObjectType objectType, Object sharedData, int flags)
objectType - that describes the object instance with this shape.sharedData - for language-specific useflags - for language-specific use, must be in the range 0-255.protected Shape buildShape(Object dynamicType, Object sharedData, int flags, Assumption singleContextAssumption)
public abstract Shape.Allocator createAllocator()
protected static LayoutFactory getFactory()
protected static EnumSet<Layout.ImplicitCast> getAllowedImplicitCasts(Layout.Builder builder)
protected static boolean getPolymorphicUnboxing(Layout.Builder builder)
protected static Class<? extends DynamicObject> getType(Layout.Builder builder)