org.jnetpcap.packet.structure
Class AnnotatedFieldMethod

java.lang.Object
  extended by org.jnetpcap.packet.structure.AnnotatedMethod
      extended by org.jnetpcap.packet.structure.AnnotatedFieldMethod

public abstract class AnnotatedFieldMethod
extends AnnotatedMethod

The Class AnnotatedFieldMethod.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Field Summary
protected  java.lang.String field
          The field.
protected  Field.Property function
          The function.
 
Fields inherited from class org.jnetpcap.packet.structure.AnnotatedMethod
declaringClass, isMapped, method, object
 
Constructor Summary
AnnotatedFieldMethod(AnnotatedField field, Field.Property function)
          Instantiates a new annotated field method.
AnnotatedFieldMethod(AnnotatedField field, Field.Property function, java.lang.reflect.Method method)
          Instantiates a new annotated field method.
AnnotatedFieldMethod(java.lang.reflect.Method method, Field.Property function)
          Instantiates a new annotated field method.
 
Method Summary
 boolean booleanMethod(JHeader header, java.lang.String name)
          Boolean method.
static void checkAnnotation(java.lang.reflect.Method method, java.util.List<AnnotatedField> fields)
          Check annotation.
abstract  void configFromField(AnnotatedField field)
          Config from field.
static AnnotatedFieldMethod generateFunction(Field.Property function, AnnotatedField field)
          Generate function.
 java.lang.String getFieldName()
          Gets the field name.
 Field.Property getFunction()
          Gets the function.
static AnnotatedFieldMethod inspectMethod(java.lang.reflect.Method method)
          Inspect method.
 int intMethod(JHeader header, java.lang.String name)
          Int method.
 long longMethod(JHeader header, java.lang.String name)
          Long method.
 java.lang.Object objectMethod(JHeader header, java.lang.String name)
          Object method.
 java.lang.String stringMethod(JHeader header, java.lang.String name)
          String method.
protected  void validateSignature(java.lang.reflect.Method method)
          Validate signature.
 
Methods inherited from class org.jnetpcap.packet.structure.AnnotatedMethod
getMethod, getMethods, setIsMapped, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

field

protected final java.lang.String field
The field.


function

protected final Field.Property function
The function.

Constructor Detail

AnnotatedFieldMethod

public AnnotatedFieldMethod(AnnotatedField field,
                            Field.Property function)
Instantiates a new annotated field method.

Parameters:
field - the field
function - the function

AnnotatedFieldMethod

public AnnotatedFieldMethod(AnnotatedField field,
                            Field.Property function,
                            java.lang.reflect.Method method)
Instantiates a new annotated field method.

Parameters:
field - the field
function - the function
method - the method

AnnotatedFieldMethod

public AnnotatedFieldMethod(java.lang.reflect.Method method,
                            Field.Property function)
Instantiates a new annotated field method.

Parameters:
method - the method
function - the function
Method Detail

checkAnnotation

public static void checkAnnotation(java.lang.reflect.Method method,
                                   java.util.List<AnnotatedField> fields)
Check annotation.

Parameters:
method - the method
fields - the fields

generateFunction

public static AnnotatedFieldMethod generateFunction(Field.Property function,
                                                    AnnotatedField field)
Generate function.

Parameters:
function - the function
field - the field
Returns:
the annotated field method

inspectMethod

public static AnnotatedFieldMethod inspectMethod(java.lang.reflect.Method method)
Inspect method.

Parameters:
method - the method
Returns:
the annotated field method

booleanMethod

public boolean booleanMethod(JHeader header,
                             java.lang.String name)
Boolean method.

Parameters:
header - the header
name - the name
Returns:
true, if successful

configFromField

public abstract void configFromField(AnnotatedField field)
Config from field.

Parameters:
field - the field

getFieldName

public java.lang.String getFieldName()
Gets the field name.

Returns:
the field name

getFunction

public final Field.Property getFunction()
Gets the function.

Returns:
the function

intMethod

public int intMethod(JHeader header,
                     java.lang.String name)
Int method.

Parameters:
header - the header
name - the name
Returns:
the int

objectMethod

public java.lang.Object objectMethod(JHeader header,
                                     java.lang.String name)
Object method.

Parameters:
header - the header
name - the name
Returns:
the object

stringMethod

public java.lang.String stringMethod(JHeader header,
                                     java.lang.String name)
String method.

Parameters:
header - the header
name - the name
Returns:
the string

validateSignature

protected void validateSignature(java.lang.reflect.Method method)
Validate signature.

Specified by:
validateSignature in class AnnotatedMethod
Parameters:
method - the method
See Also:
AnnotatedMethod.validateSignature(java.lang.reflect.Method)

longMethod

public long longMethod(JHeader header,
                       java.lang.String name)
Long method.

Parameters:
header - the header
name - the name
Returns:
the long