simple.page.translate
Interface Source


public interface Source

The Source object is used to describe a translated JSP page. It contains information such as the language th JSP has been written in, for example Java or Groovy, as well as a description of the object and package that will result from compilation. Of core importance is the Reference object provided. This allows the JSP engine to determine when a JSP needs recompilation.

Author:
Niall Gallagher
See Also:
Reference

Method Summary
 java.io.File getDirectory()
          This acquires the directory the source object is generated into.
 java.lang.String getLanguage()
          The language property is used to specify the type of source that is to be generated and the compiler required to process that source.
 java.lang.String getName()
          The provides the name of the resulting object.
 java.lang.String getPackage()
          This is used by the source code generator to determine the package the target object is using.
 Reference getReference()
          This provides a key component for the JSP engine, which is used to determine when a JSP page or its includes have expired.
 java.io.File getSource()
          Provides the OS file system reference for the source file.
 java.lang.String getTarget()
          Provides the fully qualified package name for the resulting object.
 

Method Detail

getLanguage

java.lang.String getLanguage()
The language property is used to specify the type of source that is to be generated and the compiler required to process that source. The language property is specified within the JSP page using the "page" directives "language" attribute.

Returns:
this returns the language, for example Groovy or Java

getName

java.lang.String getName()
The provides the name of the resulting object. This is used by the code generator to determine the correct class name and constructor to use, and may be used by the source compiler.

Returns:
this returns the name of the source object generated

getTarget

java.lang.String getTarget()
Provides the fully qualified package name for the resulting object. This is required by the compiler, so that once the generated source has been compiled it can later be loaded as a class by the compiler class loader and instantiated.

Returns:
this returns the fully qualified class name targeted

getPackage

java.lang.String getPackage()
This is used by the source code generator to determine the package the target object is using. This ensures that a correct name space is given to each source, which avoids collisions.

Returns:
this returns the package name for the source object

getDirectory

java.io.File getDirectory()
This acquires the directory the source object is generated into. This allows the generator to create the appropriate directory, before generating the resulting Java or Groovy object into that directory before compilation can proceed.

Returns:
the directory to generate the source object into

getSource

java.io.File getSource()
Provides the OS file system reference for the source file. This can be used to acquire a file system location using the provided project Workspace. This is used by the source generator to determine where the resulting source is written to.

Returns:
this returns the file system path for the source

getReference

Reference getReference()
This provides a key component for the JSP engine, which is used to determine when a JSP page or its includes have expired. This allows background compilation, and ensures that pages can be edited and deployed without restarting the server.

Returns:
this returns a monitor to the referenced JSP sources