Groovy Documentation

org.gmetrics.source
Class SourceFile

java.lang.Object
  org.gmetrics.source.AbstractSourceCode
      org.gmetrics.source.SourceFile

class SourceFile
extends AbstractSourceCode

The SourceCode implementation for a single file. Note that the path is normalized: file separator chars are normalized to standard '/'.

author:
Chris Mair
version:
$Revision: 29 $ - $Date: 2009-12-13 15:50:29 -0500 (Sun, 13 Dec 2009) $


Constructor Summary
SourceFile(File file)

Construct a new instance for the file at the specified path

 
Method Summary
protected def createSourceUnit()

String getName()

String getPath()

String getText()

String toString()

 
Methods inherited from class AbstractSourceCode
createSourceUnit, normalizePath
 

Constructor Detail

SourceFile

public SourceFile(File file)
Construct a new instance for the file at the specified path
param:
path - the path of the file; must not be null or empty


 
Method Detail

createSourceUnit

protected def createSourceUnit()


getName

String getName()
return:
the filename for this source file, excluding path


getPath

String getPath()
return:
the normalized path for this source file, including filename


getText

String getText()
return:
the full text of the source code


toString

String toString()


 

Groovy Documentation