JML

org.jmlspecs.checker
Class TestJmlParser.Helper

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.multijava.util.testing.TestCase
              extended byorg.multijava.mjc.TestMjcParser
                  extended byorg.jmlspecs.checker.TestJmlParser.Helper
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
TestJmlParser

protected static class TestJmlParser.Helper
extends TestMjcParser


Nested Class Summary
 
Nested classes inherited from class org.multijava.mjc.TestMjcParser
TestMjcParser.TestCompiler
 
Field Summary
private  JavadocLexer docLexer
           
private  JmlLexer jmlLexer
           
private  JmlMLLexer jmlMLLexer
           
private  JmlSLLexer jmlSLLexer
           
private  TokenStreamSelector lexingController
           
private  JmlParser parser
           
private  ParsingController parsingController
           
 
Fields inherited from class org.multijava.mjc.TestMjcParser
compiler, errorOut
 
Fields inherited from class org.multijava.util.testing.TestCase
NEWLINE
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestJmlParser.Helper(String name)
           
 
Method Summary
protected  void establishTest(String sourceCode, boolean parseJavadocs)
          Establish lexers and parsers for the given source code, parsing javadoc comments according to the given boolean.
protected  JmlAbruptSpecCase getAbruptSpecCase(String sourceCode)
           
protected  JmlGenericSpecCase getGenericSpecCase(String sourceCode)
           
protected  JmlGenericSpecCase getGenericSpecStatementCase(String sourceCode)
           
protected  JmlCompilationUnit getJmlAST(String sourceCode)
           
protected  JmlMethodSpecification getMethodSpecification(String sourceCode)
           
protected  JmlModelProgram getModelProgram(long modifiers, String sourceCode)
           
protected  JmlRequiresClause getRequiresClause(String sourceCode)
           
protected  JmlSpecBodyClause[] getSpecBody(String sourceCode)
           
protected  JmlSpecBodyClause getSpecBodyClause(String sourceCode)
           
protected  JmlSpecVarDecl[] getSpecVarDecls(String sourceCode)
           
protected  JStatement getStatement(String sourceCode)
           
 
Methods inherited from class org.multijava.mjc.TestMjcParser
establishTest, getAST, getAST, test_comment_parsing_1, test_comment_parsing_2, test_ignore_misplaced_javadoc_parsing1, test_ignore_misplaced_javadoc_parsing10, test_ignore_misplaced_javadoc_parsing11, test_ignore_misplaced_javadoc_parsing12, test_ignore_misplaced_javadoc_parsing13, test_ignore_misplaced_javadoc_parsing2, test_ignore_misplaced_javadoc_parsing3, test_ignore_misplaced_javadoc_parsing4, test_ignore_misplaced_javadoc_parsing5, test_ignore_misplaced_javadoc_parsing6, test_ignore_misplaced_javadoc_parsing7, test_ignore_misplaced_javadoc_parsing8, test_ignore_misplaced_javadoc_parsing9, test_initMods_1, test_initMods_2, test_initMods_3, test_initMods_4, testAugmentingMethodDeclJavadocParsing1, testClassDeclJavadocParsing1, testClassDeclJavadocParsing2, testClassDeclJavadocParsing3, testClassDeclJavadocParsing4, testClassDeclJavadocParsing5, testClassDeclParsing, testFieldJavadocParsing1, testInitializerJavadocParsing1, testInnerClassJavadocParsing1, testInterfaceDeclJavadocParsing1, testMethodJavadocParsing1
 
Methods inherited from class org.multijava.util.testing.TestCase
assertDiff, assertEquals
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parsingController

private ParsingController parsingController

lexingController

private TokenStreamSelector lexingController

jmlLexer

private JmlLexer jmlLexer

docLexer

private JavadocLexer docLexer

jmlMLLexer

private JmlMLLexer jmlMLLexer

jmlSLLexer

private JmlSLLexer jmlSLLexer

parser

private JmlParser parser
Constructor Detail

TestJmlParser.Helper

public TestJmlParser.Helper(String name)
Method Detail

establishTest

protected void establishTest(String sourceCode,
                             boolean parseJavadocs)
Establish lexers and parsers for the given source code, parsing javadoc comments according to the given boolean.

Overrides:
establishTest in class TestMjcParser

getJmlAST

protected JmlCompilationUnit getJmlAST(String sourceCode)
                                throws antlr.RecognitionException,
                                       antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getMethodSpecification

protected JmlMethodSpecification getMethodSpecification(String sourceCode)
                                                 throws antlr.RecognitionException,
                                                        antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getGenericSpecCase

protected JmlGenericSpecCase getGenericSpecCase(String sourceCode)
                                         throws antlr.RecognitionException,
                                                antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getGenericSpecStatementCase

protected JmlGenericSpecCase getGenericSpecStatementCase(String sourceCode)
                                                  throws antlr.RecognitionException,
                                                         antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getAbruptSpecCase

protected JmlAbruptSpecCase getAbruptSpecCase(String sourceCode)
                                       throws antlr.RecognitionException,
                                              antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getSpecBody

protected JmlSpecBodyClause[] getSpecBody(String sourceCode)
                                   throws antlr.RecognitionException,
                                          antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getRequiresClause

protected JmlRequiresClause getRequiresClause(String sourceCode)
                                       throws antlr.RecognitionException,
                                              antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getSpecBodyClause

protected JmlSpecBodyClause getSpecBodyClause(String sourceCode)
                                       throws antlr.RecognitionException,
                                              antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getModelProgram

protected JmlModelProgram getModelProgram(long modifiers,
                                          String sourceCode)
                                   throws antlr.RecognitionException,
                                          antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getSpecVarDecls

protected JmlSpecVarDecl[] getSpecVarDecls(String sourceCode)
                                    throws antlr.RecognitionException,
                                           antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

getStatement

protected JStatement getStatement(String sourceCode)
                           throws antlr.RecognitionException,
                                  antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.