GppTool

Description

The GppTool provides access to the current source and destination file information and encodings.

Note that GppTool is not available to files being processed via GppFilter because no information about the source or destination streams are available to filters.

GppTool is automatically inserted by GppCopy and GppJavac into the Groovy Template Context for each file processed. Using the key, gpp, you can access the following methods:

Method Description
getSourceName() Returns the full path name of the source file.
getSourceBaseName() Returns the base name of the source file.
getSourceDirName() Returns the directory path name of the source file.
getSourceLength() Returns the length in bytes of the source file.
getSourceLastModified() Returns the time the source file was last modified (as a Long).
getSourceEncoding() Returns the encoding of the source file.
getDestinationName() Returns the full path name of the destination file.
getDestinationBaseName() Returns the base name of the destination file.
getDestinationDirName() Returns the directory path name of the destination file.
getDestinationLength() Returns the length in bytes of the destination file.
getDestinationLastModified() Returns the time the destination file was last modified (as a Long).
getDestinationEncoding() Returns the encoding of the destination file.