org.jbehave.core.io
Class CodeLocations

java.lang.Object
  extended by org.jbehave.core.io.CodeLocations

public class CodeLocations
extends java.lang.Object

Collection of utility methods to create code location URLs


Nested Class Summary
static class CodeLocations.InvalidCodeLocation
           
 
Constructor Summary
CodeLocations()
           
 
Method Summary
static java.net.URL codeLocationFromClass(java.lang.Class<?> codeLocationClass)
          Creates a code location URL from a class
static java.net.URL codeLocationFromPath(java.lang.String filePath)
          Creates a code location URL from a file path
static java.net.URL codeLocationFromURL(java.lang.String url)
          Creates a code location URL from a URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeLocations

public CodeLocations()
Method Detail

codeLocationFromClass

public static java.net.URL codeLocationFromClass(java.lang.Class<?> codeLocationClass)
Creates a code location URL from a class

Parameters:
codeLocationClass - the class
Returns:
A URL created from Class
Throws:
CodeLocations.InvalidCodeLocation - if URL creation fails

codeLocationFromPath

public static java.net.URL codeLocationFromPath(java.lang.String filePath)
Creates a code location URL from a file path

Parameters:
filePath - the file path
Returns:
A URL created from File
Throws:
CodeLocations.InvalidCodeLocation - if URL creation fails

codeLocationFromURL

public static java.net.URL codeLocationFromURL(java.lang.String url)
Creates a code location URL from a URL

Parameters:
url - the URL external form
Returns:
A URL created from URL
Throws:
CodeLocations.InvalidCodeLocation - if URL creation fails


Copyright © 2003-2010. All Rights Reserved.