rj.tools.jcsc
Class JavaCodingStandardChecker

java.lang.Object
  extended byrj.tools.jcsc.JavaCodingStandardChecker
All Implemented Interfaces:
JavaCodingStandardCheckerConstants

public class JavaCodingStandardChecker
extends java.lang.Object
implements JavaCodingStandardCheckerConstants

Grammar to parse Java version 1.5

Version:
__0.98.1__
Author:
Sreenivasa Viswanadha - Simplified and enhanced for 1.5, Ralph Jocham

Nested Class Summary
static class JavaCodingStandardChecker.ModifierSet
          Class to hold modifiers.
 
Field Summary
 Token jj_nt
           
 boolean lookingAhead
           
static java.util.ArrayList sAuthors
           
static int sCCNCount
          counter to keep track of CCS (cyclomatic complexity number)
static rj.tools.jcsc.JavaCodingStandardChecker.CurrentState sCurrentState
          State of the current class declaration.
static int sIgnoreTestSeverity
          threshold severity to filter out violations on Unit-Test classes which severity is lower or equal.
static java.lang.String sJVMVersion
          jvm spec version
static java.lang.StringBuffer sLastComment
          last read comment block
static java.lang.String sLastJavaDoc
          last read java doc
static int sLineCount
          line counter; incremented by 1 for each \n found
static java.util.ArrayList sMethodMetrics
           
static int sMethodsCount
          counter to keep track of methods
static int sNCSSCount
          counter to keep track of NCSS (non commenting source statements)
static boolean sNewLine
          true if \n was lexed; has to be set to false on own accord
static boolean sReturn
          true if return statement was the last one
static int sSpaceCount
          counter to keep track of spaces after statement keyword
static int sUnitTestClassCount
          counter to keep track of unit test classes
static int sUnitTestsCount
          counter to keep track of unit tests
static java.util.ArrayList sViolations
           
 Token token
           
 JavaCodingStandardCheckerTokenManager token_source
           
 
Fields inherited from interface rj.tools.jcsc.JavaCodingStandardCheckerConstants
_DEFAULT, ABSTRACT, ANDASSIGN, ASSERT, ASSIGN, AT, BANG, BIT_AND, BIT_OR, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COLON, COMMA, CONST, CONTINUE, DECIMAL_LITERAL, DECR, DEFAULT, DIGIT, DO, DOT, DOUBLE, ELLIPSIS, ELSE, ENUM, EOF, EQ, EXPONENT, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, GE, GOTO, GT, HEX_LITERAL, HOOK, IDENTIFIER, IF, IMPLEMENTS, IMPORT, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INCR, INSTANCEOF, INT, INTEGER_LITERAL, INTERFACE, LBRACE, LBRACKET, LE, LETTER, LONG, LPAREN, LSHIFT, LSHIFTASSIGN, LT, MINUS, MINUSASSIGN, MULTI_LINE_COMMENT, NATIVE, NE, NEW, NULL, OCTAL_LITERAL, ORASSIGN, PACKAGE, PLUS, PLUSASSIGN, PRIVATE, PROTECTED, PUBLIC, RBRACE, RBRACKET, REM, REMASSIGN, RETURN, RPAREN, RSIGNEDSHIFT, RSIGNEDSHIFTASSIGN, RUNSIGNEDSHIFT, RUNSIGNEDSHIFTASSIGN, SC_AND, SC_OR, SEMICOLON, SHORT, SINGLE_LINE_COMMENT, SLASH, SLASHASSIGN, STAR, STARASSIGN, STATIC, STRICTFP, STRING_LITERAL, SUPER, SWITCH, SYNCHRONIZED, THIS, THROW, THROWS, TILDE, tokenImage, TRANSIENT, TRUE, TRY, VOID, VOLATILE, WHILE, XOR, XORASSIGN
 
Constructor Summary
JavaCodingStandardChecker(java.io.InputStream stream)
           
JavaCodingStandardChecker(JavaCodingStandardCheckerTokenManager tm)
           
JavaCodingStandardChecker(java.io.Reader stream)
           
 
Method Summary
 void AdditiveExpression()
           
 void AllocationExpression()
           
 void AndExpression()
           
 void Annotation()
           
 void AnnotationTypeBody()
           
 java.lang.String AnnotationTypeDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
           
 void AnnotationTypeMemberDeclaration()
           
