public static final class MessageType.MessageField
extends java.lang.Object
This class is immutable.
Modifier and Type | Method and Description |
---|---|
static MessageType.MessageFieldBuilder |
builder(DataType dataType)
Returns a new instance of a message field builder.
|
java.nio.charset.Charset |
charset()
Returns the associated character set used to serialize
a text field if this field is of
StringType . |
DataType |
dataType()
Returns the eBus data type.
|
boolean |
equals(java.lang.Object o)
Returns
true if o is a
non-null MessageType.Field with the same index
as this field. |
java.lang.invoke.MethodHandle |
field()
Returns the Java class field.
|
int |
fieldSize()
Returns the field size in bytes.
|
int |
hashCode()
Returns the field index as the hash code.
|
int |
index()
Returns the field index.
|
boolean |
isArray()
Returns
true if this is an array field and
false otherwise. |
boolean |
isBoolean()
Returns
true if this message field is either
a boolean primitive or Boolean class. |
boolean |
isMessage()
Returns
true if this message type is for an
EMessage and false if for an
EField . |
boolean |
isOptional()
Returns
true if this field is option and,
therefore, may be set to null . |
java.lang.reflect.Field |
javaField()
Returns Java field.
|
java.lang.Class<?> |
javaType()
Returns the Java class associated with this field.
|
int |
lineCount()
Returns the text expected line count.
|
int |
maximumAllowedSize()
Returns maximum allowed serialized field size in
bytes.
|
java.lang.String |
name()
Returns the field name.
|
java.lang.invoke.MethodHandle |
setter()
Returns the message builder class setter method for
this field.
|
boolean |
subfieldIsFixedSize()
Returns
true if text array subfield is
serialized to a fixed length. |
int |
subfieldMaximumAllowedSize()
If this is a text array field, then returns text
maximum allowed size in bytes.
|
java.lang.String |
toString()
Returns the string representation of this message
field.
|
public boolean equals(java.lang.Object o)
true
if o
is a
non-null MessageType.Field
with the same index
as this
field.equals
in class java.lang.Object
o
- comparison object.true
if o
equals this
layout field.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int index()
public java.lang.String name()
public java.lang.invoke.MethodHandle field()
public java.lang.reflect.Field javaField()
public java.lang.Class<?> javaType()
public DataType dataType()
public int fieldSize()
DataType.VARIABLE_SIZE
.public boolean isBoolean()
true
if this message field is either
a boolean
primitive or Boolean
class.public final boolean isMessage()
true
if this message type is for an
EMessage
and false
if for an
EField
.true
if the underlying type is an
EMessage
.public boolean isArray()
true
if this is an array field and
false
otherwise.true
if this is an array field and
false
otherwise.public java.nio.charset.Charset charset()
StringType
.
Otherwise returns null
.null
otherwise.public int lineCount()
public int maximumAllowedSize()
public int subfieldMaximumAllowedSize()
public boolean subfieldIsFixedSize()
true
if text array subfield is
serialized to a fixed length.true
if text array subfield is
serialized to a fixed length.public boolean isOptional()
true
if this field is option and,
therefore, may be set to null
.true
if field is optional.public java.lang.invoke.MethodHandle setter()
public static MessageType.MessageFieldBuilder builder(DataType dataType)
dataType
- message field data type.Copyright © 2001 - 2024. Charles W. Rapp. All rights reserved.