org.drools.lang
Enum DroolsSentenceType

java.lang.Object
  extended by java.lang.Enum<DroolsSentenceType>
      extended by org.drools.lang.DroolsSentenceType
All Implemented Interfaces:
Serializable, Comparable<DroolsSentenceType>

public enum DroolsSentenceType
extends Enum<DroolsSentenceType>

Enum to identify a sentence type. This is used by DRLParser and stored into DroolsSentence.

See Also:
DroolsSentence

Enum Constant Summary
EVAL
           
FUNCTION
           
FUNCTION_IMPORT_STATEMENT
           
GLOBAL
           
IMPORT_STATEMENT
           
PACKAGE
           
QUERY
           
RULE
           
TEMPLATE
           
TYPE_DECLARATION
           
 
Method Summary
static DroolsSentenceType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DroolsSentenceType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PACKAGE

public static final DroolsSentenceType PACKAGE

FUNCTION_IMPORT_STATEMENT

public static final DroolsSentenceType FUNCTION_IMPORT_STATEMENT

IMPORT_STATEMENT

public static final DroolsSentenceType IMPORT_STATEMENT

GLOBAL

public static final DroolsSentenceType GLOBAL

FUNCTION

public static final DroolsSentenceType FUNCTION

TEMPLATE

public static final DroolsSentenceType TEMPLATE

TYPE_DECLARATION

public static final DroolsSentenceType TYPE_DECLARATION

RULE

public static final DroolsSentenceType RULE

QUERY

public static final DroolsSentenceType QUERY

EVAL

public static final DroolsSentenceType EVAL
Method Detail

values

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

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

valueOf

public static DroolsSentenceType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.