Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.web.pages
[Groovy] Class GroovyPageCompiler

    java.lang.Object
      org.codehaus.groovy.grails.web.pages.GroovyPageCompiler

    class GroovyPageCompiler

Used to compile GSP files into a specified target directory.

Authors:
  Graeme Rocher

Since:
  1.2

Property Summary
`groovy.lang.GroovyClassLoader` | `classLoader`
`org.codehaus.groovy.control.CompilerConfiguration` | `compilerConfig`
`java.lang.String` | `encoding`
`java.io.File` | `generatedGroovyPagesDirectory`
`java.lang.String` | `packagePrefix`
`java.util.List` | `srcFiles`
`java.io.File` | `targetDir`
`java.lang.String` | `viewPrefix`
`java.io.File` | `viewsDir`

Method Summary
`java.util.Map` | `compile()` Compiles the given GSP pages and returns a Map of URI to classname mappings
`protected void` | `compileGSP(java.io.File viewsDir, java.io.File gspfile, java.lang.String viewPrefix, java.lang.String packagePrefix)` Compiles an individual GSP file
`protected java.lang.Object` | `generateJavaName(java.lang.String str)`
`protected java.lang.String` | `relativePath(java.io.File relbase, java.io.File file)`
`void` | `setCompilerConfig(org.codehaus.groovy.control.CompilerConfiguration c)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### classLoader

    groovy.lang.GroovyClassLoader classLoader

### compilerConfig

    org.codehaus.groovy.control.CompilerConfiguration compilerConfig

### encoding

    java.lang.String encoding

### generatedGroovyPagesDirectory

    java.io.File generatedGroovyPagesDirectory

### packagePrefix

    java.lang.String packagePrefix

### srcFiles

    java.util.List srcFiles

### targetDir

    java.io.File targetDir

### viewPrefix

    java.lang.String viewPrefix

### viewsDir

    java.io.File viewsDir

Method Detail

### compile

    java.util.Map compile()

  Compiles the given GSP pages and returns a Map of URI to classname mappings

### compileGSP

    protected void compileGSP(java.io.File viewsDir, java.io.File gspfile, java.lang.String viewPrefix, java.lang.String packagePrefix)

  Compiles an individual GSP file
  Parameters:
    `viewsDir` - The base directory that contains the GSP view
    `gspfile` - The actual GSP file reference
    `viewPrefix` - The prefix to use for the path to the view
    `packagePrefix` - The package prefix to use which allows scoping for different applications and plugins

### generateJavaName

    protected java.lang.Object generateJavaName(java.lang.String str)

### relativePath

    protected java.lang.String relativePath(java.io.File relbase, java.io.File file)

### setCompilerConfig

    void setCompilerConfig(org.codehaus.groovy.control.CompilerConfiguration c)

Groovy Documentation