static void appendComment(java.lang.String comment)
           
 void ArgumentList()
           
 void Arguments()
           
 void ArrayDimsAndInits()
           
 void ArrayInitializer()
           
 void AssertStatement()
           
 void AssignmentOperator()
           
 void Block()
           
 void BlockStatement()
           
 void BooleanLiteral()
           
 void BreakStatement()
           
 void CastExpression()
           
 void CastLookahead()
           
 void CatchBlock()
           
 void ClassOrInterfaceBody(boolean isInterface)
           
 void ClassOrInterfaceBodyDeclaration(boolean isInterface)
           
 java.lang.String ClassOrInterfaceDeclaration(JavaCodingStandardChecker.ModifierSet modifiers, java.lang.String type)
           
 java.lang.String ClassOrInterfaceType()
           
 void CompilationUnit()
          THE JAVA LANGUAGE GRAMMAR STARTS HERE *
 void ConditionalAndExpression()
           
 void ConditionalExpression()
           
 void ConditionalOrExpression()
           
 void ConstructorDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
           
 void ContinueStatement()
           
 void DefaultValue()
           
 void disable_tracing()
           
 void DoStatement()
           
 void EmptyStatement()
           
 void enable_tracing()
           
 void EnumBody()
           
 void EnumConstant()
           
 java.lang.String EnumDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
           
 void EqualityExpression()
           
 void ExclusiveOrExpression()
           
 void ExplicitConstructorInvocation()
           
 void Expression()
           
 void ExtendsList(boolean isInterface)
           
 void FieldDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
           
 void FinallyBlock()
           
 void ForInit()
           
 Return.FormalParameterReturn FormalParameter()
           
 int FormalParameters()
           
 void ForStatement()
           
 void ForUpdate()
           
 ParseException generateParseException()
           
 java.util.List getAuthors()
          getAuthors - get list of all @authors as a comma separated string
 int getLineCount()
          getLineCount - get the count of lines
 int getMethodsCount()
          getMethodsCount - call this method after a successful parse to obtain the number of methods
 int getNCSSCount()
          getNCSS - get the count of NCSS non commenting source statements
 Token getNextToken()
           
 Token getToken(int index)
           
 int getUnitTestClassCount()
          getUnitTestClassCount - call this method after a successful parse to obtain the number of Unit test classes
 int getUnitTestsCount()
          getUnitTestsCount - call this method after a successful parse to obtain the number of Unit tests
 java.util.List getViolations()
          getViolations - call this method after a successful parse to obtain a List of violations.
 int getViolationsCount()
          getViolationsCount - call this method after a successful parse to obtain the number of violations
static void handleComplexLoopExpression(java.lang.String pExpression, int pLine, int pColumn)
          handleComplexLoopExpression checks break condition is based on an operation rather then on a constant
static void handleConditionalExpression(int pLine, int pColumn)
          handleConditionalExpression checks if cond expression are allowd or not
static void handleConstructorDeclarationJavaDoc(java.lang.String pDoc, java.lang.String pAccess, int pParaCount, java.util.ArrayList pExcpts, int pLine, int pColumn)
          handleConstructorDeclarationJavaDoc handles the javadoc for constructor declarations.
static void handleFieldDeclarationJavaDoc(java.lang.String pDoc, java.lang.String pAccess, int pLine, int pColumn)
          handleFieldDeclarationJavaDoc handles the javadoc for field declarations.
static void handleJavaDocTagOrder(JavaDocParser pJdp, int pLine, int pColumn)
          handleJavaDocTagOrder handles if the javadoc tag order correct
static void handleMethodDeclarationJavaDoc(java.lang.String pDoc, java.lang.String pAccess, java.lang.String pReturn, int pParaCount, java.util.ArrayList pExcpts, int pLine, int pColumn)
          handleMethodDeclarationJavaDoc handles the javadoc for method declarations.
static void handleParaRegExp(java.lang.String pAccess, java.lang.String pName, int pLine, int pColumn)
          Checks if parameter does have the correct prefix
static void handleSpaceAfterStatementKeyword(java.lang.String pKind, int pLine, int pColumn)
          handleSpaceAfterStatementKeyword checks if the space count is not '0'.
