jTracer  1.03
Stack trace visualization tool
boolean org.libcsdbg.jtracer.Highlighter.lookup ( String  token,
String  nm,
boolean  regex 
)

Check if a word belongs in a dictionary.

Parameters
[in]tokenthe word
[in]nmthe dictionary name
[in]regextrue to use the dictionary entries as regular expressions
Returns
true if the word belongs to the dictionary, false otherwise

Definition at line 93 of file Highlighter.java.

Referenced by org.libcsdbg.jtracer.TracePane.append().

94  {
95  Vector<String> words = get(nm);
96  if (words == null)
97  return false;
98 
99  for (int i = 0, cnt = words.size(); i < cnt; i++) {
100  String exp = words.get(i);
101 
102  if (regex) {
103  if (token.matches(exp))
104  return true;
105  }
106 
107  else if (token.equals(exp))
108  return true;
109  }
110 
111  return false;
112  }

+ Here is the caller graph for this function: