VASSAL.tools
Class ComponentPathBuilder

java.lang.Object
  |
  +--VASSAL.tools.ComponentPathBuilder

public class ComponentPathBuilder
extends java.lang.Object

Provides an XPath-like syntax for identifying configuration components


Inner Class Summary
static class ComponentPathBuilder.PathFormatException
           
 
Constructor Summary
ComponentPathBuilder()
           
 
Method Summary
 java.lang.String getId(Configurable[] targetPath)
          Return a string identifying the specified Configurable components as a path through the configuration parent-child hierarchy.
static ComponentPathBuilder getInstance()
           
 Configurable[] getPath(java.lang.String id)
          Return a list of Configurable components specified by the given identifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentPathBuilder

public ComponentPathBuilder()
Method Detail

getInstance

public static ComponentPathBuilder getInstance()

getId

public java.lang.String getId(Configurable[] targetPath)
Return a string identifying the specified Configurable components as a path through the configuration parent-child hierarchy.
Parameters:
targetPath -  
Returns:
 

getPath

public Configurable[] getPath(java.lang.String id)
                       throws ComponentPathBuilder.PathFormatException
Return a list of Configurable components specified by the given identifier
Parameters:
id -  
Returns:
 
Throws:
ComponentPathBuilder.PathFormatException - if no such component exists