com.seventytwomiles.architecturerules.domain
Class SourceDirectory

java.lang.Object
  extended by com.seventytwomiles.architecturerules.domain.SourceDirectory

public class SourceDirectory
extends java.lang.Object

Representation of a source directory to search for packages and .class files in.

Author:
mikenereson

Constructor Summary
SourceDirectory()
          Instantiates a new SourceDirectory entity.
SourceDirectory(java.lang.String path)
          Instantiates a new SourceDirectory with the given path
SourceDirectory(java.lang.String path, boolean shouldThrowExceptionWhenNotFound)
          Instantiates a new SourceDirectory with the given path and shouldThrowExceptionWhenNotFound values
SourceDirectory(java.lang.String path, java.lang.String notFound)
          Instantiates a new SourceDirectory with the given path and notFound values.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.lang.String getPath()
          Getter for property path.
 int hashCode()
           
protected  java.lang.String replaceBackslashForOS(java.lang.String path)
          Replaces inappropriate backslash with the appropriate slash based on the operating system's requirements For example, on a Windows system, src/main/resources becomes src\\main\\resource TODO: this may be able to be replaced with String.replaceAll, but I couldn't get the regex just right
 void setNotFound(java.lang.String notFound)
          Setter for property 'notFound'.
 void setPath(java.lang.String path)
          Setter for property path.
 void setShouldThrowExceptionWhenNotFound(boolean shouldThrowExceptionWhenNotFound)
          Setter for property shouldThrowExceptionWhenNotFound.
 boolean shouldThrowExceptionWhenNotFound()
          Getter for property shouldThrowExceptionWhenNotFound.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SourceDirectory

public SourceDirectory()

Instantiates a new SourceDirectory entity.


SourceDirectory

public SourceDirectory(java.lang.String path)

Instantiates a new SourceDirectory with the given path

Parameters:
path - String path

SourceDirectory

public SourceDirectory(java.lang.String path,
                       boolean shouldThrowExceptionWhenNotFound)

Instantiates a new SourceDirectory with the given path and shouldThrowExceptionWhenNotFound values

Parameters:
path - String path
shouldThrowExceptionWhenNotFound - boolean shouldThrowExceptionWhenNotFound

SourceDirectory

public SourceDirectory(java.lang.String path,
                       java.lang.String notFound)

Instantiates a new SourceDirectory with the given path and notFound values.

Parameters:
path - String path
notFound - boolean @notFound
Method Detail

setShouldThrowExceptionWhenNotFound

public void setShouldThrowExceptionWhenNotFound(boolean shouldThrowExceptionWhenNotFound)
Setter for property shouldThrowExceptionWhenNotFound.

Parameters:
shouldThrowExceptionWhenNotFound - Value to set for property shouldThrowExceptionWhenNotFound.

setNotFound

public void setNotFound(java.lang.String notFound)
Setter for property 'notFound'.

Parameters:
notFound - Value to set for property 'notFound'.

getPath

public java.lang.String getPath()

Getter for property path.

Returns:
Value for property path.

setPath

public void setPath(java.lang.String path)

Setter for property path.

Parameters:
path - Value to set for property path.

replaceBackslashForOS

protected java.lang.String replaceBackslashForOS(java.lang.String path)
Replaces inappropriate backslash with the appropriate slash based on the operating system's requirements For example, on a Windows system, src/main/resources becomes src\\main\\resource TODO: this may be able to be replaced with String.replaceAll, but I couldn't get the regex just right

Parameters:
path - String the path to fix
Returns:
String the fixed path

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

shouldThrowExceptionWhenNotFound

public boolean shouldThrowExceptionWhenNotFound()
Getter for property shouldThrowExceptionWhenNotFound.

Returns:
Value for property shouldThrowExceptionWhenNotFound.


Copyright © 2008. All Rights Reserved.