langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
changeset 1789 7ac8c0815000
parent 10 06bc494ca11e
child 1870 57a1138dffc8
equal deleted inserted replaced
1788:ced0a1a7ec80 1789:7ac8c0815000
   128     }
   128     }
   129 
   129 
   130     /**
   130     /**
   131      * Build the serialized form.
   131      * Build the serialized form.
   132      */
   132      */
   133     public void buildSerializedForm(List elements) throws Exception {
   133     public void buildSerializedForm(List<?> elements) throws Exception {
   134         build(elements);
   134         build(elements);
   135         writer.close();
   135         writer.close();
   136     }
   136     }
   137 
   137 
   138     /**
   138     /**
   139      * {@inheritDoc}
   139      * {@inheritDoc}
   140      */
   140      */
   141     public void invokeMethod(String methodName, Class[] paramClasses,
   141     public void invokeMethod(String methodName, Class<?>[] paramClasses,
   142             Object[] params)
   142             Object[] params)
   143     throws Exception {
   143     throws Exception {
   144         if (DEBUG) {
   144         if (DEBUG) {
   145             configuration.root.printError("DEBUG: " + this.getClass().getName()
   145             configuration.root.printError("DEBUG: " + this.getClass().getName()
   146                 + "." + methodName);
   146                 + "." + methodName);
   157     }
   157     }
   158 
   158 
   159     /**
   159     /**
   160      * Build the contents.
   160      * Build the contents.
   161      */
   161      */
   162     public void buildSerializedFormSummaries(List elements) {
   162     public void buildSerializedFormSummaries(List<?> elements) {
   163         PackageDoc[] packages = configuration.packages;
   163         PackageDoc[] packages = configuration.packages;
   164         for (int i = 0; i < packages.length; i++) {
   164         for (int i = 0; i < packages.length; i++) {
   165             currentPackage = packages[i];
   165             currentPackage = packages[i];
   166             build(elements);
   166             build(elements);
   167         }
   167         }
   168     }
   168     }
   169 
   169 
   170     /**
   170     /**
   171      * Build the package serialized for for the current package being processed.
   171      * Build the package serialized for for the current package being processed.
   172      */
   172      */
   173     public void buildPackageSerializedForm(List elements) {
   173     public void buildPackageSerializedForm(List<?> elements) {
   174         String foo = currentPackage.name();
   174         String foo = currentPackage.name();
   175         ClassDoc[] classes = currentPackage.allClasses(false);
   175         ClassDoc[] classes = currentPackage.allClasses(false);
   176         if (classes == null || classes.length == 0) {
   176         if (classes == null || classes.length == 0) {
   177             return;
   177             return;
   178         }
   178         }
   187 
   187 
   188     public void buildPackageHeader() {
   188     public void buildPackageHeader() {
   189         writer.writePackageHeader(Util.getPackageName(currentPackage));
   189         writer.writePackageHeader(Util.getPackageName(currentPackage));
   190     }
   190     }
   191 
   191 
   192     public void buildClassSerializedForm(List elements) {
   192     public void buildClassSerializedForm(List<?> elements) {
   193         ClassDoc[] classes = currentPackage.allClasses(false);
   193         ClassDoc[] classes = currentPackage.allClasses(false);
   194         Arrays.sort(classes);
   194         Arrays.sort(classes);
   195         for (int j = 0; j < classes.length; j++) {
   195         for (int j = 0; j < classes.length; j++) {
   196             currentClass = classes[j];
   196             currentClass = classes[j];
   197             fieldWriter = writer.getSerialFieldWriter(currentClass);
   197             fieldWriter = writer.getSerialFieldWriter(currentClass);
   366     }
   366     }
   367 
   367 
   368     /**
   368     /**
   369      * build the information for the method.
   369      * build the information for the method.
   370      */
   370      */
   371     public void buildMethodInfo(List elements)  {
   371     public void buildMethodInfo(List<?> elements)  {
   372         if(configuration.nocomment){
   372         if(configuration.nocomment){
   373             return;
   373             return;
   374         }
   374         }
   375         build(elements);
   375         build(elements);
   376     }
   376     }
   476 
   476 
   477     /**
   477     /**
   478      * Build the summaries for the methods that belong to the given
   478      * Build the summaries for the methods that belong to the given
   479      * class.
   479      * class.
   480      */
   480      */
   481     public void buildSerializableMethods(List elements) {
   481     public void buildSerializableMethods(List<?> elements) {
   482         MemberDoc[] members = currentClass.serializationMethods();
   482         MemberDoc[] members = currentClass.serializationMethods();
   483         if (members.length > 0) {
   483         if (members.length > 0) {
   484             for (int i = 0; i < members.length; i++) {
   484             for (int i = 0; i < members.length; i++) {
   485                 currentMember = members[i];
   485                 currentMember = members[i];
   486                 build(elements);
   486                 build(elements);
   490 
   490 
   491     /**
   491     /**
   492      * Build the summaries for the fields that belong to the given
   492      * Build the summaries for the fields that belong to the given
   493      * class.
   493      * class.
   494      */
   494      */
   495     public void buildSerializableFields(List elements) {
   495     public void buildSerializableFields(List<?> elements) {
   496         MemberDoc[] members = currentClass.serializableFields();
   496         MemberDoc[] members = currentClass.serializableFields();
   497         if (members.length > 0) {
   497         if (members.length > 0) {
   498             for (int i = 0; i < members.length; i++) {
   498             for (int i = 0; i < members.length; i++) {
   499                 currentMember = members[i];
   499                 currentMember = members[i];
   500                 build(elements);
   500                 build(elements);