Merge "Remove synchronized from docs"
am: 6677a753f1

* commit '6677a753f19096594d89cc323e7860e6c8d4f98e':
  Remove synchronized from docs
diff --git a/README.version b/README.version
new file mode 100644
index 0000000..f7c1fa0
--- /dev/null
+++ b/README.version
@@ -0,0 +1,3 @@
+URL: https://code.google.com/p/doclava/downloads/detail?name=doclava-1.0.6-bundle.zip&can=2&q=
+Version: 1.0.6
+BugComponent: 27745
diff --git a/src/com/google/doclava/Converter.java b/src/com/google/doclava/Converter.java
index 555fc39..af3068e 100644
--- a/src/com/google/doclava/Converter.java
+++ b/src/com/google/doclava/Converter.java
@@ -227,7 +227,8 @@
     if (p == null) return null;
     ParameterInfo pi =
         new ParameterInfo(p.name(), p.typeName(), Converter.obtainType(p.type()), isVarArg,
-          Converter.convertSourcePosition(pos));
+          Converter.convertSourcePosition(pos),
+          Arrays.asList(Converter.convertAnnotationInstances(p.annotations())));
     return pi;
   }
 
diff --git a/src/com/google/doclava/Doclava.java b/src/com/google/doclava/Doclava.java
index 23ede5f..8ad3904 100644
--- a/src/com/google/doclava/Doclava.java
+++ b/src/com/google/doclava/Doclava.java
@@ -799,11 +799,11 @@
         String templ = relative + f.getName();
         int len = templ.length();
         if (len > 3 && ".cs".equals(templ.substring(len - 3))) {
-          Data data = makeHDF();
+          Data data = makePackageHDF();
           String filename = templ.substring(0, len - 3) + htmlExtension;
           ClearPage.write(data, templ, filename, js);
         } else if (len > 3 && ".jd".equals(templ.substring(len - 3))) {
-          Data data = makeHDF();
+          Data data = makePackageHDF();
           String filename = templ.substring(0, len - 3) + htmlExtension;
           DocFile.writePage(f.getAbsolutePath(), relative, filename, data);
         } else if(!f.getName().equals(".DS_Store")){
diff --git a/src/com/google/doclava/InfoBuilder.java b/src/com/google/doclava/InfoBuilder.java
index a07f990..9f7e340 100644
--- a/src/com/google/doclava/InfoBuilder.java
+++ b/src/com/google/doclava/InfoBuilder.java
@@ -29,6 +29,7 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -1142,7 +1143,8 @@
                     commentAndPosition.setPosition(paramPart);
 
                     parameters.add(new ParameterInfo(name, type.qualifiedTypeName(), type,
-                            isVarArg, commentAndPosition.getPosition()));
+                            isVarArg, commentAndPosition.getPosition(),
+                            Collections.<AnnotationInstanceInfo>emptyList()));
                 }
             }
         }
diff --git a/src/com/google/doclava/ParameterInfo.java b/src/com/google/doclava/ParameterInfo.java
index b911283..10000df 100644
--- a/src/com/google/doclava/ParameterInfo.java
+++ b/src/com/google/doclava/ParameterInfo.java
@@ -20,16 +20,18 @@
 
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 
 public class ParameterInfo {
   public ParameterInfo(String name, String typeName, TypeInfo type, boolean isVarArg,
-      SourcePositionInfo position) {
+      SourcePositionInfo position, List<AnnotationInstanceInfo> annotationInstanceInfos) {
     mName = name;
     mTypeName = typeName;
     mType = type;
     mIsVarArg = isVarArg;
     mPosition = position;
+    mAnnotations = annotationInstanceInfos;
   }
 
   /**
@@ -37,7 +39,8 @@
    */
   public ParameterInfo cloneWithTypeArguments(Map<String, TypeInfo> typeArgumentMapping) {
     return new ParameterInfo(
-        mName, mTypeName, mType.getTypeWithArguments(typeArgumentMapping), mIsVarArg, mPosition);
+        mName, mTypeName, mType.getTypeWithArguments(typeArgumentMapping),
+        mIsVarArg, mPosition, mAnnotations);
   }
 
   TypeInfo type() {
@@ -60,6 +63,10 @@
     return mIsVarArg;
   }
 
+  List<AnnotationInstanceInfo> annotations() {
+    return mAnnotations;
+  }
+
   public void makeHDF(Data data, String base, boolean isLastVararg, HashSet<String> typeVariables) {
     makeHDF(data, base, isLastVararg, typeVariables, Collections.<String, TypeInfo>emptyMap());
   }
@@ -100,4 +107,5 @@
   TypeInfo mType;
   boolean mIsVarArg;
   SourcePositionInfo mPosition;
+  List<AnnotationInstanceInfo> mAnnotations;
 }
diff --git a/src/com/google/doclava/Stubs.java b/src/com/google/doclava/Stubs.java
index efcf89b..21d7d4b 100644
--- a/src/com/google/doclava/Stubs.java
+++ b/src/com/google/doclava/Stubs.java
@@ -667,7 +667,9 @@
     int count = 1;
     int size = method.parameters().size();
     for (ParameterInfo param : method.parameters()) {
-      stream.print(comma + fullParameterTypeName(method, param.type(), count == size) + " "
+      stream.print(comma);
+      writeAnnotations(stream, param.annotations(), false);
+      stream.print(fullParameterTypeName(method, param.type(), count == size) + " "
           + param.name());
       comma = ", ";
       count++;
@@ -1543,9 +1545,7 @@
 
   static void writeConstructorKeepList(PrintStream keepListWriter, MethodInfo mi) {
     keepListWriter.print("    ");
-    String name = mi.name();
-    name = name.replace(".", "$");
-    keepListWriter.print(name);
+    keepListWriter.print("<init>");
 
     writeParametersKeepList(keepListWriter, mi, mi.parameters());
     keepListWriter.print(";\n");
diff --git a/src/com/google/doclava/apicheck/ApiFile.java b/src/com/google/doclava/apicheck/ApiFile.java
index 3f96943..81783fc 100644
--- a/src/com/google/doclava/apicheck/ApiFile.java
+++ b/src/com/google/doclava/apicheck/ApiFile.java
@@ -29,7 +29,9 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.LinkedList;
+import java.util.List;
 
 class ApiFile {
 
@@ -488,10 +490,13 @@
       } else {
         throw new ApiParseException("expected , found " + token, tokenizer.getLine());
       }
+      // api file does not preserve annotations.
+      List<AnnotationInstanceInfo> annotations = Collections.emptyList();
       method.addParameter(new ParameterInfo(name, type,
             Converter.obtainTypeFromString(type),
             type.endsWith("..."),
-            tokenizer.pos()));
+            tokenizer.pos(),
+            annotations));
       if (type.endsWith("...")) {
         method.setVarargs(true);
       }
diff --git a/src/com/google/doclava/apicheck/XmlApiFile.java b/src/com/google/doclava/apicheck/XmlApiFile.java
index 8b15d09..562fcea 100644
--- a/src/com/google/doclava/apicheck/XmlApiFile.java
+++ b/src/com/google/doclava/apicheck/XmlApiFile.java
@@ -35,6 +35,8 @@
 
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 import java.util.Stack;
 
 class XmlApiFile extends DefaultHandler {
@@ -202,8 +204,10 @@
       TypeInfo type = Converter.obtainTypeFromString(typeName);
       boolean isVarArg = typeName.endsWith("...");
       SourcePositionInfo position = null;
-      
-      mCurrentMethod.addParameter(new ParameterInfo(name, typeName, type, isVarArg, position));
+      List<AnnotationInstanceInfo> annotations = Collections.emptyList();
+
+      mCurrentMethod.addParameter(
+          new ParameterInfo(name, typeName, type, isVarArg, position, annotations));
       mCurrentMethod.setVarargs(isVarArg);
     } else if (qName.equals("exception")) {
       mCurrentMethod.addException(attributes.getValue("type"));