| Modifier | Constructor and Description |
|---|---|
protected |
Allocator() |
| Modifier and Type | Method and Description |
|---|---|
abstract Shape.Allocator |
addLocation(Location location)
Reserves space for the given location, so that it will not be available to subsequently
allocated locations.
|
abstract Location |
constantLocation(Object value)
Creates a new location from a constant value.
|
abstract Shape.Allocator |
copy()
Creates an copy of this allocator state.
|
abstract Location |
declaredLocation(Object value)
Creates a new declared location with a default value.
|
Location |
locationForType(Class<?> type)
Create a new location for a fixed type.
|
protected abstract Location |
locationForType(Class<?> type,
boolean useFinal,
boolean nonNull) |
Location |
locationForType(Class<?> type,
EnumSet<LocationModifier> modifiers)
Create a new location for a fixed type.
|
Location |
locationForValue(Object value)
Create a new location compatible with the given initial value.
|
public final Location locationForValue(Object value)
Shape.Allocator.locationForType(Class) or Shape.defineProperty(Object, Object, int)
instead.value - the initial value this location is going to be assignedprotected abstract Location locationForType(Class<?> type, boolean useFinal, boolean nonNull)
public final Location locationForType(Class<?> type)
type - the Java type this location must be compatible with (may be primitive)public final Location locationForType(Class<?> type, EnumSet<LocationModifier> modifiers)
type - the Java type this location must be compatible with (may be primitive)modifiers - additional restrictions and semanticspublic abstract Location constantLocation(Object value)
public abstract Location declaredLocation(Object value)
public abstract Shape.Allocator addLocation(Location location)
public abstract Shape.Allocator copy()