org.jnetpcap.packet.structure
Class AnnotatedMethod

java.lang.Object
  extended by org.jnetpcap.packet.structure.AnnotatedMethod
Direct Known Subclasses:
AnnotatedBindMethod, AnnotatedFieldMethod, AnnotatedHeaderLengthMethod, AnnotatedScannerMethod

public abstract class AnnotatedMethod
extends java.lang.Object

The Class AnnotatedMethod.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Field Summary
protected  java.lang.Class<?> declaringClass
          The declaring class.
protected  boolean isMapped
          The is mapped.
protected  java.lang.reflect.Method method
          The method.
protected  java.lang.Object object
          The object.
 
Constructor Summary
AnnotatedMethod()
          Instantiates a new annotated method.
AnnotatedMethod(java.lang.reflect.Method method)
          Instantiates a new annotated method.
AnnotatedMethod(java.lang.reflect.Method method, java.lang.Object object)
          Instantiates a new annotated method.
 
Method Summary
 java.lang.reflect.Method getMethod()
          Gets the method.
static java.lang.reflect.Method[] getMethods(java.lang.Class<?> c, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
          Gets the methods.
 void setIsMapped(boolean state)
          Sets the checks if is mapped.
 java.lang.String toString()
          To string.
protected abstract  void validateSignature(java.lang.reflect.Method method)
          Validate signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

method

protected final java.lang.reflect.Method method
The method.


isMapped

protected boolean isMapped
The is mapped.


declaringClass

protected final java.lang.Class<?> declaringClass
The declaring class.


object

protected final java.lang.Object object
The object.

Constructor Detail

AnnotatedMethod

public AnnotatedMethod()
Instantiates a new annotated method.


AnnotatedMethod

public AnnotatedMethod(java.lang.reflect.Method method,
                       java.lang.Object object)
Instantiates a new annotated method.

Parameters:
method - the method
object - the object

AnnotatedMethod

public AnnotatedMethod(java.lang.reflect.Method method)
Instantiates a new annotated method.

Parameters:
method - the method
Method Detail

setIsMapped

public void setIsMapped(boolean state)
Sets the checks if is mapped.

Parameters:
state - the new checks if is mapped

getMethod

public java.lang.reflect.Method getMethod()
Gets the method.

Returns:
the method

validateSignature

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

Parameters:
method - the method

toString

public java.lang.String toString()
To string.

Overrides:
toString in class java.lang.Object
Returns:
the string
See Also:
Object.toString()

getMethods

public static java.lang.reflect.Method[] getMethods(java.lang.Class<?> c,
                                                    java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Gets the methods.

Parameters:
c - the c
annotation - the annotation
Returns:
the methods