src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java

Print this page

        

@@ -108,10 +108,22 @@
         names = new String[Limit.values().length];
         caches = new Map[Limit.values().length];
     }
 
     /**
+     * Reset all limits to their default status
+     */
+    public void reset() {
+        for (int i=0; i<Limit.values().length; i++) {
+            values[i] = 0;
+            totalValue[i] = 0;
+            names[i] = null;
+            caches[i] = null;
+        }
+    }
+
+    /**
      * Add the value to the current max count for the specified property
      * To find the max value of all entities, set no limit
      *
      * @param limit the type of the property
      * @param entityName the name of the entity