auto import from //branches/cupcake_rel/...@138607
diff --git a/tools/test-progress-new/src/testprogress2/AnnotationPointer.java b/tools/test-progress-new/src/testprogress2/AnnotationPointer.java
new file mode 100644
index 0000000..8f466de
--- /dev/null
+++ b/tools/test-progress-new/src/testprogress2/AnnotationPointer.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package testprogress2;
+
+import com.sun.javadoc.ExecutableMemberDoc;
+
+import java.util.ArrayList;
+import java.util.List;
+
+// points from one targetMethod to 0..n testMethods which test the target method
+public class AnnotationPointer {
+ final ExecutableMemberDoc targetMethod;
+
+ private List<TestTargetNew> targets = new ArrayList<TestTargetNew>();
+
+ AnnotationPointer(ExecutableMemberDoc targetMethod) {
+ this.targetMethod = targetMethod;
+ }
+
+ public void addTestTargetNew(TestTargetNew testMethodInfo) {
+ /*
+ * if (testMethods.contains(testMethodInfo)) { throw new
+ * RuntimeException("warn: testMethod refers more than once to the
+ * targetMethod, testMethod="+testMethodInfo.getMethodDoc());
+ * //System.out.println("warn: testMethod refers more than once to the
+ * targetMethod, testMethod="+testMethod); } else {
+ */
+ targets.add(testMethodInfo);
+ // }
+ }
+
+ public List<TestTargetNew> getTargets() {
+ return targets;
+ }
+
+ public void addProxiesFrom(AnnotationPointer ap) {
+ List<TestTargetNew> t = ap.targets;
+ // clone the TestTargetNew and add to it a note from which
+ // target method it orignally stems
+ for (TestTargetNew ttn : t) {
+ TestTargetNew tnew = ttn.cloneMe("<b>(INDIRECTLY tested)</b>");
+ targets.add(tnew);
+ }
+ }
+}