|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jnetpcap.packet.structure.JField
public class JField
A field within a header. Field objects are used to describe the structure of a header to a formatter. The formatter iterates through all the fields it receives from a header and using formatting information stored in these fields, creates formatted output.
| Field Summary | |
|---|---|
protected JFormatter.Style |
style
The style. |
protected JField[] |
subFields
The sub fields. |
| Constructor Summary | |
|---|---|
JField(AnnotatedField afield,
JField[] children)
Instantiates a new j field. |
|
| Method Summary | ||
|---|---|---|
java.lang.String |
getDisplay(JHeader header)
Gets the display. |
|
int |
getLength(JHeader header)
Gets the length. |
|
long |
getMask(JHeader header)
Gets the mask. |
|
java.lang.String |
getName()
Gets the full name of this field |
|
java.lang.String |
getNicname()
Gets the nicname of this field. |
|
int |
getOffset(JHeader header)
Gets the offset. |
|
JField |
getParent()
If this field is a sub-field, this method returns a reference to the parent field. |
|
JFormatter.Priority |
getPriority()
Gets the current field's priority. |
|
JFormatter.Style |
getStyle()
Formatting style for this field. |
|
JField[] |
getSubFields()
Gets the sub-fields. |
|
java.lang.String |
getUnits(JHeader header)
Gets the units. |
|
|
getValue(java.lang.Class<T> c,
JHeader header)
Gets the value. |
|
java.lang.Object |
getValue(JHeader header)
Gets the value. |
|
java.lang.String |
getValueDescription(JHeader header)
Gets the value description. |
|
boolean |
hasField(JHeader header)
Checks for field. |
|
boolean |
hasSubFields()
Does this field have subfields. |
|
long |
longValue(JHeader header)
Long value. |
|
void |
setParent(JField parent)
Sets the parent of this sub-field and only when this field is a sub-field. |
|
void |
setStyle(JFormatter.Style style)
Sets the style. |
|
static void |
sortFieldByOffset(JField[] fields,
JHeader header,
boolean ascending)
Sort field by offset. |
|
java.lang.String |
toString()
To string. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected JField[] subFields
protected JFormatter.Style style
| Constructor Detail |
|---|
public JField(AnnotatedField afield,
JField[] children)
afield - the afieldchildren - the children| Method Detail |
|---|
public static void sortFieldByOffset(JField[] fields,
JHeader header,
boolean ascending)
fields - the fieldsheader - the headerascending - the ascendingpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public JField[] getSubFields()
public final java.lang.String getName()
public java.lang.String getNicname()
public final JField getParent()
public JFormatter.Priority getPriority()
public JFormatter.Style getStyle()
public boolean hasSubFields()
public final void setParent(JField parent)
parent - the parent to setpublic void setStyle(JFormatter.Style style)
style - the new stylepublic java.lang.String getUnits(JHeader header)
header - the header
public boolean hasField(JHeader header)
header - the header
public java.lang.String getDisplay(JHeader header)
header - the header
public int getLength(JHeader header)
header - the header
public long getMask(JHeader header)
header - the header
public int getOffset(JHeader header)
header - the header
public java.lang.String getValueDescription(JHeader header)
header - the header
public <T> T getValue(java.lang.Class<T> c,
JHeader header)
T - the generic typec - the cheader - the header
public java.lang.Object getValue(JHeader header)
header - the header
public long longValue(JHeader header)
header - the header
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||