| java.lang.Object org.jicarilla.collections.NodeUtil
NodeUtil | public class NodeUtil (Code) | | Provides conversion to and from various other objects.
author: Leo Simons version: $Id: NodeUtil.java,v 1.3 2004/02/26 16:51:54 lsimons Exp $ |
EMPTY_NODE | final public static Node EMPTY_NODE(Code) | | |
fromAvalonConfiguration | public static Node fromAvalonConfiguration(Configuration c)(Code) | | |
fromAvalonConfiguration | public static Node fromAvalonConfiguration(Configuration c, Object valueKey)(Code) | | |
fromParameters | public static Node fromParameters(Parameters parameters)(Code) | | |
fromProperties | public static Node fromProperties(Properties p)(Code) | | Converts properties to nested node tree using '.' as the
seperator. So
properties.getProperty( "bla.bla2.blah" );
becomes
node.getChild( "bla" ).getChild( "bla2" ).get( "blah" )
Parameters: p - |
toAvalonConfiguration | public static Configuration toAvalonConfiguration(Node node)(Code) | | |
toAvalonContext | public static Context toAvalonContext(Node node)(Code) | | Turns a Tree of Nodes into a tree of Context objects.
Parameters: node - |
toParameters | public static Parameters toParameters(Node node)(Code) | | |
toProperties | public static Properties toProperties(Node node)(Code) | | Also flattens, and converts keys and values to strings.
node.getChild( "bla" ).getChild( "bla2" ).get( "blah" )
becomes
properties.getProperty( "bla.bla2.blah" );
Parameters: node - |
toProperties | public static void toProperties(Properties p, String prefix, String separator, Node node)(Code) | | Helper method for the toProperties() method.
Parameters: p - Parameters: prefix - Parameters: separator - Parameters: node - |
|
|