polyglot.frontend
Class ParserlessJLExtensionInfo

java.lang.Object
  extended by polyglot.frontend.AbstractExtensionInfo
      extended by polyglot.frontend.ParserlessJLExtensionInfo
All Implemented Interfaces:
ExtensionInfo
Direct Known Subclasses:
JLExtensionInfo

public abstract class ParserlessJLExtensionInfo
extends AbstractExtensionInfo

This class implements most of the ExtensionInfo for the Java language. It does not include a parser, however. EPL-licensed extensions should extend this class rather than JLExtensionInfo since they should not use the CUP-based grammar.

Author:
nystrom

Field Summary
 
Fields inherited from class polyglot.frontend.AbstractExtensionInfo
compiler, nf, scheduler, source_loader, stats, target_factory, ts
 
Constructor Summary
ParserlessJLExtensionInfo()
           
 
Method Summary
 java.lang.String compilerName()
          The name of the compiler for usage messages
protected  NodeFactory createNodeFactory()
          Create the node factory for this extension.
protected  Scheduler createScheduler()
           
protected  TypeSystem createTypeSystem()
          Create the type system for this extension.
 java.lang.String defaultFileExtension()
          The default extension that source files are expected to have.
 Goal getCompileGoal(Job job)
          Return the Goal to compile the source file associated with job to completion.
protected  void initTypeSystem()
           
 JobExt jobExt()
          Get the job extension for this language extension.
protected  LoadedClassResolver makeLoadedClassResolver()
          The LoadedClassResolver to use when initializing the type system.
abstract  Parser parser(java.io.Reader reader, FileSource source, ErrorQueue eq)
          Return a parser for source using the given reader.
 Version version()
          Report the version of the extension.
 
Methods inherited from class polyglot.frontend.AbstractExtensionInfo
compiler, createClassFile, createFileSource, createOptions, defaultFileExtensions, fileExtensions, getOptions, getStats, initCompiler, nodeFactory, scheduler, sourceLoader, targetFactory, toString, typeSystem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParserlessJLExtensionInfo

public ParserlessJLExtensionInfo()
Method Detail

makeLoadedClassResolver

protected LoadedClassResolver makeLoadedClassResolver()
The LoadedClassResolver to use when initializing the type system.

See Also:
initTypeSystem()

initTypeSystem

protected void initTypeSystem()
Specified by:
initTypeSystem in class AbstractExtensionInfo

createScheduler

protected Scheduler createScheduler()
Specified by:
createScheduler in class AbstractExtensionInfo

defaultFileExtension

public java.lang.String defaultFileExtension()
Description copied from interface: ExtensionInfo
The default extension that source files are expected to have.

Specified by:
defaultFileExtension in interface ExtensionInfo
Specified by:
defaultFileExtension in class AbstractExtensionInfo

compilerName

public java.lang.String compilerName()
Description copied from interface: ExtensionInfo
The name of the compiler for usage messages

Specified by:
compilerName in interface ExtensionInfo
Specified by:
compilerName in class AbstractExtensionInfo

version

public Version version()
Description copied from interface: ExtensionInfo
Report the version of the extension.

Specified by:
version in interface ExtensionInfo
Specified by:
version in class AbstractExtensionInfo

createTypeSystem

protected TypeSystem createTypeSystem()
Create the type system for this extension.

Specified by:
createTypeSystem in class AbstractExtensionInfo

createNodeFactory

protected NodeFactory createNodeFactory()
Create the node factory for this extension.

Specified by:
createNodeFactory in class AbstractExtensionInfo

jobExt

public JobExt jobExt()
Description copied from class: AbstractExtensionInfo
Get the job extension for this language extension. The job extension is used to extend the Job class without subtyping.

Specified by:
jobExt in interface ExtensionInfo
Overrides:
jobExt in class AbstractExtensionInfo

parser

public abstract Parser parser(java.io.Reader reader,
                              FileSource source,
                              ErrorQueue eq)
Return a parser for source using the given reader.

Specified by:
parser in interface ExtensionInfo
Specified by:
parser in class AbstractExtensionInfo

getCompileGoal

public Goal getCompileGoal(Job job)
Return the Goal to compile the source file associated with job to completion.

Specified by:
getCompileGoal in interface ExtensionInfo
Specified by:
getCompileGoal in class AbstractExtensionInfo