code cleanup, suppress warnings for 'restriction' added, raw types parameterized

This commit is contained in:
stfm
2012-10-03 21:23:15 +02:00
parent c7b50011ff
commit 800bc73262
6 changed files with 23 additions and 22 deletions

View File

@@ -9,6 +9,7 @@ import com.sun.javadoc.ClassDoc;
* @version $Revision: 1.1 $
* @author Gregg Wonderly - C2 Technologies Inc.
*/
@SuppressWarnings("restriction")
public interface ClassFilter {
/**

View File

@@ -16,6 +16,7 @@ import com.sun.javadoc.RootDoc;
* @version $Revision: 1.1 $
* @author Soeren Caspersen - XO Software
*/
@SuppressWarnings("restriction")
public class ClassHierachy extends java.lang.Object {
public SortedMap root = new TreeMap();
@@ -57,12 +58,13 @@ public class ClassHierachy extends java.lang.Object {
* Prints a branch of the tree. The branch is printed using
* <CODE>TeXDoclet.os</CODE>.
*/
protected void printBranch(RootDoc rootDoc, SortedMap map, double indent,
protected void printBranch(RootDoc rootDoc,
SortedMap<String, SortedMap> map, double indent,
double overviewindent) {
Set set = map.keySet();
Iterator it = set.iterator();
Set<String> set = map.keySet();
Iterator<String> it = set.iterator();
while (it.hasNext()) {
String qualifName = (String) it.next();
String qualifName = it.next();
ClassDoc cls = rootDoc.classNamed(qualifName);
TeXDoclet.os.print("\\hspace{" + Double.toString(indent)
+ "cm} $\\bullet$ "
@@ -71,8 +73,8 @@ public class ClassHierachy extends java.lang.Object {
TeXDoclet.printRef(cls.containingPackage(), cls.name(), "");
}
TeXDoclet.os.println("} \\\\");
printBranch(rootDoc, (SortedMap) map.get(qualifName), indent
+ overviewindent, overviewindent);
printBranch(rootDoc, map.get(qualifName), indent + overviewindent,
overviewindent);
}
}
}

View File

@@ -16,6 +16,7 @@ import com.sun.javadoc.RootDoc;
* @version $Revision: 1.1 $
* @author Soeren Caspersen - XO Software
*/
@SuppressWarnings("restriction")
public class InterfaceHierachy extends java.lang.Object {
public SortedMap root = new TreeMap();

View File

@@ -19,19 +19,20 @@ import com.sun.javadoc.PackageDoc;
* @version $Revision: 1.1 $
* @author Gregg Wonderly - C2 Technologies Inc.
*/
@SuppressWarnings("restriction")
public class Package {
protected PackageDoc pkgDoc;
/** The name of the package this object is for */
protected String pkg;
/** The classes this package has in it */
protected Vector classes;
protected Vector<ClassDoc> classes;
/** The interfaces this package has in it */
protected Vector interfaces;
protected Vector<ClassDoc> interfaces;
/** The exceptions this package has in it */
protected Vector exceptions;
protected Vector<ClassDoc> exceptions;
/** The errors this package has in it */
protected Vector errors;
protected Vector<ClassDoc> errors;
/**
* Construct a new object corresponding to the passed package name.
@@ -45,10 +46,10 @@ public class Package {
if (pkg.equals("")) {
this.pkg = "<none>";
}
classes = new Vector();
interfaces = new Vector();
exceptions = new Vector();
errors = new Vector();
classes = new Vector<ClassDoc>();
interfaces = new Vector<ClassDoc>();
exceptions = new Vector<ClassDoc>();
errors = new Vector<ClassDoc>();
}
/**

View File

@@ -1,7 +1,5 @@
package org.stfm.texdoclet;
import java.util.Properties;
import javax.swing.text.MutableAttributeSet;
import javax.swing.text.html.HTML;
@@ -81,17 +79,14 @@ public class TableInfo {
private int rowcnt = 0;
private int totalcolcnt = 0;
private boolean border = false;
private Properties props;
private int bordwid;
private boolean parboxed;
private double red = -1.0;
private double blue = -1.0;
private double green = -1.0;
static int tblcnt;
int tblno;
String tc;
HTML.Tag lastTag;
private static int tblcnt;
private int tblno;
private String tc;
int hasNumAttr(HTML.Attribute attr, MutableAttributeSet attrSet) {
String val = (String) attrSet.getAttribute(attr);

View File

@@ -8,6 +8,7 @@ import com.sun.javadoc.ClassDoc;
*
* @version $Revision: 1.2 $
*/
@SuppressWarnings("restriction")
public class TestFilter implements ClassFilter {
/**