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 $ * @version $Revision: 1.1 $
* @author Gregg Wonderly - C2 Technologies Inc. * @author Gregg Wonderly - C2 Technologies Inc.
*/ */
@SuppressWarnings("restriction")
public interface ClassFilter { public interface ClassFilter {
/** /**

View File

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

View File

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

View File

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

View File

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

View File

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