com.thebuzzmedia.sjxp.rule
Enum IRule.Type

java.lang.Object
  extended by java.lang.Enum<IRule.Type>
      extended by com.thebuzzmedia.sjxp.rule.IRule.Type
All Implemented Interfaces:
Serializable, Comparable<IRule.Type>
Enclosing interface:
IRule<T>

public static enum IRule.Type
extends Enum<IRule.Type>

Used to describe the type of the parse rule.


Enum Constant Summary
ATTRIBUTE
          Type used to indicate that this rule describes 1 or more attribute values that the caller wants parsed.
CHARACTER
          Used to describe a rule that will be called Type used to indicate that this rule describes the character data between an open and close tag that the caller wants parsed.
TAG
          Type used to indicate a rule interested in START_TAG and END_TAG events for the matching location path.
 
Method Summary
static IRule.Type valueOf(String name)
          Returns the enum constant of this type with the specified name.
static IRule.Type[] 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

TAG

public static final IRule.Type TAG
Type used to indicate a rule interested in START_TAG and END_TAG events for the matching location path.

This can be handy when no parsed data is needed from the underlying XML, but rather a simple notification that the location path existed in the XML (e.g. counting element occurrences).


ATTRIBUTE

public static final IRule.Type ATTRIBUTE
Type used to indicate that this rule describes 1 or more attribute values that the caller wants parsed.


CHARACTER

public static final IRule.Type CHARACTER
Used to describe a rule that will be called Type used to indicate that this rule describes the character data between an open and close tag that the caller wants parsed.

Method Detail

values

public static final IRule.Type[] 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(IRule.Type c : IRule.Type.values())
        System.out.println(c);

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

valueOf

public static IRule.Type 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

Copyright 2011 The Buzz Media, LLC