static void handleStringLiteral(java.lang.String pLiteral, int pLine, int pColumn)
          handleStringLiteral checks if String literal is allowed
static void handleTypeDeclarationJavaDoc(java.lang.String pDoc, java.lang.String pType, int pLine, int pColumn)
          handleTypeDeclarationJavaDoc handles the javadoc for class declarations.
static void handleTypeHeaderExpression(java.lang.StringBuffer pHeader, int pLine, int pColumn)
          handleTypeHeaderExpression handles if the type (class/i-face) do start with the correct header
 void IfStatement()
           
 void ImplementsList(boolean isInterface)
           
 void ImportDeclaration()
           
 void InclusiveOrExpression()
           
static void incrementLineCount(int pCount)
          incrementLineCount increments the line count
static void incrementSpace()
          incrementSpace is called by the tokenizer when a space is read
 void Initializer()
           
 void InstanceOfExpression()
           
static boolean isRegexpMatch(java.lang.Object regexp, java.lang.Object value)
          isRegexpMatch return whether the regexp matches the value.
 void LabeledStatement()
           
 void Literal()
           
 void LocalVariableDeclaration()
           
 void LoopExpression()
           
static void main(java.lang.String[] args)
          Main - The starting point
 void MarkerAnnotation()
           
 void MemberSelector()
           
 void MemberValue()
           
 void MemberValueArrayInitializer()
           
 void MemberValuePair()
           
 void MemberValuePairs()
           
 void MethodDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
           
 Return.MethodDeclaratorReturn MethodDeclarator()
           
 JavaCodingStandardChecker.ModifierSet Modifiers()
           
 void MultiplicativeExpression()
           
 java.lang.String Name()
           
 java.util.ArrayList NameList()
           
 void NormalAnnotation()
           
 void NullLiteral()
           
static void overviewClassResults()
          During parsing global issues are checked whose result is here generated
 void PackageDeclaration()
           
 void parse()
          parse - do the parsing!!!
 void PostfixExpression()
           
 void PreDecrementExpression()
           
 void PreIncrementExpression()
           
 void PrimaryExpression()
           
 java.lang.String PrimaryPrefix()
           
 java.lang.String PrimarySuffix()
           
 java.lang.String PrimitiveType()
           
 java.lang.String ReferenceType()
           
 void ReInit(java.io.InputStream stream)
           
 void ReInit(JavaCodingStandardCheckerTokenManager tm)
           
 void ReInit(java.io.Reader stream)
           
 void RelationalExpression()
           
static void resetLineCount()
          resetLineCount resets the line counter to 0
static void resetNewLine()
          resetNewLine resets the new line flag to false
static void resetSpaceCount()
          resetSpaceCount resets the current space count to '0'
 java.lang.String ResultType()
           
 void ReturnStatement()
           
 void RSIGNEDSHIFT()
           
 void RUNSIGNEDSHIFT()
           
 void setFileName(java.lang.String fileName)
          setFileName - set the absolute path of the file to be parsed
 void setIgnoreTestSeverity(int severity)
          setIgnoreTestSeveriyt - can be used to filter violations up to (including) a specific value on Unit-Test classes.
static void setLastJavaDoc(java.lang.String doc)
          setLastJavaDoc set the last JavaDoc of the current class
static void setNewLine()
          setNewLine resets the new line flag to true
 void setResultsFormatter(ResultsFormatter resultsFormatter)
          setResultsFormatter - set the resulsthander to handle the violations.
 void setRules(java.util.Map cache)
          Set the checking rules according to a property file
 void ShiftExpression()
           
 void SingleMemberAnnotation()
           
 void SpecialStatementBlock(java.lang.String pKind)
           
 void Statement()
           
 void StatementExpression()
           
 void StatementExpressionList()
           
 boolean SwitchLabel()
           
 void SwitchStatement()
           
 void SynchronizedStatement()
           
 void ThrowStatement()
           
 void TryStatement()
           
 java.lang.String Type()
           
 void TypeArgument()
           
 void TypeArguments()
           
 void TypeBound()
           
 java.lang.String TypeDeclaration()
           
 void TypeParameter()
           
 void TypeParameters()
           
 void UnaryExpression()
           
 void UnaryExpressionNotPlusMinus()
           
 java.lang.String VariableDeclarator()
           
 java.lang.String VariableDeclaratorId()
           
 void VariableInitializer()
           
 void WhileStatement()
           
 void WildcardBounds()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sAuthors

