org.jmlspecs.jml4.compiler
Class DefaultCompilerExtension

java.lang.Object
  extended by org.jmlspecs.jml4.compiler.DefaultCompilerExtension
All Implemented Interfaces:
IBatchCompilerExtension, ICompilerExtension
Direct Known Subclasses:
Esc, ESC2Wrapper, Fspv, JML2CheckerWrapper, JML2CompilerWrapper, JmlCompilerExtension

public abstract class DefaultCompilerExtension
extends java.lang.Object
implements ICompilerExtension


Field Summary
 
Fields inherited from interface org.jmlspecs.jml4.compiler.IBatchCompilerExtension
ARG_NOT_HANDLED
 
Constructor Summary
DefaultCompilerExtension()
           
 
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)
           
 boolean handleWarningToken(java.lang.String token, boolean isEnabling, java.util.Map optionsMap)
           
 void initCompilerOptions(CompilerOptions options)
           
 java.lang.String name()
           
 java.lang.String optionKeyFromIrritant(long irritant)
           
abstract  void optionsToBuffer(CompilerOptions options, java.lang.StringBuffer buf)
           
 void preCodeGeneration(Compiler compiler, CompilationUnitDeclaration unit)
           
 void setOptionsMap(CompilerOptions options, java.util.Map optionsMap)
           
 java.lang.String warningTokenFromIrritant(long irritant)
           
 long warningTokenToIrritant(java.lang.String token)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCompilerExtension

public DefaultCompilerExtension()
Method Detail

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
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).

getOptionsMap

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

handleWarningToken

public boolean handleWarningToken(java.lang.String token,
                                  boolean isEnabling,
                                  java.util.Map optionsMap)
Specified by:
handleWarningToken in interface IBatchCompilerExtension

initCompilerOptions

public void initCompilerOptions(CompilerOptions options)
Specified by:
initCompilerOptions in interface ICompilerExtension

name

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

optionKeyFromIrritant

public java.lang.String optionKeyFromIrritant(long irritant)
Specified by:
optionKeyFromIrritant in interface ICompilerExtension

optionsToBuffer

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

preCodeGeneration

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

setOptionsMap

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

warningTokenFromIrritant

public java.lang.String warningTokenFromIrritant(long irritant)
Specified by:
warningTokenFromIrritant in interface ICompilerExtension

warningTokenToIrritant

public long warningTokenToIrritant(java.lang.String token)
Specified by:
warningTokenToIrritant in interface ICompilerExtension