com.ryanm.config.imp
Class ConfGet

java.lang.Object
  extended by com.ryanm.config.imp.ConfGet

public class ConfGet
extends java.lang.Object

Utility class for retrieving a Configurator from an object. Handles the case of an annotated Configurable

Author:
ryanm

Constructor Summary
ConfGet()
           
 
Method Summary
static Configurator forPath(java.lang.String path, Configurator... roots)
          Finds the last configurator on a path, in a case-insensitive manner
static Configurator getConfigurator(java.lang.Object o)
          Gets a Configurator from the supplied Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfGet

public ConfGet()
Method Detail

getConfigurator

public static Configurator getConfigurator(java.lang.Object o)
Gets a Configurator from the supplied Object

Parameters:
o - The configurable object
Returns:
The associated Configurator, or null if the objectis Configurable, but returns a null Configurator, or is neither Configurable nor annotated

forPath

public static Configurator forPath(java.lang.String path,
                                   Configurator... roots)
Finds the last configurator on a path, in a case-insensitive manner

Parameters:
path - The Configurator path
roots - The roots of the Configurator forest
Returns:
The Configurator, or null if not found