Main Page   Compound List   Compound Members  

VariableChecker Class Reference

Collaboration diagram for VariableChecker:

Collaboration graph
[legend]
List of all members.

Public Methods

 VariableChecker ()
 VariableChecker (final String s, final boolean isMemberVariable)
void setClassName (final String className)
String getClassName ()
void setPrintDebugging ()
void remove ()
boolean isMethodOpen ()
HashMap returnHashMap ()
void printArrayList ()
void printArrayList (final ArrayList arrayList)
void printHashMap ()
boolean storeIfInTempList (final String variable)
void addVariable (final String variable, final VariableChecker variableChecker, final boolean isMemberReference)
void addVariable (final String variable, final String className)
void addVariable (final String variable)
void addDeclaredVariable (final String variable, final VariableType variableType, final boolean strictOpt)
void addDeclaredVariable (final String variable, final int lineNumber)
void addDeclaredVariable (final String variable)
void clear ()
void addVariables (final String className)
void addVariables (int lineNumber)
void addVariables ()
void printDebug ()
void print (final String fileName)

Static Public Methods

boolean isEmpty (final String s)
void printHashMap (final HashMap hashMap)
String getKeyFromEntry (final Object entry)

Detailed Description

Check modifier occurences VariableChecker

Author:
Roni Hursti
Version:
1.0
See also:
StringTokenizer , HashMap , ArrayList , Set
Since:
jdk1.2


Constructor & Destructor Documentation

VariableChecker::VariableChecker   [inline]
 

Default constructor

VariableChecker::VariableChecker final String    s,
final boolean    isMemberVariable
[inline]
 

A constructor

Parameters:
s  String for modifier printout
isMemberVariable  boolean for member variable information


Member Function Documentation

void VariableChecker::addDeclaredVariable final String    variable [inline]
 

Add declared variable to the hashmap If the variable already is in the hashmap then do nothing

Parameters:
variable  String which we add to the hashmap

void VariableChecker::addDeclaredVariable final String    variable,
final int    lineNumber
[inline]
 

Add declared variable to the hashmap If member variable already is in the hashmap then create a new arraylist entry

Parameters:
variable  String which we add to the hashmap
lineNumber  int line number in where the modifier occured for the first time

void VariableChecker::addDeclaredVariable final String    variable,
final VariableType    variableType,
final boolean    strictOpt
[inline]
 

Add declared variable to the hashmap If member variable already is in the hashmap then create a new arraylist entry

Parameters:
variable  String which we add to the hashmap
variableType  VariableType holds the information of variable's type
strictOpt  boolean holds the information has the no_strict option (check also public, protected or private protected) given

void VariableChecker::addVariable final String    variable [inline]
 

Add variable occurence to the hashmap

Parameters:
variable  String which we add to the hashMap

void VariableChecker::addVariable final String    variable,
final String    className
[inline]
 

Add variable occurence to the hashmap

Parameters:
variable  String which we add to the hashMap
className  StringClass name for variable

void VariableChecker::addVariable final String    variable,
final VariableChecker    variableChecker,
final boolean    isMemberReference
[inline]
 

Add variable occurence to the hashmap

Parameters:
variable  String which we add to the hashMap
variableChecker  VariableChecker variableChecker object (for member variables)
isMemberReference  boolean is member reference

boolean VariableChecker::isEmpty final String    s [inline, static]
 

Check if the parameter string is empty. Return true if it is empty and otherwise return false

Parameters:
s  String input parameter for checking empty

boolean VariableChecker::isMethodOpen   [inline]
 

Check if there is an open method

Returns:
true if method is still open

void VariableChecker::printArrayList final ArrayList    arrayList [inline]
 

Print member HashMap table

Parameters:
arrayList  the arraylist which is printed out

void VariableChecker::printArrayList   [inline]
 

Print member HashMap table

void VariableChecker::printHashMap final HashMap    hashMap [inline, static]
 

Print parameter's HashMap table

Parameters:
hashmap  HashMap input parameter for printing hashmap

void VariableChecker::printHashMap   [inline]
 

Print hashMap information

void VariableChecker::remove   [inline]
 

Remove the whole variableMap from arraylist

HashMap VariableChecker::returnHashMap   [inline]
 

Return hashMap copy

Returns:
hashmap

boolean VariableChecker::storeIfInTempList final String    variable [inline]
 

Store variable in tempArrayList if variable exists in tempArrayList then return true

Parameters:
variable  which is stored in tempArrayList if exists
Returns:
true if variable exists in tempArrayList


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 08:52:10 2002 for JavaChecker by doxygen1.2.15