public static java.util.ArrayList sAuthors

sViolations

public static java.util.ArrayList sViolations

sMethodMetrics

public static java.util.ArrayList sMethodMetrics

sJVMVersion

public static java.lang.String sJVMVersion
jvm spec version


sLastJavaDoc

public static java.lang.String sLastJavaDoc
last read java doc


sLastComment

public static java.lang.StringBuffer sLastComment
last read comment block


sSpaceCount

public static int sSpaceCount
counter to keep track of spaces after statement keyword


sUnitTestClassCount

public static int sUnitTestClassCount
counter to keep track of unit test classes


sUnitTestsCount

public static int sUnitTestsCount
counter to keep track of unit tests


sMethodsCount

public static int sMethodsCount
counter to keep track of methods


sNCSSCount

public static int sNCSSCount
counter to keep track of NCSS (non commenting source statements)


sCCNCount

public static int sCCNCount
counter to keep track of CCS (cyclomatic complexity number)


sReturn

public static boolean sReturn
true if return statement was the last one


sNewLine

public static boolean sNewLine
true if \n was lexed; has to be set to false on own accord


sLineCount

public static int sLineCount
line counter; incremented by 1 for each \n found


sIgnoreTestSeverity

public static int sIgnoreTestSeverity
threshold severity to filter out violations on Unit-Test classes which severity is lower or equal.


sCurrentState

public static rj.tools.jcsc.JavaCodingStandardChecker.CurrentState sCurrentState
State of the current class declaration. Pushed/Poped from Stack.


token_source

public JavaCodingStandardCheckerTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

JavaCodingStandardChecker

public JavaCodingStandardChecker(java.io.InputStream stream)

JavaCodingStandardChecker

public JavaCodingStandardChecker(java.io.Reader stream)

JavaCodingStandardChecker

public JavaCodingStandardChecker(JavaCodingStandardCheckerTokenManager tm)
Method Detail

main

public static void main(java.lang.String[] args)
Main - The starting point

Parameters:
args - a String[] value - the arguments

parse

public void parse()
parse - do the parsing!!!


getViolations

public java.util.List getViolations()
getViolations - call this method after a successful parse to obtain a List of violations. The violations are sorted accorind to the configuration.

Returns:
an int value

getViolationsCount

public int getViolationsCount()
getViolationsCount - call this method after a successful parse to obtain the number of violations

Returns:
an int value

getUnitTestClassCount

public int getUnitTestClassCount()
getUnitTestClassCount - call this method after a successful parse to obtain the number of Unit test classes

Returns:
an int value

getUnitTestsCount

public int getUnitTestsCount()
getUnitTestsCount - call this method after a successful parse to obtain the number of Unit tests

Returns:
an int value

getMethodsCount

public int getMethodsCount()
getMethodsCount - call this method after a successful parse to obtain the number of methods

Returns:
an int value

getAuthors

public java.util.List getAuthors()
getAuthors - get list of all @authors as a comma separated string

Returns:
an List value

getNCSSCount

public int getNCSSCount()
getNCSS - get the count of NCSS non commenting source statements

Returns:
an int value

getLineCount

public int getLineCount()
getLineCount - get the count of lines

Returns:
an int value

setResultsFormatter

public void setResultsFormatter(ResultsFormatter resultsFormatter)
setResultsFormatter - set the resulsthander to handle the violations. The results handler uses the output stream.

Parameters:
resultsFormatter - a ResultsFormatter value

setIgnoreTestSeverity

public void setIgnoreTestSeverity(int severity)
setIgnoreTestSeveriyt - can be used to filter violations up to (including) a specific value on Unit-Test classes. That way Unit-Test classes may only report violation which are above the value threshold so that Unit-Test classes may have some low severity violations


setFileName

public void setFileName(java.lang.String fileName)
setFileName - set the absolute path of the file to be parsed

Parameters:
fileName - a String value

setRules

public void setRules(java.util.Map cache)
Set the checking rules according to a property file


isRegexpMatch

public static boolean isRegexpMatch(java.lang.Object regexp,
                                    java.lang.Object value)
