SourceCode implementation that uses source from a pre-defined String. Note that the path is normalized: file separator chars are normalized to standard '/'.
Constructor and description |
---|
SourceString
(java.lang.String source, java.lang.String path = null, java.lang.String name = null) Construct a new instance for the file at the specified path |
Methods inherited from class | Name |
---|---|
class AbstractSourceCode |
getAst, getAstCompilerPhase, getLineNumberForCharacterIndex, getLines, getMethodCallExpressions, isValid, line, normalizePath, setSuppressionAnalyzer |
Construct a new instance for the file at the specified path
source
- - the source code; may be emptypath
- - the path for the source code; may be null; defaults to nullname
- - the name for the source code; may be null; defaults to nullGroovy Documentation