org.jnetstream.lang.npl.model
Enum ElementKind

java.lang.Object
  extended by java.lang.Enum<ElementKind>
      extended by org.jnetstream.lang.npl.model.ElementKind
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ElementKind>

public enum ElementKind
extends java.lang.Enum<ElementKind>

The kind of an NPL element.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Enum Constant Summary
FIELD
          A field within a header.
HEADER
          A protocols' header type.
IMPORT
          NPL or java import statement.
LOCAL_PROPERTY
          A non-shared property exported with the packet, header or field.
LOCAL_VARIABLE
          A local variable.
METHOD
          A method declaration.
PACKAGE
          A package declaration.
PARAMETER
          A parameter of a method or constructor.
SHARED_PROPERTY
          A shared property exported with the packet, header or a field.
TABLE
          A table type.
TABLE_CONSTANT
          A constant within a table.
 
Method Summary
static ElementKind valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ElementKind[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HEADER

public static final ElementKind HEADER
A protocols' header type.


TABLE

public static final ElementKind TABLE
A table type. Tables are similar to enum but contain additional information such as descriptive labels.


TABLE_CONSTANT

public static final ElementKind TABLE_CONSTANT
A constant within a table.


FIELD

public static final ElementKind FIELD
A field within a header.


METHOD

public static final ElementKind METHOD
A method declaration.


PACKAGE

public static final ElementKind PACKAGE
A package declaration.


IMPORT

public static final ElementKind IMPORT
NPL or java import statement.


PARAMETER

public static final ElementKind PARAMETER
A parameter of a method or constructor.


LOCAL_VARIABLE

public static final ElementKind LOCAL_VARIABLE
A local variable.


LOCAL_PROPERTY

public static final ElementKind LOCAL_PROPERTY
A non-shared property exported with the packet, header or field.


SHARED_PROPERTY

public static final ElementKind SHARED_PROPERTY
A shared property exported with the packet, header or a field. Shared properties are shared amongst all instances of the same type of element. For example All Ethernet headers will have the exact same instance of all the same shared properties. Therefore any modification to the shared property will be reflected in all of the existing or future instances of Ethernet header.

Method Detail

values

public static final ElementKind[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ElementKind c : ElementKind.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ElementKind valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name