isRegexpMatch return whether the regexp matches the value. toString() is called on either of the parameters to get the string representation

Parameters:
regexp - a Object value
value - a Object value
Returns:
a boolean value

handleTypeHeaderExpression

public static void handleTypeHeaderExpression(java.lang.StringBuffer pHeader,
                                              int pLine,
                                              int pColumn)
handleTypeHeaderExpression handles if the type (class/i-face) do start with the correct header

Parameters:
pHeader - a StringBuffer value
pLine - an int value
pColumn - an int value

handleParaRegExp

public static void handleParaRegExp(java.lang.String pAccess,
                                    java.lang.String pName,
                                    int pLine,
                                    int pColumn)
Checks if parameter does have the correct prefix

Parameters:
pName - a value of type 'StringBuffer'
pLine - a value of type 'int'

overviewClassResults

public static void overviewClassResults()
During parsing global issues are checked whose result is here generated


incrementSpace

public static void incrementSpace()
incrementSpace is called by the tokenizer when a space is read


resetSpaceCount

public static void resetSpaceCount()
resetSpaceCount resets the current space count to '0'


resetNewLine

public static void resetNewLine()
resetNewLine resets the new line flag to false


setNewLine

public static void setNewLine()
setNewLine resets the new line flag to true


incrementLineCount

public static void incrementLineCount(int pCount)
incrementLineCount increments the line count

Parameters:
pCount - the increment value

resetLineCount

public static void resetLineCount()
resetLineCount resets the line counter to 0


setLastJavaDoc

public static void setLastJavaDoc(java.lang.String doc)
setLastJavaDoc set the last JavaDoc of the current class


appendComment

public static void appendComment(java.lang.String comment)

handleSpaceAfterStatementKeyword

public static void handleSpaceAfterStatementKeyword(java.lang.String pKind,
                                                    int pLine,
                                                    int pColumn)
handleSpaceAfterStatementKeyword checks if the space count is not '0'.

Parameters:
pLine - an int value is current line number
pKind - a String value is the type of the statement

handleStringLiteral

public static void handleStringLiteral(java.lang.String pLiteral,
                                       int pLine,
                                       int pColumn)
handleStringLiteral checks if String literal is allowed

Parameters:
pLine - an int value is the current line number
pLiteral - a String value is the string literl

handleComplexLoopExpression

public static void handleComplexLoopExpression(java.lang.String pExpression,
                                               int pLine,
                                               int pColumn)
handleComplexLoopExpression checks break condition is based on an operation rather then on a constant

Parameters:
pExpression - a StringBuffer value is the complex loop expr
pLine - a int line number
pColumn - an int column number

handleConditionalExpression

public static void handleConditionalExpression(int pLine,
                                               int pColumn)
handleConditionalExpression checks if cond expression are allowd or not

Parameters:
pLine - a int line number
pColumn - an int column number

handleTypeDeclarationJavaDoc

public static void handleTypeDeclarationJavaDoc(java.lang.String pDoc,
                                                java.lang.String pType,
                                                int pLine,
                                                int pColumn)
handleTypeDeclarationJavaDoc handles the javadoc for class declarations.

Parameters:
pDoc - a String value
pType - a String value
pLine - a int line number
pColumn - an int column number

handleConstructorDeclarationJavaDoc

public static void handleConstructorDeclarationJavaDoc(java.lang.String pDoc,
                                                       java.lang.String pAccess,
                                                       int pParaCount,
                                                       java.util.ArrayList pExcpts,
                                                       int pLine,
                                                       int pColumn)
handleConstructorDeclarationJavaDoc handles the javadoc for constructor declarations.

Parameters:
pDoc - a String value
pAccess - a String value
pParaCount - a int value
pExcpts - a ArrayList value
pLine - a int line number
pColumn - an int column number

handleMethodDeclarationJavaDoc

public static void handleMethodDeclarationJavaDoc(java.lang.String pDoc,
                                                  java.lang.String pAccess,
                                                  java.lang.String pReturn,
                                                  int pParaCount,
                                                  java.util.ArrayList pExcpts,
                                                  int pLine,
                                                  int pColumn)
handleMethodDeclarationJavaDoc handles the javadoc for method declarations.

