public abstract static class ShapeImpl.BaseAllocator extends Shape.Allocator implements LocationImpl.LocationVisitor, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected int |
depth |
protected boolean |
hasPrimitiveArray |
protected LayoutImpl |
layout |
protected int |
objectArraySize |
protected int |
objectFieldSize |
protected int |
primitiveArraySize |
protected int |
primitiveFieldSize |
protected boolean |
shared |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseAllocator(LayoutImpl layout) |
protected |
BaseAllocator(ShapeImpl shape) |
| Modifier and Type | Method and Description |
|---|---|
ShapeImpl.BaseAllocator |
addLocation(Location location)
Reserves space for the given location, so that it will not be available to subsequently
allocated locations.
|
protected <T extends Location> |
advance(T location0) |
protected ShapeImpl.BaseAllocator |
clone() |
Location |
constantLocation(Object value)
Creates a new location from a constant value.
|
ShapeImpl.BaseAllocator |
copy()
Creates an copy of this allocator state.
|
Location |
declaredLocation(Object value)
Creates a new declared location with a default value.
|
Location |
existingLocationForValue(Object value,
Location oldLocation,
ShapeImpl oldShape) |
protected Location |
locationForType(Class<?> type,
boolean useFinal,
boolean nonNull) |
protected Location |
locationForValue(Object value,
boolean useFinal,
boolean nonNull) |
protected abstract Location |
locationForValueUpcast(Object value,
Location oldLocation) |
protected abstract Location |
moveLocation(Location oldLocation) |
protected abstract Location |
newBooleanLocation(boolean useFinal) |
protected abstract Location |
newDoubleLocation(boolean useFinal) |
protected abstract Location |
newIntLocation(boolean useFinal) |
protected abstract Location |
newLongLocation(boolean useFinal) |
protected abstract Location |
newObjectLocation(boolean useFinal,
boolean nonNull) |
protected abstract Location |
newTypedObjectLocation(boolean useFinal,
Class<?> type,
boolean nonNull) |
void |
visitObjectArray(int index,
int count) |
void |
visitObjectField(int index,
int count) |
void |
visitPrimitiveArray(int index,
int count) |
void |
visitPrimitiveField(int index,
int count) |
locationForType, locationForType, locationForValue, locationForValueprotected final LayoutImpl layout
protected int objectArraySize
protected int objectFieldSize
protected int primitiveFieldSize
protected int primitiveArraySize
protected boolean hasPrimitiveArray
protected int depth
protected boolean shared
protected BaseAllocator(LayoutImpl layout)
protected BaseAllocator(ShapeImpl shape)
protected abstract Location newObjectLocation(boolean useFinal, boolean nonNull)
protected abstract Location newTypedObjectLocation(boolean useFinal, Class<?> type, boolean nonNull)
protected abstract Location newIntLocation(boolean useFinal)
protected abstract Location newDoubleLocation(boolean useFinal)
protected abstract Location newLongLocation(boolean useFinal)
protected abstract Location newBooleanLocation(boolean useFinal)
public final Location constantLocation(Object value)
Shape.AllocatorconstantLocation in class Shape.Allocatorpublic Location declaredLocation(Object value)
Shape.AllocatordeclaredLocation in class Shape.Allocatorprotected Location locationForValue(Object value, boolean useFinal, boolean nonNull)
locationForValue in class Shape.Allocatorprotected abstract Location locationForValueUpcast(Object value, Location oldLocation)
protected Location locationForType(Class<?> type, boolean useFinal, boolean nonNull)
locationForType in class Shape.Allocatorprotected <T extends Location> T advance(T location0)
public ShapeImpl.BaseAllocator addLocation(Location location)
Shape.AllocatoraddLocation in class Shape.Allocatorpublic void visitObjectField(int index,
int count)
visitObjectField in interface LocationImpl.LocationVisitorpublic void visitObjectArray(int index,
int count)
visitObjectArray in interface LocationImpl.LocationVisitorpublic void visitPrimitiveArray(int index,
int count)
visitPrimitiveArray in interface LocationImpl.LocationVisitorpublic void visitPrimitiveField(int index,
int count)
visitPrimitiveField in interface LocationImpl.LocationVisitorpublic final ShapeImpl.BaseAllocator copy()
Shape.Allocatorcopy in class Shape.Allocatorprotected final ShapeImpl.BaseAllocator clone()