public abstract class DataBuilder extends Object
| Constructor and Description |
|---|
DataBuilder() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canForceAlignmentOf(int sizeInBytes)
Determines whether a data constant can be forced to be aligned by
sizeInBytes. |
abstract DataSection.Data |
createDataItem(Constant c) |
DataSection.Data |
createMultiDataItem(Constant... constants) |
DataSection.Data |
createPackedDataItem(DataSection.Data[] nested) |
DataSection.Data |
createPackedDataItem(int alignment,
int size,
DataSection.Data[] nested) |
DataSection.Data |
createSerializableData(SerializableConstant constant) |
DataSection.Data |
createSerializableData(SerializableConstant constant,
int alignment) |
DataSection.Data |
createZeroData(int alignment,
int size) |
int |
ensureValidDataAlignment(int requestedAlignment)
Gets the alignment supported by the runtime for
requestedAlignment. |
int |
getMaxSupportedAlignment() |
void |
updateAlignment(DataSection.Data data,
int newAlignment)
Updates the alignment of the given data element and ensures that it is actually supported by
the runtime.
|
public abstract DataSection.Data createDataItem(Constant c)
public DataSection.Data createSerializableData(SerializableConstant constant, int alignment)
public DataSection.Data createSerializableData(SerializableConstant constant)
public DataSection.Data createZeroData(int alignment, int size)
public DataSection.Data createPackedDataItem(int alignment, int size, DataSection.Data[] nested)
public DataSection.Data createPackedDataItem(DataSection.Data[] nested)
public DataSection.Data createMultiDataItem(Constant... constants)
public int ensureValidDataAlignment(int requestedAlignment)
requestedAlignment. The returned
value will always be equal to or less than requestedAlignment.requestedAlignment - The requested data alignment (in bytes)public void updateAlignment(DataSection.Data data, int newAlignment)
data - The datanewAlignment - The new alignmentpublic int getMaxSupportedAlignment()
public boolean canForceAlignmentOf(int sizeInBytes)
sizeInBytes.sizeInBytes - The requested alignment