Parameters:
pDoc - a String value
pAccess - a String value
pParaCount - a int value
pExcpts - a ArrayList value
pLine - a int line number
pColumn - an int column number

handleFieldDeclarationJavaDoc

public static void handleFieldDeclarationJavaDoc(java.lang.String pDoc,
                                                 java.lang.String pAccess,
                                                 int pLine,
                                                 int pColumn)
handleFieldDeclarationJavaDoc handles the javadoc for field declarations.

Parameters:
pDoc - a String value
pAccess - a String value
pLine - a int line number
pColumn - an int column number

handleJavaDocTagOrder

public static void handleJavaDocTagOrder(JavaDocParser pJdp,
                                         int pLine,
                                         int pColumn)
handleJavaDocTagOrder handles if the javadoc tag order correct

Parameters:
pJdp - a JavaDocParser value
pLine - an int value
pColumn - an int value

CompilationUnit

public final void CompilationUnit()
                           throws ParseException
THE JAVA LANGUAGE GRAMMAR STARTS HERE *

Throws:
ParseException

PackageDeclaration

public final void PackageDeclaration()
                              throws ParseException
Throws:
ParseException

ImportDeclaration

public final void ImportDeclaration()
                             throws ParseException
Throws:
ParseException

Modifiers

public final JavaCodingStandardChecker.ModifierSet Modifiers()
                                                      throws ParseException
Throws:
ParseException

TypeDeclaration

public final java.lang.String TypeDeclaration()
                                       throws ParseException
Throws:
ParseException

ClassOrInterfaceDeclaration

public final java.lang.String ClassOrInterfaceDeclaration(JavaCodingStandardChecker.ModifierSet modifiers,
                                                          java.lang.String type)
                                                   throws ParseException
Throws:
ParseException

ExtendsList

public final void ExtendsList(boolean isInterface)
                       throws ParseException
Throws:
ParseException

ImplementsList

public final void ImplementsList(boolean isInterface)
                          throws ParseException
Throws:
ParseException

EnumDeclaration

public final java.lang.String EnumDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
                                       throws ParseException
Throws:
ParseException

EnumBody

public final void EnumBody()
                    throws ParseException
Throws:
ParseException

EnumConstant

public final void EnumConstant()
                        throws ParseException
Throws:
ParseException

TypeParameters

public final void TypeParameters()
                          throws ParseException
Throws:
ParseException

TypeParameter

public final void TypeParameter()
                         throws ParseException
Throws:
ParseException

TypeBound

public final void TypeBound()
                     throws ParseException
Throws:
ParseException

ClassOrInterfaceBody

public final void ClassOrInterfaceBody(boolean isInterface)
                                throws ParseException
Throws:
ParseException

ClassOrInterfaceBodyDeclaration

public final void ClassOrInterfaceBodyDeclaration(boolean isInterface)
                                           throws ParseException
Throws:
ParseException

FieldDeclaration

public final void FieldDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
                            throws ParseException
Throws:
ParseException

VariableDeclarator

public final java.lang.String VariableDeclarator()
                                          throws ParseException
Throws:
ParseException

VariableDeclaratorId

public final java.lang.String VariableDeclaratorId()
                                            throws ParseException
Throws:
ParseException

VariableInitializer

public final void VariableInitializer()
                               throws ParseException
Throws:
ParseException

ArrayInitializer

public final void ArrayInitializer()
                            throws ParseException
Throws:
ParseException

MethodDeclaration

public final void MethodDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
                             throws ParseException
Throws:
ParseException

MethodDeclarator

public final Return.MethodDeclaratorReturn MethodDeclarator()
                                                     throws ParseException
Throws:
ParseException

FormalParameters

public final int FormalParameters()
                           throws ParseException
Throws:
ParseException

FormalParameter

public final Return.FormalParameterReturn FormalParameter()
                                                   throws ParseException
Throws:
ParseException

ConstructorDeclaration

public final void ConstructorDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
                                  throws ParseException
Throws:
ParseException

ExplicitConstructorInvocation

public final void ExplicitConstructorInvocation()
                                         throws ParseException
Throws:
ParseException

Initializer

public final void Initializer()
                       throws ParseException
Throws:
ParseException

Type

public final java.lang.String Type()
                            throws ParseException
Throws:
ParseException

ReferenceType

