|
|||||||||
| 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
|
protected JField[] |
subFields
|
| Constructor Summary | |
|---|---|
JField(AnnotatedField afield,
JField[] children)
|
|
| Method Summary | ||
|---|---|---|
java.lang.String |
getDisplay(JHeader header)
|
|
int |
getLength(JHeader header)
|
|
long |
getMask(JHeader header)
|
|
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)
|
|
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)
|
|
|
getValue(java.lang.Class<T> c,
JHeader header)
|
|
java.lang.Object |
getValue(JHeader header)
|
|
java.lang.String |
getValueDescription(JHeader header)
|
|
boolean |
hasField(JHeader header)
|
|
boolean |
hasSubFields()
Does this field have subfields |
|
long |
longValue(JHeader header)
|
|
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)
|
|
static void |
sortFieldByOffset(JField[] fields,
JHeader header,
boolean ascending)
|
|
java.lang.String |
toString()
|
|
| 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)
| Method Detail |
|---|
public static void sortFieldByOffset(JField[] fields,
JHeader header,
boolean ascending)
public java.lang.String toString()
toString in class java.lang.Objectpublic 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 - public java.lang.String getUnits(JHeader header)
public boolean hasField(JHeader header)
public java.lang.String getDisplay(JHeader header)
public int getLength(JHeader header)
public long getMask(JHeader header)
public int getOffset(JHeader header)
public java.lang.String getValueDescription(JHeader header)
public <T> T getValue(java.lang.Class<T> c,
JHeader header)
public java.lang.Object getValue(JHeader header)
public long longValue(JHeader header)
header -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||