public static class DataSource.FieldReference
extends java.lang.Object
FieldReference
in the sense that it puts together the legacy field name to the reference of its buffer.
This is a non-mutable object.| Modifier and Type | Field and Description |
|---|---|
private BufferImpl |
buffer
The buffer whose field this object represents.
|
private int |
extent
The EXTENT attribute of this field, if any, otherwise 0.
|
private int |
index
The EXTENT index of this field, if any, otherwise 0.
|
private java.lang.String |
name
The legacy name of the field.
|
private java.lang.Integer |
offset
The field's resolved offset in the record's datum, for direct access.
|
private java.lang.Class<? extends BaseDataType> |
type
The field's resolved type.
|
| Constructor and Description |
|---|
FieldReference(BufferImpl buffer,
java.lang.String name,
java.lang.Class<? extends BaseDataType> type,
java.lang.Integer offset)
The constructor initialize both non mutable fields.
|
| Modifier and Type | Method and Description |
|---|---|
BufferImpl |
getBuffer()
Obtains the buffer whose field this object represents.
|
int |
getExtent()
Obtains the extent of this field.
|
int |
getIndex()
Obtains the index (1-base) of extent field.
|
java.lang.String |
getName()
Obtains the legacy name of the field.
|
java.lang.Integer |
getOffset()
Get the field's
offset in the record datum. |
java.lang.Class<? extends BaseDataType> |
getType()
Get the field's data
HandleResource.type(). |
java.lang.String |
toString()
Gets a string representation of the object which contains the name buffer and the name of
the field.
|
private final BufferImpl buffer
private final java.lang.String name
private final int extent
private final int index
extent must also be > 0.private final java.lang.Class<? extends BaseDataType> type
private final java.lang.Integer offset
public FieldReference(BufferImpl buffer, java.lang.String name, java.lang.Class<? extends BaseDataType> type, java.lang.Integer offset)
buffer - The buffer whose field this object represents.name - The legacy name of the field.type - The field's datatype.offset - The field offset in the record datum.public java.lang.Integer getOffset()
offset in the record datum.public java.lang.Class<? extends BaseDataType> getType()
HandleResource.type().public BufferImpl getBuffer()
public java.lang.String getName()
public int getExtent()
public int getIndex()
public java.lang.String toString()
toString in class java.lang.Object