public final java.lang.String ReferenceType()
                                     throws ParseException
Throws:
ParseException

ClassOrInterfaceType

public final java.lang.String ClassOrInterfaceType()
                                            throws ParseException
Throws:
ParseException

TypeArguments

public final void TypeArguments()
                         throws ParseException
Throws:
ParseException

TypeArgument

public final void TypeArgument()
                        throws ParseException
Throws:
ParseException

WildcardBounds

public final void WildcardBounds()
                          throws ParseException
Throws:
ParseException

PrimitiveType

public final java.lang.String PrimitiveType()
                                     throws ParseException
Throws:
ParseException

ResultType

public final java.lang.String ResultType()
                                  throws ParseException
Throws:
ParseException

Name

public final java.lang.String Name()
                            throws ParseException
Throws:
ParseException

NameList

public final java.util.ArrayList NameList()
                                   throws ParseException
Throws:
ParseException

Expression

public final void Expression()
                      throws ParseException
Throws:
ParseException

AssignmentOperator

public final void AssignmentOperator()
                              throws ParseException
Throws:
ParseException

ConditionalExpression

public final void ConditionalExpression()
                                 throws ParseException
Throws:
ParseException

ConditionalOrExpression

public final void ConditionalOrExpression()
                                   throws ParseException
Throws:
ParseException

ConditionalAndExpression

public final void ConditionalAndExpression()
                                    throws ParseException
Throws:
ParseException

InclusiveOrExpression

public final void InclusiveOrExpression()
                                 throws ParseException
Throws:
ParseException

ExclusiveOrExpression

public final void ExclusiveOrExpression()
                                 throws ParseException
Throws:
ParseException

AndExpression

public final void AndExpression()
                         throws ParseException
Throws:
ParseException

EqualityExpression

public final void EqualityExpression()
                              throws ParseException
Throws:
ParseException

InstanceOfExpression

public final void InstanceOfExpression()
                                throws ParseException
Throws:
ParseException

RelationalExpression

public final void RelationalExpression()
                                throws ParseException
Throws:
ParseException

ShiftExpression

public final void ShiftExpression()
                           throws ParseException
Throws:
ParseException

AdditiveExpression

public final void AdditiveExpression()
                              throws ParseException
Throws:
ParseException

MultiplicativeExpression

public final void MultiplicativeExpression()
                                    throws ParseException
Throws:
ParseException

UnaryExpression

public final void UnaryExpression()
                           throws ParseException
Throws:
ParseException

PreIncrementExpression

public final void PreIncrementExpression()
                                  throws ParseException
Throws:
ParseException

PreDecrementExpression

public final void PreDecrementExpression()
                                  throws ParseException
Throws:
ParseException

UnaryExpressionNotPlusMinus

public final void UnaryExpressionNotPlusMinus()
                                       throws ParseException
Throws:
ParseException

CastLookahead

public final void CastLookahead()
                         throws ParseException
Throws:
ParseException

PostfixExpression

public final void PostfixExpression()
                             throws ParseException
Throws:
ParseException

CastExpression

public final void CastExpression()
                          throws ParseException
Throws:
ParseException

PrimaryExpression

public final void PrimaryExpression()
                             throws ParseException
Throws:
ParseException

MemberSelector

public final void MemberSelector()
                          throws ParseException
Throws:
ParseException

PrimaryPrefix

public final java.lang.String PrimaryPrefix()
                                     throws ParseException
Throws:
ParseException

PrimarySuffix

public final java.lang.String PrimarySuffix()
                                     throws ParseException
Throws:
ParseException

Literal

public final void Literal()
                   throws ParseException
Throws:
ParseException

BooleanLiteral

public final void BooleanLiteral()
                          throws ParseException
Throws:
ParseException

NullLiteral

public final void NullLiteral()
                       throws ParseException
Throws:
ParseException

Arguments

public final void Arguments()
                     throws ParseException
Throws:
ParseException

ArgumentList

public final void ArgumentList()
                        throws ParseException
Throws:
ParseException

AllocationExpression

public final void AllocationExpression()
                                throws ParseException
Throws:
ParseException

ArrayDimsAndInits

public final void ArrayDimsAndInits()
                             throws ParseException
Throws:
ParseException

Statement

public final void Statement()
                     throws ParseException
