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.| 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 |
|---|---|
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 id)
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() |
abstract DynamicObject |
newInstance(Shape shape) |
static Layout.Builder |
newLayout()
Creates a new
Layout.Builder. |
public static final String OPTION_PREFIX
public static Layout.Builder newLayout()
Layout.Builder.public static Layout createLayout()
Layout.newLayout().build().public abstract DynamicObject newInstance(Shape shape)
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 id)
objectType - that describes the object instance with this shape.sharedData - for language-specific useid - for language-specific usepublic abstract Shape.Allocator createAllocator()
protected static LayoutFactory getFactory()
protected static EnumSet<Layout.ImplicitCast> getAllowedImplicitCasts(Layout.Builder builder)
protected static boolean getPolymorphicUnboxing(Layout.Builder builder)