|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FennelStoredTypeDescriptor
FennelStoredTypeDescriptor provides an abstraction to describe a type of data element supported by the tuple library.
StoredTypeDescriptors are created by FennelStoredTypeDescriptorFactory objects.
Each FennelStoredTypeDescriptor has a unique ordinal number assigned to it, which should match across all implementations of tuple libraries that would interact. How to maintain these ordinals in synch is left as an exercise for the reader.
NOTE: this interface varies from the C++ implementation by requiring the stored type to know how to create a FennelAttributeAccessor for itself. This seems cleaner than trying to infer it within the standard FennelTupleAccessor. This class is JDK 1.4 compatible.
Method Summary | |
---|---|
int |
getAlignmentByteCount(int width)
Gets the alignment size in bytes required for values of this type, given a particular max byte count. |
int |
getBitCount()
Returns number of bits in marshalled representation, or 0 for a non-bit type; currently only 0 or 1 is supported. |
int |
getFixedByteCount()
Returns the width in bytes for a fixed-width non-bit type which admits no per-attribute precision, or 0 for types with per-attribute precision; for bit types, this yields the size of the unmarshalled representation. |
int |
getMinByteCount(int maxWidth)
Gets the number of bytes required to store the narrowest value with this type, given a particular max byte count. |
int |
getOrdinal()
Returns the ordinal representing this type. |
boolean |
isExact()
Indicates whether numeric data type is exact. |
boolean |
isSigned()
Indicates whether numeric data type is signed. |
FennelAttributeAccessor |
newAttributeAccessor()
Creates an FennelAttributeAccessor appropriate for marshalling an element of this type. |
Method Detail |
---|
int getOrdinal()
int getBitCount()
int getFixedByteCount()
int getMinByteCount(int maxWidth)
maxWidth
- maximum width for which to compute the minimum
int getAlignmentByteCount(int width)
width
- width for which to compute the alignment
FennelAttributeAccessor newAttributeAccessor()
boolean isSigned()
boolean isExact()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |