/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* Abstract class to help check the scopes in a parsed source file.
* -- parse source file
* -- scan trees looking for string literals
* -- check the scope at that point against the string, using
* boolean check(Scope s, String ref)
*/
abstract class Checker {
// parse the source file and call check(scope, string) for each string literal found
public void report(Diagnostic d) {
errors = true;
new Exception().printStackTrace();
}
};
if (errors)
throw new AssertionError("errors occurred creating trees");
ScopeScanner s = new ScopeScanner();
}
if (errors)
throw new AssertionError("errors occurred checking scopes");
}
// default impl: split ref at ";" and call checkLocal(scope, ref_segment) on scope and its enclosing scopes
// System.err.println("check scope: " + s);
// System.err.println("check ref: " + ref);
return true;
if (s == null) {
return false;
}
return false;
}
if (semi == -1) {
} else {
}
}
// override if using default check(Scope,String)
throw new IllegalStateException();
}
errors = true;
}
return task.getElements();
}
}
boolean errors = false;
// scan a parse tree, and for every string literal found, call check(scope, string) with
// the string value at the scope at that point
// long line = lineMap.getLineNumber(((JCTree)tree).pos/*trees.getSourcePositions().getStartPosition(tree)*/);
// System.err.println(line + ": " + abbrev(tree));
return null;
}
int max = 48;
}
}
// prefix filenames with a directory
return files;
}
for (T t: iter)
l.add(t);
return l;
}
}