Throws:
ParseException

AssertStatement

public final void AssertStatement()
                           throws ParseException
Throws:
ParseException

LabeledStatement

public final void LabeledStatement()
                            throws ParseException
Throws:
ParseException

Block

public final void Block()
                 throws ParseException
Throws:
ParseException

BlockStatement

public final void BlockStatement()
                          throws ParseException
Throws:
ParseException

LocalVariableDeclaration

public final void LocalVariableDeclaration()
                                    throws ParseException
Throws:
ParseException

EmptyStatement

public final void EmptyStatement()
                          throws ParseException
Throws:
ParseException

StatementExpression

public final void StatementExpression()
                               throws ParseException
Throws:
ParseException

SwitchStatement

public final void SwitchStatement()
                           throws ParseException
Throws:
ParseException

SwitchLabel

public final boolean SwitchLabel()
                          throws ParseException
Throws:
ParseException

SpecialStatementBlock

public final void SpecialStatementBlock(java.lang.String pKind)
                                 throws ParseException
Throws:
ParseException

IfStatement

public final void IfStatement()
                       throws ParseException
Throws:
ParseException

WhileStatement

public final void WhileStatement()
                          throws ParseException
Throws:
ParseException

DoStatement

public final void DoStatement()
                       throws ParseException
Throws:
ParseException

ForStatement

public final void ForStatement()
                        throws ParseException
Throws:
ParseException

LoopExpression

public final void LoopExpression()
                          throws ParseException
Throws:
ParseException

ForInit

public final void ForInit()
                   throws ParseException
Throws:
ParseException

StatementExpressionList

public final void StatementExpressionList()
                                   throws ParseException
Throws:
ParseException

ForUpdate

public final void ForUpdate()
                     throws ParseException
Throws:
ParseException

BreakStatement

public final void BreakStatement()
                          throws ParseException
Throws:
ParseException

ContinueStatement

public final void ContinueStatement()
                             throws ParseException
Throws:
ParseException

ReturnStatement

public final void ReturnStatement()
                           throws ParseException
Throws:
ParseException

ThrowStatement

public final void ThrowStatement()
                          throws ParseException
Throws:
ParseException

SynchronizedStatement

public final void SynchronizedStatement()
                                 throws ParseException
Throws:
ParseException

TryStatement

public final void TryStatement()
                        throws ParseException
Throws:
ParseException

CatchBlock

public final void CatchBlock()
                      throws ParseException
Throws:
ParseException

FinallyBlock

public final void FinallyBlock()
                        throws ParseException
Throws:
ParseException

RUNSIGNEDSHIFT

public final void RUNSIGNEDSHIFT()
                          throws ParseException
Throws:
ParseException

RSIGNEDSHIFT

public final void RSIGNEDSHIFT()
                        throws ParseException
Throws:
ParseException

Annotation

public final void Annotation()
                      throws ParseException
Throws:
ParseException

NormalAnnotation

public final void NormalAnnotation()
                            throws ParseException
Throws:
ParseException

MarkerAnnotation

public final void MarkerAnnotation()
                            throws ParseException
Throws:
ParseException

SingleMemberAnnotation

public final void SingleMemberAnnotation()
                                  throws ParseException
Throws:
ParseException

MemberValuePairs

public final void MemberValuePairs()
                            throws ParseException
Throws:
ParseException

MemberValuePair

public final void MemberValuePair()
                           throws ParseException
Throws:
ParseException

MemberValue

public final void MemberValue()
                       throws ParseException
Throws:
ParseException

MemberValueArrayInitializer

public final void MemberValueArrayInitializer()
                                       throws ParseException
Throws:
ParseException

AnnotationTypeDeclaration

public final java.lang.String AnnotationTypeDeclaration(JavaCodingStandardChecker.ModifierSet modifiers)
                                                 throws ParseException
Throws:
ParseException

AnnotationTypeBody

public final void AnnotationTypeBody()
                              throws ParseException
Throws:
ParseException

AnnotationTypeMemberDeclaration

public final void AnnotationTypeMemberDeclaration()
                                           throws ParseException
Throws:
ParseException

DefaultValue

public final void DefaultValue()
                        throws ParseException
Throws:
ParseException

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(JavaCodingStandardCheckerTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()


(c) 1999-2005 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License