org.codehaus.groovy.grails.web.pages
Class GroovyPageParser
java.lang.Object
org.codehaus.groovy.grails.web.pages.GroovyPageParser
- All Implemented Interfaces:
- Tokens
public class GroovyPageParser
- extends Object
- implements Tokens
NOTE: Based on work done by the GSP standalone project
(https://gsp.dev.java.net/)
Parsing implementation for GSP files
- Author:
- Troy Heninger, Graeme Rocher, Lari Hotari
Date: Jan 10, 2004
GSP precompilation (GRAILS-2890) added: May 19, 2009
Fields inherited from interface org.codehaus.groovy.grails.web.pages.Tokens |
EOF, GDECLAR, GDIRECT, GEND_EMPTY_TAG, GEND_TAG, GEXPR, GSCRIPT, GSTART_TAG, GTAG_EXPR, HTML, JDECLAR, JDIRECT, JEXPR, JSCRIPT |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
CONSTANT_NAME_JSP_TAGS
public static final String CONSTANT_NAME_JSP_TAGS
- See Also:
- Constant Field Values
CONSTANT_NAME_CONTENT_TYPE
public static final String CONSTANT_NAME_CONTENT_TYPE
- See Also:
- Constant Field Values
CONSTANT_NAME_LAST_MODIFIED
public static final String CONSTANT_NAME_LAST_MODIFIED
- See Also:
- Constant Field Values
CONSTANT_NAME_DEFAULT_CODEC
public static final String CONSTANT_NAME_DEFAULT_CODEC
- See Also:
- Constant Field Values
bodyVarsDefined
Set<Integer> bodyVarsDefined
attrsVarsMapDefinition
Map<Integer,String> attrsVarsMapDefinition
closureLevel
int closureLevel
DEFAULT_IMPORTS
public static final String[] DEFAULT_IMPORTS
CONFIG_PROPERTY_DEFAULT_CODEC
public static final String CONFIG_PROPERTY_DEFAULT_CODEC
- See Also:
- Constant Field Values
GROOVY_SOURCE_CHAR_ENCODING
public static final String GROOVY_SOURCE_CHAR_ENCODING
- See Also:
- Constant Field Values
GroovyPageParser
public GroovyPageParser(String name,
String uri,
String filename,
InputStream in)
throws IOException
- Throws:
IOException
getContentType
public String getContentType()
getCurrentOutputLineNumber
public int getCurrentOutputLineNumber()
getJspTags
public Map getJspTags()
getLineNumberMatrix
public int[] getLineNumberMatrix()
getClassName
public String getClassName()
setClassName
public void setClassName(String className)
getPackageName
public String getPackageName()
setPackageName
public void setPackageName(String packageName)
parse
public InputStream parse()
generateGsp
public void generateGsp(Writer target)
generateGsp
public void generateGsp(Writer target,
boolean precompileMode)
writeHtmlParts
public void writeHtmlParts(File filename)
throws IOException
- Throws:
IOException
writeLineNumbers
public void writeLineNumbers(File filename)
throws IOException
- Throws:
IOException
getExpressionText
public String getExpressionText(String text)
- Returns an expression text for the given expression
- Parameters:
text
- The text
- Returns:
- An expression text
flushTagBuffering
public void flushTagBuffering()
getLastModified
public long getLastModified()
setLastModified
public void setLastModified(long lastModified)
getHtmlParts
public List<String> getHtmlParts()
getHtmlPartsArray
public String[] getHtmlPartsArray()
isInClosure
public boolean isInClosure()
getDefaultCodecDirectiveValue
public String getDefaultCodecDirectiveValue()
Copyright (c) 2005-2009 The Grails project