Forge - Parent 1.2.2-SNAPSHOT

org.jboss.forge.parser.xml.query
Enum GetQuery

java.lang.Object
  extended by java.lang.Enum<GetQuery>
      extended by org.jboss.forge.parser.xml.query.GetQuery
All Implemented Interfaces:
Serializable, Comparable<GetQuery>, Query<List<Node>>

public enum GetQuery
extends Enum<GetQuery>
implements Query<List<Node>>

Obtains the List of Nodes designated by the specified Patterns under the specified root Node.

Author:
Aslak Knutsen, ALR

Enum Constant Summary
INSTANCE
          Instance
 
Method Summary
 List<Node> execute(Node node, Pattern... patterns)
          Queries the tree starting at the specified Node for the specified Patterns.
static GetQuery valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GetQuery[] 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

INSTANCE

public static final GetQuery INSTANCE
Instance

Method Detail

values

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

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

valueOf

public static GetQuery 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

execute

public List<Node> execute(Node node,
                          Pattern... patterns)
Queries the tree starting at the specified Node for the specified Patterns.

Specified by:
execute in interface Query<List<Node>>
Parameters:
node - The Node to use as a reference point
patterns - The Patterns to match
Returns:
The expressed value or null if not found.
See Also:
org.jboss.shrinkwrap.descriptor.spi.node.query.Query#execute(org.jboss.shrinkwrap.descriptor.spi.node.Node, org.jboss.shrinkwrap.descriptor.spi.node.query.Pattern[])

Forge - Parent 1.2.2-SNAPSHOT

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.