6765045: Remove rawtypes warnings from langtools
Removed all occurrences of rawtypes warnings from langtools Reviewed-by: jjg, bpatel
This commit is contained in:
parent
a23159ffac
commit
795b53a014
@ -66,7 +66,7 @@ javac.no.jdk.warnings = -XDignore.symbol.file=true
|
||||
# set the following to -version to verify the versions of javac being used
|
||||
javac.version.opt =
|
||||
# in time, there should be no exceptions to -Xlint:all
|
||||
javac.lint.opts = -Xlint:all,-deprecation,-fallthrough,-serial,-unchecked,-cast,-rawtypes
|
||||
javac.lint.opts = -Xlint:all,-deprecation,-fallthrough,-serial,-unchecked,-cast
|
||||
|
||||
# options for the <javadoc> task for javac
|
||||
javadoc.jls3.url=http://java.sun.com/docs/books/jls/
|
||||
|
@ -74,7 +74,7 @@ public abstract class Trees {
|
||||
ClassLoader cl = arg.getClass().getClassLoader();
|
||||
Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl);
|
||||
argType = Class.forName(argType.getName(), false, cl);
|
||||
Method m = c.getMethod("instance", new Class[] { argType });
|
||||
Method m = c.getMethod("instance", new Class<?>[] { argType });
|
||||
return (Trees) m.invoke(null, new Object[] { arg });
|
||||
} catch (Throwable e) {
|
||||
throw new AssertionError(e);
|
||||
|
@ -281,7 +281,7 @@ public class Apt extends ListBuffer<Env<AttrContext>> {
|
||||
// Discovery process
|
||||
|
||||
// List of annotation processory factory instances
|
||||
java.util.Iterator providers = null;
|
||||
java.util.Iterator<AnnotationProcessorFactory> providers = null;
|
||||
{
|
||||
/*
|
||||
* If a factory is provided by the user, the
|
||||
|
@ -217,7 +217,7 @@ class AnnotationProxyMaker {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void visitEnum(Attribute.Enum e) {
|
||||
if (runtimeType.isEnum()) {
|
||||
String constName = e.value.toString();
|
||||
@ -225,7 +225,7 @@ class AnnotationProxyMaker {
|
||||
value = Enum.valueOf((Class)runtimeType, constName);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
value = new EnumConstantNotPresentExceptionProxy(
|
||||
(Class)runtimeType, constName);
|
||||
(Class<Enum<?>>)runtimeType, constName);
|
||||
}
|
||||
} else {
|
||||
value = null; // indicates a type mismatch
|
||||
|
@ -130,8 +130,8 @@ class Constants {
|
||||
append((EnumConstantDeclarationImpl) val);
|
||||
} else if (val instanceof AnnotationMirror) {
|
||||
append((AnnotationMirrorImpl) val);
|
||||
} else if (val instanceof Collection) {
|
||||
append((Collection) val);
|
||||
} else if (val instanceof Collection<?>) {
|
||||
append((Collection<?>) val);
|
||||
} else {
|
||||
appendUnquoted(val.toString());
|
||||
}
|
||||
@ -234,7 +234,7 @@ class Constants {
|
||||
* and separated by ", ". Useful for array-valued annotation
|
||||
* elements.
|
||||
*/
|
||||
void append(Collection vals) {
|
||||
void append(Collection<?> vals) {
|
||||
buf.append('{');
|
||||
boolean first = true;
|
||||
for (Object val : vals) {
|
||||
|
@ -95,14 +95,14 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
* @param unicode Unicode for which member list information to be generated.
|
||||
* @param memberlist List of members for the unicode character.
|
||||
*/
|
||||
protected void generateContents(Character unicode, List memberlist) {
|
||||
protected void generateContents(Character unicode, List<? extends Doc> memberlist) {
|
||||
anchor("_" + unicode + "_");
|
||||
h2();
|
||||
strong(unicode.toString());
|
||||
h2End();
|
||||
dl();
|
||||
for (int i = 0; i < memberlist.size(); i++) {
|
||||
Doc element = (Doc)memberlist.get(i);
|
||||
Doc element = memberlist.get(i);
|
||||
if (element instanceof MemberDoc) {
|
||||
printDescription((MemberDoc)element);
|
||||
} else if (element instanceof ClassDoc) {
|
||||
|
@ -317,7 +317,7 @@ public abstract class AbstractMemberWriter {
|
||||
* format for listing the API. Call methods from the sub-class to complete
|
||||
* the generation.
|
||||
*/
|
||||
protected void printDeprecatedAPI(List deprmembers, String headingKey) {
|
||||
protected void printDeprecatedAPI(List<Doc> deprmembers, String headingKey) {
|
||||
if (deprmembers.size() > 0) {
|
||||
writer.tableIndexSummary();
|
||||
writer.tableHeaderStart("#CCCCFF");
|
||||
@ -377,12 +377,12 @@ public abstract class AbstractMemberWriter {
|
||||
}
|
||||
}
|
||||
|
||||
protected void navDetailLink(List members) {
|
||||
protected void navDetailLink(List<?> members) {
|
||||
printNavDetailLink(members.size() > 0? true: false);
|
||||
}
|
||||
|
||||
|
||||
protected void navSummaryLink(List members,
|
||||
protected void navSummaryLink(List<?> members,
|
||||
VisibleMemberMap visibleMemberMap) {
|
||||
if (members.size() > 0) {
|
||||
printNavSummaryLink(null, true);
|
||||
@ -390,7 +390,7 @@ public abstract class AbstractMemberWriter {
|
||||
} else {
|
||||
ClassDoc icd = classdoc.superclass();
|
||||
while (icd != null) {
|
||||
List inhmembers = visibleMemberMap.getMembersFor(icd);
|
||||
List<?> inhmembers = visibleMemberMap.getMembersFor(icd);
|
||||
if (inhmembers.size() > 0) {
|
||||
printNavSummaryLink(icd, true);
|
||||
return;
|
||||
|
@ -96,12 +96,12 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
||||
* @param list list of the sub-classes at this level.
|
||||
* @param isEnum true if we are generating a tree for enums.
|
||||
*/
|
||||
protected void generateLevelInfo(ClassDoc parent, List list,
|
||||
protected void generateLevelInfo(ClassDoc parent, List<ClassDoc> list,
|
||||
boolean isEnum) {
|
||||
if (list.size() > 0) {
|
||||
ul();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ClassDoc local = (ClassDoc)list.get(i);
|
||||
ClassDoc local = list.get(i);
|
||||
printPartialInfo(local);
|
||||
printExtendsImplements(parent, local);
|
||||
generateLevelInfo(local, classtree.subs(local, isEnum),
|
||||
@ -119,9 +119,9 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
||||
* other classes in this run will derive from these classes.
|
||||
* @param heading Heading for the tree.
|
||||
*/
|
||||
protected void generateTree(List list, String heading) {
|
||||
protected void generateTree(List<ClassDoc> list, String heading) {
|
||||
if (list.size() > 0) {
|
||||
ClassDoc firstClassDoc = (ClassDoc)list.get(0);
|
||||
ClassDoc firstClassDoc = list.get(0);
|
||||
printTreeHeading(heading);
|
||||
generateLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null,
|
||||
list,
|
||||
|
@ -137,9 +137,9 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
|
||||
* @param classlist Sorted list of classes.
|
||||
* @param wantFrames True if we want frames.
|
||||
*/
|
||||
protected void generateContents(List classlist, boolean wantFrames) {
|
||||
protected void generateContents(List<Doc> classlist, boolean wantFrames) {
|
||||
for (int i = 0; i < classlist.size(); i++) {
|
||||
ClassDoc cd = (ClassDoc)(classlist.get(i));
|
||||
ClassDoc cd = (ClassDoc)classlist.get(i);
|
||||
if (!Util.isCoreClass(cd)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ import java.util.*;
|
||||
public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
|
||||
final ClassDoc classdoc;
|
||||
Set pkgToPackageAnnotations = null;
|
||||
Set<PackageDoc> pkgToPackageAnnotations = null;
|
||||
final Map<String,List<ProgramElementDoc>> pkgToClassTypeParameter;
|
||||
final Map<String,List<ProgramElementDoc>> pkgToClassAnnotations;
|
||||
final Map<String,List<ProgramElementDoc>> pkgToMethodTypeParameter;
|
||||
@ -220,8 +220,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
false)));
|
||||
tableHeaderEnd();
|
||||
|
||||
for (Iterator it = pkgSet.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = (PackageDoc)it.next();
|
||||
for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = it.next();
|
||||
generatePackageUse(pkg);
|
||||
}
|
||||
tableEnd();
|
||||
@ -240,8 +240,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
|
||||
false)));
|
||||
tableHeaderEnd();
|
||||
for (Iterator it = pkgToPackageAnnotations.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = (PackageDoc)it.next();
|
||||
for (Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = it.next();
|
||||
trBgcolorStyle("white", "TableRowColor");
|
||||
summaryRow(0);
|
||||
//Just want an anchor here.
|
||||
@ -259,8 +259,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
}
|
||||
|
||||
protected void generateClassList() throws IOException {
|
||||
for (Iterator it = pkgSet.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = (PackageDoc)it.next();
|
||||
for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = it.next();
|
||||
anchor(pkg.name());
|
||||
tableIndexSummary();
|
||||
tableHeaderStart("#CCCCFF");
|
||||
|
@ -355,7 +355,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
classDoc.qualifiedName().equals("org.omg.CORBA.Object")) {
|
||||
return; // Don't generate the list, too huge
|
||||
}
|
||||
List subclasses = classtree.subs(classDoc, false);
|
||||
List<ClassDoc> subclasses = classtree.subs(classDoc, false);
|
||||
if (subclasses.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
@ -371,7 +371,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
*/
|
||||
public void writeSubInterfacesInfo() {
|
||||
if (classDoc.isInterface()) {
|
||||
List subInterfaces = classtree.allSubs(classDoc, false);
|
||||
List<ClassDoc> subInterfaces = classtree.allSubs(classDoc, false);
|
||||
if (subInterfaces.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
@ -393,7 +393,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
classDoc.qualifiedName().equals("java.io.Serializable")) {
|
||||
return; // Don't generate the list, too big
|
||||
}
|
||||
List implcl = classtree.implementingclasses(classDoc);
|
||||
List<ClassDoc> implcl = classtree.implementingclasses(classDoc);
|
||||
if (implcl.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
@ -409,7 +409,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
public void writeImplementedInterfacesInfo() {
|
||||
//NOTE: we really should be using ClassDoc.interfaceTypes() here, but
|
||||
// it doesn't walk up the tree like we want it to.
|
||||
List interfaceArray = Util.getAllInterfaces(classDoc, configuration);
|
||||
List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
|
||||
if (classDoc.isClass() && interfaceArray.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
@ -425,7 +425,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
public void writeSuperInterfacesInfo() {
|
||||
//NOTE: we really should be using ClassDoc.interfaceTypes() here, but
|
||||
// it doesn't walk up the tree like we want it to.
|
||||
List interfaceArray = Util.getAllInterfaces(classDoc, configuration);
|
||||
List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
|
||||
if (classDoc.isInterface() && interfaceArray.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
@ -438,7 +438,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
/**
|
||||
* Generate links to the given classes.
|
||||
*/
|
||||
private void writeClassLinks(int context, List list) {
|
||||
private void writeClassLinks(int context, List<?> list) {
|
||||
Object[] typeList = list.toArray();
|
||||
//Sort the list to be printed.
|
||||
print(' ');
|
||||
|
@ -194,10 +194,10 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void writeConstantMembers(ClassDoc cd, List fields) {
|
||||
public void writeConstantMembers(ClassDoc cd, List<FieldDoc> fields) {
|
||||
currentClassDoc = cd;
|
||||
for (int i = 0; i < fields.size(); ++i) {
|
||||
writeConstantMember((FieldDoc)(fields.get(i)));
|
||||
writeConstantMember(fields.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
return VisibleMemberMap.CONSTRUCTORS;
|
||||
}
|
||||
|
||||
protected void navSummaryLink(List members) {
|
||||
protected void navSummaryLink(List<?> members) {
|
||||
printNavSummaryLink(classdoc,
|
||||
members.size() > 0? true: false);
|
||||
}
|
||||
|
@ -1728,13 +1728,13 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
* @param descList the array of {@link AnnotationDesc}.
|
||||
*/
|
||||
private boolean writeAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak) {
|
||||
List annotations = getAnnotations(indent, descList, lineBreak);
|
||||
List<String> annotations = getAnnotations(indent, descList, lineBreak);
|
||||
if (annotations.size() == 0) {
|
||||
return false;
|
||||
}
|
||||
fontNoNewLine("-1");
|
||||
for (Iterator iter = annotations.iterator(); iter.hasNext();) {
|
||||
print((String) iter.next());
|
||||
for (Iterator<String> iter = annotations.iterator(); iter.hasNext();) {
|
||||
print(iter.next());
|
||||
}
|
||||
fontEnd();
|
||||
return true;
|
||||
@ -1792,8 +1792,8 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
annotationTypeValues.add(annotationValue);
|
||||
}
|
||||
annotation.append(annotationTypeValues.size() == 1 ? "" : "{");
|
||||
for (Iterator iter = annotationTypeValues.iterator(); iter.hasNext(); ) {
|
||||
annotation.append(annotationValueToString((AnnotationValue) iter.next()));
|
||||
for (Iterator<AnnotationValue> iter = annotationTypeValues.iterator(); iter.hasNext(); ) {
|
||||
annotation.append(annotationValueToString(iter.next()));
|
||||
annotation.append(iter.hasNext() ? "," : "");
|
||||
}
|
||||
annotation.append(annotationTypeValues.size() == 1 ? "" : "}");
|
||||
@ -1820,11 +1820,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
return type.typeName() + type.dimension() + ".class";
|
||||
}
|
||||
} else if (annotationValue.value() instanceof AnnotationDesc) {
|
||||
List list = getAnnotations(0,
|
||||
List<String> list = getAnnotations(0,
|
||||
new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()},
|
||||
false);
|
||||
StringBuffer buf = new StringBuffer();
|
||||
for (Iterator iter = list.iterator(); iter.hasNext(); ) {
|
||||
for (Iterator<String> iter = list.iterator(); iter.hasNext(); ) {
|
||||
buf.append(iter.next());
|
||||
}
|
||||
return buf.toString();
|
||||
|
@ -51,7 +51,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
|
||||
super(writer, classdoc);
|
||||
}
|
||||
|
||||
public List members(ClassDoc cd) {
|
||||
public List<FieldDoc> members(ClassDoc cd) {
|
||||
return Util.asList(cd.serializableFields());
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
||||
* The classes to be documented. Use this to filter out classes
|
||||
* that will not be documented.
|
||||
*/
|
||||
private Set documentedClasses;
|
||||
private Set<ClassDoc> documentedClasses;
|
||||
|
||||
/**
|
||||
* The name of the output file.
|
||||
|
@ -54,7 +54,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
/**
|
||||
* List to store the order groups as specified on the command line.
|
||||
*/
|
||||
private List groupList;
|
||||
private List<String> groupList;
|
||||
|
||||
/**
|
||||
* Construct the PackageIndexWriter. Also constructs the grouping
|
||||
|
@ -63,8 +63,8 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
ClassDoc usedClass = content[i];
|
||||
Set<ClassDoc> usingClasses = mapper.classToClass.get(usedClass.qualifiedName());
|
||||
if (usingClasses != null) {
|
||||
for (Iterator it = usingClasses.iterator(); it.hasNext(); ) {
|
||||
ClassDoc usingClass = (ClassDoc)it.next();
|
||||
for (Iterator<ClassDoc> it = usingClasses.iterator(); it.hasNext(); ) {
|
||||
ClassDoc usingClass = it.next();
|
||||
PackageDoc usingPackage = usingClass.containingPackage();
|
||||
Set<ClassDoc> usedClasses = usingPackageToUsedClasses
|
||||
.get(usingPackage.name());
|
||||
@ -136,9 +136,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
printText("doclet.ClassUse_Packages.that.use.0",
|
||||
getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false));
|
||||
tableHeaderEnd();
|
||||
Iterator it = usingPackageToUsedClasses.keySet().iterator();
|
||||
Iterator<String> it = usingPackageToUsedClasses.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
PackageDoc pkg = configuration.root.packageNamed((String)it.next());
|
||||
PackageDoc pkg = configuration.root.packageNamed(it.next());
|
||||
generatePackageUse(pkg);
|
||||
}
|
||||
tableEnd();
|
||||
@ -147,9 +147,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
}
|
||||
|
||||
protected void generateClassList() throws IOException {
|
||||
Iterator itp = usingPackageToUsedClasses.keySet().iterator();
|
||||
Iterator<String> itp = usingPackageToUsedClasses.keySet().iterator();
|
||||
while (itp.hasNext()) {
|
||||
String packageName = (String)itp.next();
|
||||
String packageName = itp.next();
|
||||
PackageDoc usingPackage = configuration.root.packageNamed(packageName);
|
||||
if (usingPackage != null) {
|
||||
anchor(usingPackage.name());
|
||||
@ -160,11 +160,10 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false),
|
||||
getPackageLink(usingPackage,Util.getPackageName(usingPackage), false));
|
||||
tableHeaderEnd();
|
||||
Iterator itc =
|
||||
((Collection)usingPackageToUsedClasses.get(packageName))
|
||||
.iterator();
|
||||
Iterator<ClassDoc> itc =
|
||||
usingPackageToUsedClasses.get(packageName).iterator();
|
||||
while (itc.hasNext()) {
|
||||
printClassRow((ClassDoc)itc.next(), packageName);
|
||||
printClassRow(itc.next(), packageName);
|
||||
}
|
||||
tableEnd();
|
||||
space();
|
||||
|
@ -441,13 +441,13 @@ public abstract class Configuration {
|
||||
* @param customTagStrs the set two dimentional arrays of strings. These arrays contain
|
||||
* either -tag or -taglet arguments.
|
||||
*/
|
||||
private void initTagletManager(Set customTagStrs) {
|
||||
private void initTagletManager(Set<String[]> customTagStrs) {
|
||||
tagletManager = tagletManager == null ?
|
||||
new TagletManager(nosince, showversion, showauthor, message) :
|
||||
tagletManager;
|
||||
String[] args;
|
||||
for (Iterator it = customTagStrs.iterator(); it.hasNext(); ) {
|
||||
args = (String[]) it.next();
|
||||
for (Iterator<String[]> it = customTagStrs.iterator(); it.hasNext(); ) {
|
||||
args = it.next();
|
||||
if (args[0].equals("-taglet")) {
|
||||
tagletManager.addCustomTag(args[1], tagletpath);
|
||||
continue;
|
||||
|
@ -103,7 +103,7 @@ public interface ConstantsSummaryWriter {
|
||||
* @param cd the class whose constants are being documented.
|
||||
* @param fields the constants being documented.
|
||||
*/
|
||||
public abstract void writeConstantMembers(ClassDoc cd, List fields);
|
||||
public abstract void writeConstantMembers(ClassDoc cd, List<FieldDoc> fields);
|
||||
|
||||
/**
|
||||
* Document the given constants.
|
||||
|
@ -97,22 +97,22 @@ public abstract class AbstractBuilder {
|
||||
* @param elements the XML elements that specify which components to
|
||||
* document.
|
||||
*/
|
||||
protected void build(List elements) {
|
||||
protected void build(List<?> elements) {
|
||||
for (int i = 0; i < elements.size(); i++ ) {
|
||||
Object element = elements.get(i);
|
||||
String component = (String)
|
||||
((element instanceof String) ?
|
||||
element :
|
||||
((List) element).get(0));
|
||||
((List<?>) element).get(0));
|
||||
try {
|
||||
invokeMethod("build" + component,
|
||||
element instanceof String ?
|
||||
new Class[] {} :
|
||||
new Class[] {List.class},
|
||||
new Class<?>[] {} :
|
||||
new Class<?>[] {List.class},
|
||||
element instanceof String ?
|
||||
new Object[] {} :
|
||||
new Object[] {((List) element).subList(1,
|
||||
((List) element).size())});
|
||||
new Object[] {((List<?>) element).subList(1,
|
||||
((List<?>) element).size())});
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
configuration.root.printError("Unknown element: " + component);
|
||||
@ -138,7 +138,7 @@ public abstract class AbstractBuilder {
|
||||
* @param paramClasses the types for each parameter.
|
||||
* @param params the parameters of the method.
|
||||
*/
|
||||
protected abstract void invokeMethod(String methodName, Class[] paramClasses,
|
||||
protected abstract void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public abstract class AbstractMemberBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements {@inheritDoc}
|
||||
*/
|
||||
public void build(List elements) {
|
||||
public void build(List<?> elements) {
|
||||
if (hasMembersToDocument()) {
|
||||
super.build(elements);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -122,7 +122,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements the XML elements that specify how to document a class.
|
||||
*/
|
||||
public void buildAnnotationTypeDoc(List elements) throws Exception {
|
||||
public void buildAnnotationTypeDoc(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
writer.close();
|
||||
copyDocFiles();
|
||||
@ -197,7 +197,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a member summary is
|
||||
* documented.
|
||||
*/
|
||||
public void buildMemberSummary(List elements) throws Exception {
|
||||
public void buildMemberSummary(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getMemberSummaryBuilder(writer).build(elements);
|
||||
writer.completeMemberSummaryBuild();
|
||||
@ -209,7 +209,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a annotation type
|
||||
* members are documented.
|
||||
*/
|
||||
public void buildAnnotationTypeOptionalMemberDetails(List elements)
|
||||
public void buildAnnotationTypeOptionalMemberDetails(List<?> elements)
|
||||
throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getAnnotationTypeOptionalMemberBuilder(writer).build(elements);
|
||||
@ -221,7 +221,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a annotation type
|
||||
* members are documented.
|
||||
*/
|
||||
public void buildAnnotationTypeRequiredMemberDetails(List elements)
|
||||
public void buildAnnotationTypeRequiredMemberDetails(List<?> elements)
|
||||
throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getAnnotationTypeRequiredMemberBuilder(writer).build(elements);
|
||||
|
@ -95,7 +95,7 @@ public class AnnotationTypeOptionalMemberBuilder extends
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildAnnotationTypeOptionalMember(List elements) {
|
||||
public void buildAnnotationTypeOptionalMember(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
@ -108,7 +108,7 @@ public class AnnotationTypeOptionalMemberBuilder extends
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
|
@ -116,7 +116,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -135,7 +135,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
|
||||
* @param classDoc the {@link ClassDoc} we want to check.
|
||||
* @return a list of members that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildAnnotationTypeRequiredMember(List elements) {
|
||||
public void buildAnnotationTypeRequiredMember(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -138,7 +138,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements the XML elements that specify how to document a class.
|
||||
*/
|
||||
public void buildClassDoc(List elements) throws Exception {
|
||||
public void buildClassDoc(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
writer.close();
|
||||
copyDocFiles();
|
||||
@ -293,7 +293,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a member summary is
|
||||
* documented.
|
||||
*/
|
||||
public void buildMemberSummary(List elements) throws Exception {
|
||||
public void buildMemberSummary(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getMemberSummaryBuilder(writer).build(elements);
|
||||
writer.completeMemberSummaryBuild();
|
||||
@ -305,7 +305,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a enum constants are
|
||||
* documented.
|
||||
*/
|
||||
public void buildEnumConstantsDetails(List elements) throws Exception {
|
||||
public void buildEnumConstantsDetails(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getEnumConstantsBuilder(writer).build(elements);
|
||||
}
|
||||
@ -315,7 +315,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements the XML elements that specify how a field is documented.
|
||||
*/
|
||||
public void buildFieldDetails(List elements) throws Exception {
|
||||
public void buildFieldDetails(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getFieldBuilder(writer).build(elements);
|
||||
}
|
||||
@ -326,7 +326,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how to document a
|
||||
* constructor.
|
||||
*/
|
||||
public void buildConstructorDetails(List elements) throws Exception {
|
||||
public void buildConstructorDetails(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getConstructorBuilder(writer).build(elements);
|
||||
}
|
||||
@ -336,7 +336,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements the XML elements that specify how a method is documented.
|
||||
*/
|
||||
public void buildMethodDetails(List elements) throws Exception {
|
||||
public void buildMethodDetails(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getMethodBuilder(writer).build(elements);
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -144,7 +144,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
* @param elements the list of elements describing constant summary
|
||||
* documentation.
|
||||
*/
|
||||
public void buildConstantSummary(List elements) throws Exception {
|
||||
public void buildConstantSummary(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
writer.close();
|
||||
}
|
||||
@ -186,7 +186,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that represent the components
|
||||
* of documentation for each package.
|
||||
*/
|
||||
public void buildConstantSummaries(List elements) {
|
||||
public void buildConstantSummaries(List<?> elements) {
|
||||
PackageDoc[] packages = configuration.packages;
|
||||
printedPackageHeaders = new HashSet<String>();
|
||||
for (int i = 0; i < packages.length; i++) {
|
||||
@ -204,7 +204,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
* @param elements the list of XML elements that make up package
|
||||
* documentation.
|
||||
*/
|
||||
public void buildPackageConstantSummary(List elements) {
|
||||
public void buildPackageConstantSummary(List<?> elements) {
|
||||
build(elements);
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
* @param elements the list of XML elements that make up the class
|
||||
* constant summary.
|
||||
*/
|
||||
public void buildClassConstantSummary(List elements) {
|
||||
public void buildClassConstantSummary(List<?> elements) {
|
||||
ClassDoc[] classes = currentPackage.name().length() > 0 ?
|
||||
currentPackage.allClasses() :
|
||||
configuration.classDocCatalog.allClasses(
|
||||
@ -297,8 +297,8 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
private boolean hasConstantField (ClassDoc classDoc) {
|
||||
VisibleMemberMap visibleMemberMapFields = new VisibleMemberMap(classDoc,
|
||||
VisibleMemberMap.FIELDS, configuration.nodeprecated);
|
||||
List fields = visibleMemberMapFields.getLeafClassMembers(configuration);
|
||||
for (Iterator iter = fields.iterator(); iter.hasNext(); ) {
|
||||
List<?> fields = visibleMemberMapFields.getLeafClassMembers(configuration);
|
||||
for (Iterator<?> iter = fields.iterator(); iter.hasNext(); ) {
|
||||
FieldDoc field = (FieldDoc) iter.next();
|
||||
if (field.constantValueExpression() != null) {
|
||||
classDocsWithConstFields.add(classDoc);
|
||||
|
@ -138,7 +138,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -156,7 +156,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
|
||||
*
|
||||
* @return a list of constructors that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildConstructorDoc(List elements) {
|
||||
public void buildConstructorDoc(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -139,7 +139,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
|
||||
* @param classDoc the {@link ClassDoc} we want to check.
|
||||
* @return a list of enum constants that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildEnumConstant(List elements) {
|
||||
public void buildEnumConstant(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -140,7 +140,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
|
||||
* @param classDoc the {@link ClassDoc} we want to check.
|
||||
* @return a list of fields that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildFieldDoc(List elements) {
|
||||
public void buildFieldDoc(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -78,9 +78,9 @@ public class LayoutParser extends DefaultHandler {
|
||||
*
|
||||
* @return List the list of XML elements parsed.
|
||||
*/
|
||||
public List parseXML(String root) {
|
||||
public List<?> parseXML(String root) {
|
||||
if (xmlElementsMap.containsKey(root)) {
|
||||
return (List) xmlElementsMap.get(root);
|
||||
return xmlElementsMap.get(root);
|
||||
}
|
||||
try {
|
||||
List<Object> xmlElements = new ArrayList<Object>();
|
||||
|
@ -170,7 +170,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
|
||||
* @return a list of methods that will be documented.
|
||||
* @see VisibleMemberMap
|
||||
*/
|
||||
public List members(int type) {
|
||||
public List<ProgramElementDoc> members(int type) {
|
||||
return visibleMemberMaps[type].getLeafClassMembers(configuration);
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -339,9 +339,9 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
private void buildInheritedSummary(MemberSummaryWriter writer,
|
||||
VisibleMemberMap visibleMemberMap) {
|
||||
for (Iterator iter = visibleMemberMap.getVisibleClassesList().iterator();
|
||||
for (Iterator<ClassDoc> iter = visibleMemberMap.getVisibleClassesList().iterator();
|
||||
iter.hasNext();) {
|
||||
ClassDoc inhclass = (ClassDoc) (iter.next());
|
||||
ClassDoc inhclass = iter.next();
|
||||
if (! (inhclass.isPublic() ||
|
||||
Util.isLinkable(inhclass, configuration))) {
|
||||
continue;
|
||||
|
@ -116,7 +116,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -135,7 +135,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
|
||||
* @param classDoc the {@link ClassDoc} we want to check.
|
||||
* @return a list of methods that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
|
||||
/**
|
||||
* Build the method documentation.
|
||||
*/
|
||||
public void buildMethodDoc(List elements) {
|
||||
public void buildMethodDoc(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -120,7 +120,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the package documentation.
|
||||
*/
|
||||
public void buildPackageDoc(List elements) throws Exception {
|
||||
public void buildPackageDoc(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
packageWriter.close();
|
||||
Util.copyDocFiles(
|
||||
@ -162,7 +162,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the package summary.
|
||||
*/
|
||||
public void buildSummary(List elements) {
|
||||
public void buildSummary(List<?> elements) {
|
||||
build(elements);
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the serialized form.
|
||||
*/
|
||||
public void buildSerializedForm(List elements) throws Exception {
|
||||
public void buildSerializedForm(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
writer.close();
|
||||
}
|
||||
@ -138,7 +138,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -159,7 +159,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the contents.
|
||||
*/
|
||||
public void buildSerializedFormSummaries(List elements) {
|
||||
public void buildSerializedFormSummaries(List<?> elements) {
|
||||
PackageDoc[] packages = configuration.packages;
|
||||
for (int i = 0; i < packages.length; i++) {
|
||||
currentPackage = packages[i];
|
||||
@ -170,7 +170,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the package serialized for for the current package being processed.
|
||||
*/
|
||||
public void buildPackageSerializedForm(List elements) {
|
||||
public void buildPackageSerializedForm(List<?> elements) {
|
||||
String foo = currentPackage.name();
|
||||
ClassDoc[] classes = currentPackage.allClasses(false);
|
||||
if (classes == null || classes.length == 0) {
|
||||
@ -189,7 +189,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
writer.writePackageHeader(Util.getPackageName(currentPackage));
|
||||
}
|
||||
|
||||
public void buildClassSerializedForm(List elements) {
|
||||
public void buildClassSerializedForm(List<?> elements) {
|
||||
ClassDoc[] classes = currentPackage.allClasses(false);
|
||||
Arrays.sort(classes);
|
||||
for (int j = 0; j < classes.length; j++) {
|
||||
@ -368,7 +368,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* build the information for the method.
|
||||
*/
|
||||
public void buildMethodInfo(List elements) {
|
||||
public void buildMethodInfo(List<?> elements) {
|
||||
if(configuration.nocomment){
|
||||
return;
|
||||
}
|
||||
@ -478,7 +478,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
* Build the summaries for the methods that belong to the given
|
||||
* class.
|
||||
*/
|
||||
public void buildSerializableMethods(List elements) {
|
||||
public void buildSerializableMethods(List<?> elements) {
|
||||
MemberDoc[] members = currentClass.serializationMethods();
|
||||
if (members.length > 0) {
|
||||
for (int i = 0; i < members.length; i++) {
|
||||
@ -492,7 +492,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
* Build the summaries for the fields that belong to the given
|
||||
* class.
|
||||
*/
|
||||
public void buildSerializableFields(List elements) {
|
||||
public void buildSerializableFields(List<?> elements) {
|
||||
MemberDoc[] members = currentClass.serializableFields();
|
||||
if (members.length > 0) {
|
||||
for (int i = 0; i < members.length; i++) {
|
||||
|
@ -100,7 +100,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
}
|
||||
ParamTag[] tags = input.isTypeVariableParamTag ?
|
||||
input.method.typeParamTags() : input.method.paramTags();
|
||||
Map rankMap = getRankMap(input.isTypeVariableParamTag ?
|
||||
Map<String, String> rankMap = getRankMap(input.isTypeVariableParamTag ?
|
||||
(Object[]) input.method.typeParameters() :
|
||||
(Object[]) input.method.parameters());
|
||||
for (int i = 0; i < tags.length; i++) {
|
||||
@ -262,7 +262,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
* @return the TagletOutput representation of this <code>Tag</code>.
|
||||
*/
|
||||
private TagletOutput processParamTags(boolean isNonTypeParams,
|
||||
ParamTag[] paramTags, Map rankMap, TagletWriter writer,
|
||||
ParamTag[] paramTags, Map<String, String> rankMap, TagletWriter writer,
|
||||
Set<String> alreadyDocumented) {
|
||||
TagletOutput result = writer.getOutputInstance();
|
||||
if (paramTags.length > 0) {
|
||||
@ -277,7 +277,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
"doclet.Type_Parameters_warn",
|
||||
paramName);
|
||||
}
|
||||
String rank = (String) rankMap.get(pt.parameterName());
|
||||
String rank = rankMap.get(pt.parameterName());
|
||||
if (rank != null && alreadyDocumented.contains(rank)) {
|
||||
writer.getMsgRetriever().warning(pt.position(),
|
||||
isNonTypeParams ?
|
||||
|
@ -212,7 +212,7 @@ public class TagletManager {
|
||||
URLClassLoader appClassLoader = new URLClassLoader(pathToURLs(cpString));
|
||||
customTagClass = appClassLoader.loadClass(classname);
|
||||
Method meth = customTagClass.getMethod("register",
|
||||
new Class[] {Class.forName("java.util.Map")});
|
||||
new Class<?>[] {java.util.Map.class});
|
||||
Object[] list = customTags.values().toArray();
|
||||
Taglet lastTag = (list != null && list.length > 0)
|
||||
? (Taglet) list[list.length-1] : null;
|
||||
@ -705,9 +705,9 @@ public class TagletManager {
|
||||
* Initialize lowercase version of standard Javadoc tags.
|
||||
*/
|
||||
private void initStandardTagsLowercase() {
|
||||
Iterator it = standardTags.iterator();
|
||||
Iterator<String> it = standardTags.iterator();
|
||||
while (it.hasNext()) {
|
||||
standardTagsLowercase.add(((String)it.next()).toLowerCase());
|
||||
standardTagsLowercase.add(it.next().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,9 +177,9 @@ public class ClassTree {
|
||||
bases.add(cd);
|
||||
}
|
||||
}
|
||||
List intfacs = Util.getAllInterfaces(cd, configuration);
|
||||
for (Iterator iter = intfacs.iterator(); iter.hasNext();) {
|
||||
add(implementingclasses, ((Type) iter.next()).asClassDoc(), cd);
|
||||
List<Type> intfacs = Util.getAllInterfaces(cd, configuration);
|
||||
for (Iterator<Type> iter = intfacs.iterator(); iter.hasNext();) {
|
||||
add(implementingclasses, iter.next().asClassDoc(), cd);
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,13 +278,13 @@ public class ClassTree {
|
||||
|
||||
//If class x implements a subinterface of cd, then it follows
|
||||
//that class x implements cd.
|
||||
Iterator implementingClassesIter, subInterfacesIter = subinterfaces.listIterator();
|
||||
Iterator<ClassDoc> implementingClassesIter, subInterfacesIter = subinterfaces.listIterator();
|
||||
ClassDoc c;
|
||||
while(subInterfacesIter.hasNext()){
|
||||
implementingClassesIter = implementingclasses((ClassDoc)
|
||||
implementingClassesIter = implementingclasses(
|
||||
subInterfacesIter.next()).listIterator();
|
||||
while(implementingClassesIter.hasNext()){
|
||||
c = (ClassDoc)implementingClassesIter.next();
|
||||
c = implementingClassesIter.next();
|
||||
if(! result.contains(c)){
|
||||
result.add(c);
|
||||
}
|
||||
@ -328,9 +328,9 @@ public class ClassTree {
|
||||
List<ClassDoc> list = subs(cd, isEnum);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
cd = list.get(i);
|
||||
List tlist = subs(cd, isEnum);
|
||||
List<ClassDoc> tlist = subs(cd, isEnum);
|
||||
for (int j = 0; j < tlist.size(); j++) {
|
||||
ClassDoc tcd = (ClassDoc)tlist.get(j);
|
||||
ClassDoc tcd = tlist.get(j);
|
||||
if (!list.contains(tcd)) {
|
||||
list.add(tcd);
|
||||
}
|
||||
@ -345,7 +345,7 @@ public class ClassTree {
|
||||
* thw classdoc for java.lang.Object, since this is the base class for all
|
||||
* classes.
|
||||
*/
|
||||
public List baseclasses() {
|
||||
public List<ClassDoc> baseclasses() {
|
||||
return baseclasses;
|
||||
}
|
||||
|
||||
@ -353,7 +353,7 @@ public class ClassTree {
|
||||
* Return the list of base interfaces. This is the list of interfaces
|
||||
* which do not have super-interface.
|
||||
*/
|
||||
public List baseinterfaces() {
|
||||
public List<ClassDoc> baseinterfaces() {
|
||||
return baseinterfaces;
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ public class ClassTree {
|
||||
* Return the list of base enums. This is the list of enums
|
||||
* which do not have super-enums.
|
||||
*/
|
||||
public List baseEnums() {
|
||||
public List<ClassDoc> baseEnums() {
|
||||
return baseEnums;
|
||||
}
|
||||
|
||||
@ -369,7 +369,7 @@ public class ClassTree {
|
||||
* Return the list of base annotation types. This is the list of
|
||||
* annotation types which do not have super-annotation types.
|
||||
*/
|
||||
public List baseAnnotationTypes() {
|
||||
public List<ClassDoc> baseAnnotationTypes() {
|
||||
return baseAnnotationTypes;
|
||||
}
|
||||
}
|
||||
|
@ -184,12 +184,12 @@ public class ClassUseMapper {
|
||||
this.classtree = classtree;
|
||||
|
||||
// Map subclassing, subinterfacing implementing, ...
|
||||
for (Iterator it = classtree.baseclasses().iterator(); it.hasNext();) {
|
||||
subclasses((ClassDoc)it.next());
|
||||
for (Iterator<ClassDoc> it = classtree.baseclasses().iterator(); it.hasNext();) {
|
||||
subclasses(it.next());
|
||||
}
|
||||
for (Iterator it = classtree.baseinterfaces().iterator(); it.hasNext();) {
|
||||
for (Iterator<ClassDoc> it = classtree.baseinterfaces().iterator(); it.hasNext();) {
|
||||
// does subinterfacing as side-effect
|
||||
implementingClasses((ClassDoc)it.next());
|
||||
implementingClasses(it.next());
|
||||
}
|
||||
// Map methods, fields, constructors using a class.
|
||||
ClassDoc[] classes = root.classes();
|
||||
@ -279,12 +279,12 @@ public class ClassUseMapper {
|
||||
List<ClassDoc> impl = classtree.implementingclasses(cd);
|
||||
if (impl != null) {
|
||||
ret.addAll(impl);
|
||||
for (Iterator it = impl.iterator(); it.hasNext();) {
|
||||
ret.addAll(subclasses((ClassDoc)it.next()));
|
||||
for (Iterator<ClassDoc> it = impl.iterator(); it.hasNext();) {
|
||||
ret.addAll(subclasses(it.next()));
|
||||
}
|
||||
}
|
||||
for (Iterator it = subinterfaces(cd).iterator(); it.hasNext();) {
|
||||
ret.addAll(implementingClasses((ClassDoc)it.next()));
|
||||
for (Iterator<ClassDoc> it = subinterfaces(cd).iterator(); it.hasNext();) {
|
||||
ret.addAll(implementingClasses(it.next()));
|
||||
}
|
||||
addAll(classToImplementingClass, cd, ret);
|
||||
}
|
||||
@ -328,8 +328,7 @@ public class ClassUseMapper {
|
||||
private <T> List<T> refList(Map<String,List<T>> map, ClassDoc cd) {
|
||||
List<T> list = map.get(cd.qualifiedName());
|
||||
if (list == null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<T> l = new ArrayList();
|
||||
List<T> l = new ArrayList<T>();
|
||||
list = l;
|
||||
map.put(cd.qualifiedName(), list);
|
||||
}
|
||||
@ -348,8 +347,7 @@ public class ClassUseMapper {
|
||||
private Set<ClassDoc> classSet(ClassDoc cd) {
|
||||
Set<ClassDoc> clsSet = classToClass.get(cd.qualifiedName());
|
||||
if (clsSet == null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Set<ClassDoc> s = new TreeSet();
|
||||
Set<ClassDoc> s = new TreeSet<ClassDoc>();
|
||||
clsSet = s;
|
||||
classToClass.put(cd.qualifiedName(), clsSet);
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public class Group {
|
||||
*
|
||||
* @return true if package name format found in the map, else false.
|
||||
*/
|
||||
boolean foundGroupFormat(Map map, String pkgFormat) {
|
||||
boolean foundGroupFormat(Map<String,?> map, String pkgFormat) {
|
||||
if (map.containsKey(pkgFormat)) {
|
||||
configuration.message.error("doclet.Same_package_name_used", pkgFormat);
|
||||
return true;
|
||||
@ -239,7 +239,7 @@ public class Group {
|
||||
* Return the list of groups, in the same order as specified
|
||||
* on the command line.
|
||||
*/
|
||||
public List getGroupList() {
|
||||
public List<String> getGroupList() {
|
||||
return groupList;
|
||||
}
|
||||
}
|
||||
|
@ -86,9 +86,9 @@ public class ImplementedMethods {
|
||||
* from the array passed.
|
||||
*/
|
||||
private void buildImplementedMethodList(boolean sort) {
|
||||
List intfacs = Util.getAllInterfaces(classdoc, configuration, sort);
|
||||
for (Iterator iter = intfacs.iterator(); iter.hasNext(); ) {
|
||||
Type interfaceType = (Type) iter.next();
|
||||
List<Type> intfacs = Util.getAllInterfaces(classdoc, configuration, sort);
|
||||
for (Iterator<Type> iter = intfacs.iterator(); iter.hasNext(); ) {
|
||||
Type interfaceType = iter.next();
|
||||
MethodDoc found = Util.findMethod(interfaceType.asClassDoc(), method);
|
||||
if (found != null) {
|
||||
removeOverriddenMethod(found);
|
||||
|
@ -114,7 +114,7 @@ public class IndexBuilder {
|
||||
this.noDeprecated = noDeprecated;
|
||||
this.classesOnly = classesOnly;
|
||||
buildIndexMap(configuration.root);
|
||||
Set set = indexmap.keySet();
|
||||
Set<Character> set = indexmap.keySet();
|
||||
elements = set.toArray();
|
||||
Arrays.sort(elements);
|
||||
}
|
||||
@ -215,7 +215,7 @@ public class IndexBuilder {
|
||||
*
|
||||
* @return Map index map.
|
||||
*/
|
||||
public Map getIndexMap() {
|
||||
public Map<Character,List<Doc>> getIndexMap() {
|
||||
return indexmap;
|
||||
}
|
||||
|
||||
@ -225,8 +225,8 @@ public class IndexBuilder {
|
||||
* @param index index Unicode character.
|
||||
* @return List member list for specific Unicode character.
|
||||
*/
|
||||
public List getMemberList(Character index) {
|
||||
return (List)indexmap.get(index);
|
||||
public List<Doc> getMemberList(Character index) {
|
||||
return indexmap.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -88,10 +88,10 @@ public class Util {
|
||||
/**
|
||||
* Return the list of ProgramElementDoc objects as Array.
|
||||
*/
|
||||
public static ProgramElementDoc[] toProgramElementDocArray(List list) {
|
||||
public static ProgramElementDoc[] toProgramElementDocArray(List<ProgramElementDoc> list) {
|
||||
ProgramElementDoc[] pgmarr = new ProgramElementDoc[list.size()];
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
pgmarr[i] = (ProgramElementDoc)(list.get(i));
|
||||
pgmarr[i] = list.get(i);
|
||||
}
|
||||
return pgmarr;
|
||||
}
|
||||
@ -416,9 +416,9 @@ public class Util {
|
||||
continue;
|
||||
}
|
||||
results.put(interfaceClassDoc, interfaceType);
|
||||
List superInterfaces = getAllInterfaces(interfaceType, configuration, sort);
|
||||
for (Iterator iter = superInterfaces.iterator(); iter.hasNext(); ) {
|
||||
Type t = (Type) iter.next();
|
||||
List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration, sort);
|
||||
for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) {
|
||||
Type t = iter.next();
|
||||
results.put(t.asClassDoc(), t);
|
||||
}
|
||||
}
|
||||
@ -438,7 +438,7 @@ public class Util {
|
||||
return resultsList;
|
||||
}
|
||||
|
||||
public static List getAllInterfaces(Type type, Configuration configuration) {
|
||||
public static List<Type> getAllInterfaces(Type type, Configuration configuration) {
|
||||
return getAllInterfaces(type, configuration, true);
|
||||
}
|
||||
|
||||
@ -480,9 +480,9 @@ public class Util {
|
||||
if (raw)
|
||||
interfaceType = interfaceType.asClassDoc();
|
||||
results.put(interfaceClassDoc, interfaceType);
|
||||
List superInterfaces = getAllInterfaces(interfaceType, configuration);
|
||||
for (Iterator iter = superInterfaces.iterator(); iter.hasNext(); ) {
|
||||
Type superInterface = (Type) iter.next();
|
||||
List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration);
|
||||
for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) {
|
||||
Type superInterface = iter.next();
|
||||
results.put(superInterface.asClassDoc(), superInterface);
|
||||
}
|
||||
}
|
||||
@ -495,8 +495,8 @@ public class Util {
|
||||
}
|
||||
|
||||
|
||||
public static List<ProgramElementDoc> asList(ProgramElementDoc[] members) {
|
||||
List<ProgramElementDoc> list = new ArrayList<ProgramElementDoc>();
|
||||
public static <T extends ProgramElementDoc> List<T> asList(T[] members) {
|
||||
List<T> list = new ArrayList<T>();
|
||||
for (int i = 0; i < members.length; i++) {
|
||||
list.add(members[i]);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ public class VisibleMemberMap {
|
||||
*
|
||||
* @return the list of visible classes in this map.
|
||||
*/
|
||||
public List getVisibleClassesList() {
|
||||
public List<ClassDoc> getVisibleClassesList() {
|
||||
sort(visibleClasses);
|
||||
return visibleClasses;
|
||||
}
|
||||
@ -130,8 +130,8 @@ public class VisibleMemberMap {
|
||||
*/
|
||||
private List<ProgramElementDoc> getInheritedPackagePrivateMethods(Configuration configuration) {
|
||||
List<ProgramElementDoc> results = new ArrayList<ProgramElementDoc>();
|
||||
for (Iterator iter = visibleClasses.iterator(); iter.hasNext(); ) {
|
||||
ClassDoc currentClass = (ClassDoc) iter.next();
|
||||
for (Iterator<ClassDoc> iter = visibleClasses.iterator(); iter.hasNext(); ) {
|
||||
ClassDoc currentClass = iter.next();
|
||||
if (currentClass != classdoc &&
|
||||
currentClass.isPackagePrivate() &&
|
||||
!Util.isLinkable(currentClass, configuration)) {
|
||||
@ -203,10 +203,10 @@ public class VisibleMemberMap {
|
||||
}
|
||||
}
|
||||
|
||||
private void purgeMemberLevelMap(List list, String level) {
|
||||
private void purgeMemberLevelMap(List<ProgramElementDoc> list, String level) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Object key = getMemberKey((ProgramElementDoc)list.get(i));
|
||||
Map memberLevelMap = (Map) memberNameMap.get(key);
|
||||
Object key = getMemberKey(list.get(i));
|
||||
Map<ProgramElementDoc, String> memberLevelMap = memberNameMap.get(key);
|
||||
if (level.equals(memberLevelMap.get(list.get(i))))
|
||||
memberLevelMap.remove(list.get(i));
|
||||
}
|
||||
@ -230,7 +230,7 @@ public class VisibleMemberMap {
|
||||
}
|
||||
|
||||
public boolean isEqual(MethodDoc member) {
|
||||
for (Iterator iter = members.iterator(); iter.hasNext(); ) {
|
||||
for (Iterator<ProgramElementDoc> iter = members.iterator(); iter.hasNext(); ) {
|
||||
MethodDoc member2 = (MethodDoc) iter.next();
|
||||
if (Util.executableMembersEqual(member, member2)) {
|
||||
members.add(member);
|
||||
@ -438,9 +438,9 @@ public class VisibleMemberMap {
|
||||
return targetMembers.toArray(new AnnotationTypeElementDoc[]{});
|
||||
}
|
||||
|
||||
private boolean found(List list, ProgramElementDoc elem) {
|
||||
private boolean found(List<ProgramElementDoc> list, ProgramElementDoc elem) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ProgramElementDoc pgmelem = (ProgramElementDoc)list.get(i);
|
||||
ProgramElementDoc pgmelem = list.get(i);
|
||||
if (Util.matches(pgmelem, elem)) {
|
||||
return true;
|
||||
}
|
||||
@ -455,13 +455,13 @@ public class VisibleMemberMap {
|
||||
* level "111".
|
||||
*/
|
||||
private boolean isOverridden(ProgramElementDoc pgmdoc, String level) {
|
||||
Map memberLevelMap = (Map) memberNameMap.get(getMemberKey(pgmdoc));
|
||||
Map<?,String> memberLevelMap = (Map<?,String>) memberNameMap.get(getMemberKey(pgmdoc));
|
||||
if (memberLevelMap == null)
|
||||
return false;
|
||||
String mappedlevel = null;
|
||||
Iterator iterator = memberLevelMap.values().iterator();
|
||||
Iterator<String> iterator = memberLevelMap.values().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
mappedlevel = (String)(iterator.next());
|
||||
mappedlevel = iterator.next();
|
||||
if (mappedlevel.equals(STARTLEVEL) ||
|
||||
(level.startsWith(mappedlevel) &&
|
||||
!level.equals(mappedlevel))) {
|
||||
@ -482,7 +482,7 @@ public class VisibleMemberMap {
|
||||
}
|
||||
|
||||
private ClassMember getClassMember(MethodDoc member) {
|
||||
for (Iterator iter = memberNameMap.keySet().iterator(); iter.hasNext();) {
|
||||
for (Iterator<?> iter = memberNameMap.keySet().iterator(); iter.hasNext();) {
|
||||
Object key = iter.next();
|
||||
if (key instanceof String) {
|
||||
continue;
|
||||
|
@ -56,7 +56,7 @@ public class Main {
|
||||
if (args.length > 0 && args[0].equals("-Xjdb")) {
|
||||
String[] newargs = new String[args.length + 2];
|
||||
Class<?> c = Class.forName("com.sun.tools.example.debug.tty.TTY");
|
||||
Method method = c.getDeclaredMethod ("main", new Class[] {args.getClass()});
|
||||
Method method = c.getDeclaredMethod ("main", new Class<?>[] {args.getClass()});
|
||||
method.setAccessible(true);
|
||||
System.arraycopy(args, 1, newargs, 3, args.length - 1);
|
||||
newargs[0] = "-connect";
|
||||
|
@ -949,8 +949,8 @@ public class JavacFileManager implements StandardJavaFileManager {
|
||||
Iterable<? extends File> files)
|
||||
{
|
||||
ArrayList<RegularFileObject> result;
|
||||
if (files instanceof Collection)
|
||||
result = new ArrayList<RegularFileObject>(((Collection)files).size());
|
||||
if (files instanceof Collection<?>)
|
||||
result = new ArrayList<RegularFileObject>(((Collection<?>)files).size());
|
||||
else
|
||||
result = new ArrayList<RegularFileObject>();
|
||||
for (File f: files)
|
||||
|
@ -1114,7 +1114,7 @@ public class ZipFileIndex {
|
||||
writtenSoFar += dirNameBytesLen;
|
||||
|
||||
// Write the number of files in the dir
|
||||
List dirEntries = dirEntry.getEntriesAsCollection();
|
||||
List<Entry> dirEntries = dirEntry.getEntriesAsCollection();
|
||||
raf.writeInt(dirEntries.size());
|
||||
writtenSoFar += 4;
|
||||
|
||||
|
@ -215,15 +215,15 @@ public class AnnotationProxyMaker {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void visitEnum(Attribute.Enum e) {
|
||||
if (returnClass.isEnum()) {
|
||||
String constName = e.value.toString();
|
||||
try {
|
||||
value = Enum.valueOf((Class) returnClass, constName);
|
||||
value = Enum.valueOf((Class)returnClass, constName);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
value = new EnumConstantNotPresentExceptionProxy(
|
||||
(Class) returnClass, constName);
|
||||
(Class<Enum<?>>) returnClass, constName);
|
||||
}
|
||||
} else {
|
||||
value = null; // indicates a type mismatch
|
||||
|
@ -1060,7 +1060,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
|
||||
next.put(Names.namesKey, names);
|
||||
}
|
||||
|
||||
DiagnosticListener dl = context.get(DiagnosticListener.class);
|
||||
DiagnosticListener<?> dl = context.get(DiagnosticListener.class);
|
||||
if (dl != null)
|
||||
next.put(DiagnosticListener.class, dl);
|
||||
|
||||
|
@ -55,12 +55,12 @@ class ServiceProxy {
|
||||
|
||||
private static final String prefix = "META-INF/services/";
|
||||
|
||||
private static void fail(Class service, String msg)
|
||||
private static void fail(Class<?> service, String msg)
|
||||
throws ServiceConfigurationError {
|
||||
throw new ServiceConfigurationError(service.getName() + ": " + msg);
|
||||
}
|
||||
|
||||
private static void fail(Class service, URL u, int line, String msg)
|
||||
private static void fail(Class<?> service, URL u, int line, String msg)
|
||||
throws ServiceConfigurationError {
|
||||
fail(service, u + ":" + line + ": " + msg);
|
||||
}
|
||||
@ -81,7 +81,7 @@ class ServiceProxy {
|
||||
* If an I/O error occurs while reading from the given URL, or
|
||||
* if a configuration-file format error is detected
|
||||
*/
|
||||
private static boolean parse(Class service, URL u) throws ServiceConfigurationError {
|
||||
private static boolean parse(Class<?> service, URL u) throws ServiceConfigurationError {
|
||||
InputStream in = null;
|
||||
BufferedReader r = null;
|
||||
try {
|
||||
|
@ -116,7 +116,7 @@ public class Context {
|
||||
* We maintain the invariant that this table contains only
|
||||
* mappings of the form
|
||||
* Key<T> -> T or Key<T> -> Factory<T> */
|
||||
private Map<Key,Object> ht = new HashMap<Key,Object>();
|
||||
private Map<Key<?>,Object> ht = new HashMap<Key<?>,Object>();
|
||||
|
||||
/** Set the factory for the key in this context. */
|
||||
public <T> void put(Key<T> key, Factory<T> fac) {
|
||||
@ -128,11 +128,11 @@ public class Context {
|
||||
|
||||
/** Set the value for the key in this context. */
|
||||
public <T> void put(Key<T> key, T data) {
|
||||
if (data instanceof Factory)
|
||||
if (data instanceof Factory<?>)
|
||||
throw new AssertionError("T extends Context.Factory");
|
||||
checkState(ht);
|
||||
Object old = ht.put(key, data);
|
||||
if (old != null && !(old instanceof Factory) && old != data && data != null)
|
||||
if (old != null && !(old instanceof Factory<?>) && old != data && data != null)
|
||||
throw new AssertionError("duplicate context value");
|
||||
}
|
||||
|
||||
@ -140,10 +140,10 @@ public class Context {
|
||||
public <T> T get(Key<T> key) {
|
||||
checkState(ht);
|
||||
Object o = ht.get(key);
|
||||
if (o instanceof Factory) {
|
||||
Factory fac = (Factory)o;
|
||||
if (o instanceof Factory<?>) {
|
||||
Factory<?> fac = (Factory<?>)o;
|
||||
o = fac.make();
|
||||
if (o instanceof Factory)
|
||||
if (o instanceof Factory<?>)
|
||||
throw new AssertionError("T extends Context.Factory");
|
||||
assert ht.get(key) == o;
|
||||
}
|
||||
|
@ -71,9 +71,10 @@ public class List<A> extends AbstractCollection<A> implements java.util.List<A>
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <A> List<A> nil() {
|
||||
return EMPTY_LIST;
|
||||
return (List<A>)EMPTY_LIST;
|
||||
}
|
||||
private static List EMPTY_LIST = new List<Object>(null,null) {
|
||||
|
||||
private static List<?> EMPTY_LIST = new List<Object>(null,null) {
|
||||
public List<Object> setTail(List<Object> tail) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
@ -318,7 +319,7 @@ public class List<A> extends AbstractCollection<A> implements java.util.List<A>
|
||||
|
||||
/** Are the two lists the same?
|
||||
*/
|
||||
public static boolean equals(List xs, List ys) {
|
||||
public static boolean equals(List<?> xs, List<?> ys) {
|
||||
while (xs.tail != null && ys.tail != null) {
|
||||
if (xs.head == null) {
|
||||
if (ys.head != null) return false;
|
||||
@ -368,7 +369,7 @@ public class List<A> extends AbstractCollection<A> implements java.util.List<A>
|
||||
return (List<T>)list;
|
||||
}
|
||||
|
||||
private static Iterator EMPTYITERATOR = new Iterator() {
|
||||
private static Iterator<?> EMPTYITERATOR = new Iterator<Object>() {
|
||||
public boolean hasNext() {
|
||||
return false;
|
||||
}
|
||||
@ -382,7 +383,7 @@ public class List<A> extends AbstractCollection<A> implements java.util.List<A>
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static <A> Iterator<A> emptyIterator() {
|
||||
return EMPTYITERATOR;
|
||||
return (Iterator<A>)EMPTYITERATOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,9 +52,9 @@ public class Pair<A, B> {
|
||||
|
||||
public boolean equals(Object other) {
|
||||
return
|
||||
other instanceof Pair &&
|
||||
equals(fst, ((Pair)other).fst) &&
|
||||
equals(snd, ((Pair)other).snd);
|
||||
other instanceof Pair<?,?> &&
|
||||
equals(fst, ((Pair<?,?>)other).fst) &&
|
||||
equals(snd, ((Pair<?,?>)other).snd);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
|
@ -88,7 +88,7 @@ public class DocletInvoker {
|
||||
appClassLoader = new URLClassLoader(urls, docletParentClassLoader);
|
||||
|
||||
// attempt to find doclet
|
||||
Class dc = null;
|
||||
Class<?> dc = null;
|
||||
try {
|
||||
dc = appClassLoader.loadClass(docletClassName);
|
||||
} catch (ClassNotFoundException exc) {
|
||||
@ -104,7 +104,7 @@ public class DocletInvoker {
|
||||
public boolean start(RootDoc root) {
|
||||
Object retVal;
|
||||
String methodName = "start";
|
||||
Class[] paramTypes = new Class[1];
|
||||
Class<?>[] paramTypes = new Class<?>[1];
|
||||
Object[] params = new Object[1];
|
||||
paramTypes[0] = RootDoc.class;
|
||||
params[0] = root;
|
||||
@ -130,7 +130,7 @@ public class DocletInvoker {
|
||||
public int optionLength(String option) {
|
||||
Object retVal;
|
||||
String methodName = "optionLength";
|
||||
Class[] paramTypes = new Class[1];
|
||||
Class<?>[] paramTypes = new Class<?>[1];
|
||||
Object[] params = new Object[1];
|
||||
paramTypes[0] = option.getClass();
|
||||
params[0] = option;
|
||||
@ -157,7 +157,7 @@ public class DocletInvoker {
|
||||
String options[][] = optlist.toArray(new String[optlist.length()][]);
|
||||
String methodName = "validOptions";
|
||||
DocErrorReporter reporter = messager;
|
||||
Class[] paramTypes = new Class[2];
|
||||
Class<?>[] paramTypes = new Class<?>[2];
|
||||
Object[] params = new Object[2];
|
||||
paramTypes[0] = options.getClass();
|
||||
paramTypes[1] = DocErrorReporter.class;
|
||||
@ -185,7 +185,7 @@ public class DocletInvoker {
|
||||
try {
|
||||
Object retVal;
|
||||
String methodName = "languageVersion";
|
||||
Class[] paramTypes = new Class[0];
|
||||
Class<?>[] paramTypes = new Class<?>[0];
|
||||
Object[] params = new Object[0];
|
||||
try {
|
||||
retVal = invoke(methodName, JAVA_1_1, paramTypes, params);
|
||||
@ -208,7 +208,7 @@ public class DocletInvoker {
|
||||
* Utility method for calling doclet functionality
|
||||
*/
|
||||
private Object invoke(String methodName, Object returnValueIfNonExistent,
|
||||
Class[] paramTypes, Object[] params)
|
||||
Class<?>[] paramTypes, Object[] params)
|
||||
throws DocletInvokeException {
|
||||
Method meth;
|
||||
try {
|
||||
|
@ -326,7 +326,7 @@ public abstract class Gen {
|
||||
throws ClassNotFoundException {
|
||||
Vector<FieldDoc> fields = new Vector<FieldDoc>();
|
||||
ClassDoc cd = null;
|
||||
Stack s = new Stack();
|
||||
Stack<Object> s = new Stack<Object>();
|
||||
|
||||
cd = subclazz;
|
||||
while (true) {
|
||||
|
@ -39,7 +39,7 @@ public class LLNI extends Gen {
|
||||
|
||||
protected final char pathChar = File.separatorChar;
|
||||
protected final char innerDelim = '$'; /* For inner classes */
|
||||
protected Hashtable doneHandleTypes;
|
||||
protected Hashtable<Object, Object> doneHandleTypes;
|
||||
MemberDoc []fields;
|
||||
MemberDoc [] methods;
|
||||
private boolean doubleAlign;
|
||||
@ -68,7 +68,7 @@ public class LLNI extends Gen {
|
||||
protected void generateDeclsForClass(PrintWriter pw,
|
||||
ClassDoc clazz, String cname)
|
||||
throws ClassNotFoundException {
|
||||
doneHandleTypes = new Hashtable();
|
||||
doneHandleTypes = new Hashtable<Object, Object>();
|
||||
/* The following handle types are predefined in "typedefs.h". Suppress
|
||||
inclusion in the output by generating them "into the blue" here. */
|
||||
genHandleType(null, "java.lang.Class");
|
||||
|
@ -74,7 +74,7 @@ public class TypeSignature{
|
||||
|
||||
String signature = null; //Java type signature.
|
||||
String typeSignature = null; //Internal type signature.
|
||||
Vector params = new Vector(); //List of parameters.
|
||||
Vector<Object> params = new Vector<Object>(); //List of parameters.
|
||||
String paramsig = null; //Java parameter signature.
|
||||
String paramJVMSig = null; //Internal parameter signature.
|
||||
String returnSig = null; //Java return type signature.
|
||||
|
@ -157,7 +157,7 @@ public class FieldData implements RuntimeConstants {
|
||||
/**
|
||||
* Returns list of attributes of field.
|
||||
*/
|
||||
public Vector getAttributes(){
|
||||
public Vector<?> getAttributes(){
|
||||
return attrs;
|
||||
}
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class JavapPrinter {
|
||||
|
||||
/* print field attribute information. */
|
||||
public void printFieldAttributes(FieldData field){
|
||||
Vector fieldattrs = field.getAttributes();
|
||||
Vector<?> fieldattrs = field.getAttributes();
|
||||
for(int j = 0; j < fieldattrs.size(); j++){
|
||||
String fieldattrname = ((AttrData)fieldattrs.elementAt(j)).getAttrName();
|
||||
if(fieldattrname.equals("ConstantValue")){
|
||||
@ -256,8 +256,8 @@ public class JavapPrinter {
|
||||
* print method attribute information.
|
||||
*/
|
||||
public void printMethodAttributes(MethodData method){
|
||||
Vector methodattrs = method.getAttributes();
|
||||
Vector codeattrs = method.getCodeAttributes();
|
||||
Vector<?> methodattrs = method.getAttributes();
|
||||
Vector<?> codeattrs = method.getCodeAttributes();
|
||||
for(int k = 0; k < methodattrs.size(); k++){
|
||||
String methodattrname = ((AttrData)methodattrs.elementAt(k)).getAttrName();
|
||||
if(methodattrname.equals("Code")){
|
||||
@ -519,7 +519,7 @@ public class JavapPrinter {
|
||||
* Print the exception table for this method code
|
||||
*/
|
||||
void printExceptionTable(MethodData method){//throws IOException
|
||||
Vector exception_table = method.getexception_table();
|
||||
Vector<?> exception_table = method.getexception_table();
|
||||
if (exception_table.size() > 0) {
|
||||
out.println(" Exception table:");
|
||||
out.println(" from to target type");
|
||||
@ -546,7 +546,7 @@ public class JavapPrinter {
|
||||
*/
|
||||
public void printLineNumTable(MethodData method) {
|
||||
int numlines = method.getnumlines();
|
||||
Vector lin_num_tb = method.getlin_num_tb();
|
||||
Vector<?> lin_num_tb = method.getlin_num_tb();
|
||||
if( lin_num_tb.size() > 0){
|
||||
out.println(" LineNumberTable: ");
|
||||
for (int i=0; i<numlines; i++) {
|
||||
@ -568,7 +568,7 @@ public class JavapPrinter {
|
||||
out.print(" ");
|
||||
out.println("Start Length Slot Name Signature");
|
||||
}
|
||||
Vector loc_var_tb = method.getloc_var_tb();
|
||||
Vector<?> loc_var_tb = method.getloc_var_tb();
|
||||
|
||||
for (int i=0; i<siz; i++) {
|
||||
LocVarData entry=(LocVarData)loc_var_tb.elementAt(i);
|
||||
|
@ -302,7 +302,7 @@ public class MethodData {
|
||||
/**
|
||||
* Return LineNumberTable
|
||||
*/
|
||||
public Vector getlin_num_tb(){
|
||||
public Vector<?> getlin_num_tb(){
|
||||
return lin_num_tb;
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ public class MethodData {
|
||||
/**
|
||||
* Return LocalVariableTable.
|
||||
*/
|
||||
public Vector getloc_var_tb(){
|
||||
public Vector<?> getloc_var_tb(){
|
||||
return loc_var_tb;
|
||||
}
|
||||
|
||||
@ -378,7 +378,7 @@ public class MethodData {
|
||||
/**
|
||||
* Return exception table in code attributre.
|
||||
*/
|
||||
public Vector getexception_table(){
|
||||
public Vector<?> getexception_table(){
|
||||
return exception_table;
|
||||
}
|
||||
|
||||
@ -386,7 +386,7 @@ public class MethodData {
|
||||
/**
|
||||
* Return method attributes.
|
||||
*/
|
||||
public Vector getAttributes(){
|
||||
public Vector<?> getAttributes(){
|
||||
return attrs;
|
||||
}
|
||||
|
||||
@ -394,7 +394,7 @@ public class MethodData {
|
||||
/**
|
||||
* Return code attributes.
|
||||
*/
|
||||
public Vector getCodeAttributes(){
|
||||
public Vector<?> getCodeAttributes(){
|
||||
return code_attrs;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user