org.codehaus.mojo.jalopy
Class Locator

java.lang.Object
  extended by org.codehaus.mojo.jalopy.Locator

public class Locator
extends java.lang.Object

Performs Locator services for the *Location parameters in the Reports.

Copied from the maven-checkstyle-plugin.

Author:
Joakim Erdfelt

Constructor Summary
Locator(org.apache.maven.plugin.logging.Log log, java.io.File resolveToDir)
          Create a Locator object.
 
Method Summary
 java.io.File resolveLocation(java.lang.String location, java.lang.String localfile)
           Attempts to resolve a location parameter into a real file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Locator

public Locator(org.apache.maven.plugin.logging.Log log,
               java.io.File resolveToDir)
Create a Locator object.

Parameters:
log - the logger object to log with.
resolveToDir - the directory to resolve resources into.
Method Detail

resolveLocation

public java.io.File resolveLocation(java.lang.String location,
                                    java.lang.String localfile)
                             throws java.io.IOException

Attempts to resolve a location parameter into a real file.

Checks a location string to for a resource, URL, or File that matches. If a resource or URL is found, then a local file is created with that locations contents.

Parameters:
location - the location string to match against.
localfile - the local file to use in case of resource or URL.
Returns:
the File of the resolved location.
Throws:
java.io.IOException - if file is unable to be found or copied into localfile destination.


Copyright © 2004-2010. All Rights Reserved.