1+ /**
2+ * Provides classes and predicates for working with SMAP files (see JSR-045).
3+ */
4+
15import java
26
3- predicate smap ( File inputFile , int inLine , File outputFile , int outLineStart , int outLineEnd ) {
7+ /**
8+ * Holds if there exists a mapping between an SMAP input file and line
9+ * and a corresponding SMAP output file and line range.
10+ */
11+ private predicate smap ( File inputFile , int inLine , File outputFile , int outLineStart , int outLineEnd ) {
412 exists (
513 string defaultStratum , int inputFileNum , int inStart , int inCount , int outStart , int outIncr ,
614 int n
@@ -15,13 +23,24 @@ predicate smap(File inputFile, int inLine, File outputFile, int outLineStart, in
1523 )
1624}
1725
18- predicate smap ( File inputFile , int inLine , File outputFile , int outLine ) {
26+ /**
27+ * Holds if there exists a mapping between an SMAP input file and line
28+ * and a corresponding SMAP output file and line.
29+ */
30+ private predicate smap ( File inputFile , int inLine , File outputFile , int outLine ) {
1931 exists ( int outLineStart , int outLineEnd |
2032 smap ( inputFile , inLine , outputFile , outLineStart , outLineEnd ) and
2133 outLine in [ outLineStart .. outLineEnd ]
2234 )
2335}
2436
37+ /**
38+ * Holds if an SMAP input location (with path, line and column information)
39+ * has a corresponding SMAP output location (with path and line information).
40+ *
41+ * For example, an SMAP input location may be a location within a JSP file,
42+ * which may have a corresponding SMAP output location in generated Java code.
43+ */
2544predicate hasSmapLocationInfo (
2645 string inputPath , int isl , int isc , int iel , int iec , string outputPath , int osl , int oel
2746) {
0 commit comments