org.gradle.groovy.scripts
Class FileScriptSource

java.lang.Object
  extended by org.gradle.groovy.scripts.FileScriptSource
All Implemented Interfaces:
ScriptSource

public class FileScriptSource
extends java.lang.Object
implements ScriptSource

A ScriptSource which loads the script from a file.


Constructor Summary
FileScriptSource(java.lang.String description, java.io.File sourceFile)
           
 
Method Summary
 java.lang.String getClassName()
          Returns the name to use for the compiled class for this script.
 java.lang.String getDisplayName()
          Returns the description for this script.
 java.io.File getSourceFile()
          Returns the source file for this script, if any.
 java.lang.String getText()
          Returns the text of this script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileScriptSource

public FileScriptSource(java.lang.String description,
                        java.io.File sourceFile)
Method Detail

getText

public java.lang.String getText()
Description copied from interface: ScriptSource
Returns the text of this script. Returns an empty String if this script has no text. Never returns null.

Specified by:
getText in interface ScriptSource

getClassName

public java.lang.String getClassName()
Description copied from interface: ScriptSource
Returns the name to use for the compiled class for this script. Never returns null.

Specified by:
getClassName in interface ScriptSource

getSourceFile

public java.io.File getSourceFile()
Description copied from interface: ScriptSource
Returns the source file for this script, if any. Returns null if there is no source file for this script.

Specified by:
getSourceFile in interface ScriptSource

getDisplayName

public java.lang.String getDisplayName()
Description copied from interface: ScriptSource
Returns the description for this script. Never returns null.

Specified by:
getDisplayName in interface ScriptSource