org.jmlspecs.jml2.compiler
Class JML2CompilerWrapper

java.lang.Object
  extended by org.jmlspecs.jml4.compiler.DefaultCompilerExtension
      extended by org.jmlspecs.jml2.compiler.JML2CompilerWrapper
All Implemented Interfaces:
IBatchCompilerExtension, ICompilerExtension

public class JML2CompilerWrapper
extends DefaultCompilerExtension


Field Summary
static boolean DEBUG
           
 
Fields inherited from interface org.jmlspecs.jml4.compiler.IBatchCompilerExtension
ARG_NOT_HANDLED
 
Constructor Summary
JML2CompilerWrapper()
           
 
Method Summary
 int configureArgs(java.lang.String currentArg, java.lang.String[] args, int index, java.util.Map options)
          This processes command-line arguments for extensions to the compiler.
 void getOptionsMap(CompilerOptions options, java.util.Map optionsMap)
           
 java.lang.String name()
           
 void optionsToBuffer(CompilerOptions options, java.lang.StringBuffer buf)
           
 void preCodeGeneration(Compiler compiler, CompilationUnitDeclaration unit)
           
 void setOptionsMap(CompilerOptions options, java.util.Map optionsMap)
           
 
Methods inherited from class org.jmlspecs.jml4.compiler.DefaultCompilerExtension
handleWarningToken, initCompilerOptions, optionKeyFromIrritant, warningTokenFromIrritant, warningTokenToIrritant
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

JML2CompilerWrapper

public JML2CompilerWrapper()
Method Detail

name

public java.lang.String name()
Specified by:
name in interface ICompilerExtension
Overrides:
name in class DefaultCompilerExtension
Returns:
user-friendly name of this compiler extension.

preCodeGeneration

public void preCodeGeneration(Compiler compiler,
                              CompilationUnitDeclaration unit)
Specified by:
preCodeGeneration in interface ICompilerExtension
Overrides:
preCodeGeneration in class DefaultCompilerExtension

getOptionsMap

public void getOptionsMap(CompilerOptions options,
                          java.util.Map optionsMap)
Specified by:
getOptionsMap in interface ICompilerExtension
Overrides:
getOptionsMap in class DefaultCompilerExtension

setOptionsMap

public void setOptionsMap(CompilerOptions options,
                          java.util.Map optionsMap)
Specified by:
setOptionsMap in interface ICompilerExtension
Overrides:
setOptionsMap in class DefaultCompilerExtension

configureArgs

public int configureArgs(java.lang.String currentArg,
                         java.lang.String[] args,
                         int index,
                         java.util.Map options)
Description copied from interface: IBatchCompilerExtension
This processes command-line arguments for extensions to the compiler.

Specified by:
configureArgs in interface IBatchCompilerExtension
Overrides:
configureArgs in class DefaultCompilerExtension
Parameters:
currentArg - The command-line argument currently under consideration
args - The whole list of arguments
index - The location of currentArg in the list
Returns:
ARG_NOT_HANDLED if nothing has been recognized, otherwise i >= index and is the last argument position processed (not one beyond it).

optionsToBuffer

public void optionsToBuffer(CompilerOptions options,
                            java.lang.StringBuffer buf)
Specified by:
optionsToBuffer in interface ICompilerExtension
Specified by:
optionsToBuffer in class DefaultCompilerExtension