org.jnetpcap.packet.structure
Class AnnotatedBinding

java.lang.Object
  extended by org.jnetpcap.packet.structure.AnnotatedBinding
All Implemented Interfaces:
JBinding, JDependency

public class AnnotatedBinding
extends java.lang.Object
implements JBinding

The Class AnnotatedBinding.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jnetpcap.packet.JBinding
JBinding.DefaultJBinding
 
Field Summary
protected  int[] dependencies
          The dependencies.
 
Fields inherited from interface org.jnetpcap.packet.JBinding
NULL_ID
 
Method Summary
static void clearCache()
          Clear cache.
 int getSourceId()
          Gets the source id.
 java.lang.Class<? extends JHeader> getTargetClass()
          Gets the target class.
 int getTargetId()
          Gets the target id.
static JBinding[] inspectClass(java.lang.Class<?> c, java.util.List<HeaderDefinitionError> errors)
          Inspect class.
static JBinding[] inspectClass(java.lang.Object bindingSuite, java.util.List<HeaderDefinitionError> errors)
          Inspect class.
static
<T extends JHeader>
JBinding[]
inspectJHeaderClass(java.lang.Class<T> c, java.util.List<HeaderDefinitionError> errors)
          Inspect j header class.
static JBinding[] inspectObject(java.lang.Object object, java.util.List<HeaderDefinitionError> errors)
          Inspect object.
 boolean isBound(JPacket packet, int offset)
          Checks if is bound.
 int[] listDependencies()
          List dependencies.
 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

dependencies

protected final int[] dependencies
The dependencies.

Method Detail

clearCache

public static void clearCache()
Clear cache.


inspectClass

public static JBinding[] inspectClass(java.lang.Class<?> c,
                                      java.util.List<HeaderDefinitionError> errors)
Inspect class.

Parameters:
c - the c
errors - the errors
Returns:
the j binding[]

inspectJHeaderClass

public static <T extends JHeader> JBinding[] inspectJHeaderClass(java.lang.Class<T> c,
                                                                 java.util.List<HeaderDefinitionError> errors)
Inspect j header class.

Type Parameters:
T - the generic type
Parameters:
c - the c
errors - the errors
Returns:
the j binding[]

getSourceId

public int getSourceId()
Gets the source id.

Specified by:
getSourceId in interface JBinding
Returns:
the source id
See Also:
JBinding.getSourceId()

getTargetClass

public java.lang.Class<? extends JHeader> getTargetClass()
Gets the target class.

Returns:
the target class

getTargetId

public int getTargetId()
Gets the target id.

Specified by:
getTargetId in interface JBinding
Returns:
the target id
See Also:
JBinding.getTargetId()

isBound

public boolean isBound(JPacket packet,
                       int offset)
Checks if is bound.

Specified by:
isBound in interface JBinding
Parameters:
packet - the packet
offset - the offset
Returns:
true, if is bound
See Also:
JBinding.isBound(org.jnetpcap.packet.JPacket, int)

listDependencies

public int[] listDependencies()
List dependencies.

Specified by:
listDependencies in interface JBinding
Returns:
the int[]
See Also:
JBinding.listDependencies()

toString

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

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

inspectClass

public static JBinding[] inspectClass(java.lang.Object bindingSuite,
                                      java.util.List<HeaderDefinitionError> errors)
Inspect class.

Parameters:
bindingSuite - the binding suite
errors - the errors
Returns:
the j binding[]

inspectObject

public static JBinding[] inspectObject(java.lang.Object object,
                                       java.util.List<HeaderDefinitionError> errors)
Inspect object.

Parameters:
object - the object
errors - the errors
Returns:
the j binding[]