org.apache.examples
Class ExampleUtils

java.lang.Object
  extended by org.apache.examples.ExampleUtils

public final class ExampleUtils
extends java.lang.Object

Utilities needed by the examples.

Author:
Howard Lewis Ship

Method Summary
static org.apache.hivemind.Registry buildClasspathRegistry(java.lang.String file)
          Convenience method for invoking buildClasspathRegistry(String[]) with only a single file.
static org.apache.hivemind.Registry buildClasspathRegistry(java.lang.String[] files)
          Builds a registry for files in the classpath.
protected static org.apache.hivemind.Resource getResource(java.lang.String file)
          Returns the given file as a Resource from the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildClasspathRegistry

public static org.apache.hivemind.Registry buildClasspathRegistry(java.lang.String file)
                                                           throws java.lang.Exception
Convenience method for invoking buildClasspathRegistry(String[]) with only a single file.

Throws:
java.lang.Exception

buildClasspathRegistry

public static org.apache.hivemind.Registry buildClasspathRegistry(java.lang.String[] files)
                                                           throws java.lang.Exception
Builds a registry for files in the classpath.

Throws:
java.lang.Exception

getResource

protected static org.apache.hivemind.Resource getResource(java.lang.String file)
Returns the given file as a Resource from the classpath. Typically, this is to find files in the same folder as the invoking class.



Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.