From 5ee390d8564d79ac8c1dcb986c1b63b4f6ad99bd Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Thu, 10 Sep 2009 13:08:27 -0700 Subject: [PATCH] Add missing @Override to DroidDoc and ApiCheck Change-Id: Ic7829a4ea62a614ef8b525bd84f8fbaaa4674d06 --- .../src/com/android/apicheck/ApiCheck.java | 25 ++++++----- .../src/com/android/apicheck/Errors.java | 3 +- .../android/apicheck/SourcePositionInfo.java | 1 + .../droiddoc/src/AnnotationInstanceInfo.java | 1 + tools/droiddoc/src/AttrTagInfo.java | 4 +- tools/droiddoc/src/ClassInfo.java | 33 ++++++++------- tools/droiddoc/src/Comment.java | 8 ++-- tools/droiddoc/src/Converter.java | 35 ++++++++++------ tools/droiddoc/src/DroidDoc.java | 40 +++++++++--------- tools/droiddoc/src/Errors.java | 1 + tools/droiddoc/src/FieldInfo.java | 7 ++-- tools/droiddoc/src/MemberInfo.java | 3 +- tools/droiddoc/src/MethodInfo.java | 41 ++++++++++--------- tools/droiddoc/src/PackageInfo.java | 2 + tools/droiddoc/src/ParamTagInfo.java | 1 + tools/droiddoc/src/SampleTagInfo.java | 3 +- tools/droiddoc/src/SeeTagInfo.java | 1 + tools/droiddoc/src/SourcePositionInfo.java | 1 + tools/droiddoc/src/TypeInfo.java | 1 + 19 files changed, 123 insertions(+), 88 deletions(-) diff --git a/tools/apicheck/src/com/android/apicheck/ApiCheck.java b/tools/apicheck/src/com/android/apicheck/ApiCheck.java index 20a98ce5ed..c8272ddd74 100644 --- a/tools/apicheck/src/com/android/apicheck/ApiCheck.java +++ b/tools/apicheck/src/com/android/apicheck/ApiCheck.java @@ -127,7 +127,7 @@ public class ApiCheck { } private static class MakeHandler extends DefaultHandler { - + private ApiInfo mApi; private PackageInfo mCurrentPackage; private ClassInfo mCurrentClass; @@ -139,8 +139,9 @@ public class ApiCheck { super(); mApi = new ApiInfo(); } - - public void startElement(String uri, String localName, String qName, + + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) { if (qName.equals("package")) { mCurrentPackage = new PackageInfo(attributes.getValue("name"), @@ -150,25 +151,25 @@ public class ApiCheck { // push the old outer scope for later recovery, then set // up the new current class object mClassScope.push(mCurrentClass); - mCurrentClass = new ClassInfo(attributes.getValue("name"), + mCurrentClass = new ClassInfo(attributes.getValue("name"), mCurrentPackage, attributes.getValue("extends") , - qName.equals("interface"), + qName.equals("interface"), Boolean.valueOf( attributes.getValue("abstract")), Boolean.valueOf( attributes.getValue("static")), Boolean.valueOf( attributes.getValue("final")), - attributes.getValue("deprecated"), + attributes.getValue("deprecated"), attributes.getValue("visibility"), SourcePositionInfo.fromXml(attributes.getValue("source")), mCurrentClass); } else if (qName.equals("method")) { - mCurrentMethod = new MethodInfo(attributes.getValue("name"), + mCurrentMethod = new MethodInfo(attributes.getValue("name"), attributes.getValue("return") , Boolean.valueOf( - attributes.getValue("abstract")), + attributes.getValue("abstract")), Boolean.valueOf( attributes.getValue("native")), Boolean.valueOf( @@ -178,11 +179,11 @@ public class ApiCheck { Boolean.valueOf( attributes.getValue("final")), attributes.getValue("deprecated"), - attributes.getValue("visibility"), + attributes.getValue("visibility"), SourcePositionInfo.fromXml(attributes.getValue("source")), mCurrentClass); } else if (qName.equals("constructor")) { - mCurrentMethod = new ConstructorInfo(attributes.getValue("name"), + mCurrentMethod = new ConstructorInfo(attributes.getValue("name"), attributes.getValue("type") , Boolean.valueOf( attributes.getValue("static")), @@ -193,7 +194,7 @@ public class ApiCheck { SourcePositionInfo.fromXml(attributes.getValue("source")), mCurrentClass); } else if (qName.equals("field")) { - FieldInfo fInfo = new FieldInfo(attributes.getValue("name"), + FieldInfo fInfo = new FieldInfo(attributes.getValue("name"), attributes.getValue("type") , Boolean.valueOf( attributes.getValue("transient")), @@ -218,6 +219,8 @@ public class ApiCheck { mCurrentClass.addInterface(attributes.getValue("name")); } } + + @Override public void endElement(String uri, String localName, String qName) { if (qName.equals("method")) { mCurrentClass.addMethod((MethodInfo) mCurrentMethod); diff --git a/tools/apicheck/src/com/android/apicheck/Errors.java b/tools/apicheck/src/com/android/apicheck/Errors.java index d7013e3c16..b0b620ef60 100644 --- a/tools/apicheck/src/com/android/apicheck/Errors.java +++ b/tools/apicheck/src/com/android/apicheck/Errors.java @@ -41,6 +41,7 @@ public class Errors return this.msg.compareTo(that.msg); } + @Override public String toString() { return this.pos.toString() + this.msg; } @@ -115,7 +116,7 @@ public class Errors public static Error CHANGED_CLASS = new Error(23, WARNING); public static Error CHANGED_DEPRECATED = new Error(24, WARNING); public static Error CHANGED_SYNCHRONIZED = new Error(25, ERROR); - + public static Error[] ERRORS = { PARSE_ERROR, ADDED_PACKAGE, diff --git a/tools/apicheck/src/com/android/apicheck/SourcePositionInfo.java b/tools/apicheck/src/com/android/apicheck/SourcePositionInfo.java index 477c1d3563..276771b16a 100644 --- a/tools/apicheck/src/com/android/apicheck/SourcePositionInfo.java +++ b/tools/apicheck/src/com/android/apicheck/SourcePositionInfo.java @@ -80,6 +80,7 @@ public class SourcePositionInfo implements Comparable return new SourcePositionInfo(that.file, line, 0); } + @Override public String toString() { if (this.file == null) { diff --git a/tools/droiddoc/src/AnnotationInstanceInfo.java b/tools/droiddoc/src/AnnotationInstanceInfo.java index 07d4aa3eb9..c4abc7e659 100644 --- a/tools/droiddoc/src/AnnotationInstanceInfo.java +++ b/tools/droiddoc/src/AnnotationInstanceInfo.java @@ -35,6 +35,7 @@ class AnnotationInstanceInfo return mElementValues; } + @Override public String toString() { StringBuilder str = new StringBuilder(); diff --git a/tools/droiddoc/src/AttrTagInfo.java b/tools/droiddoc/src/AttrTagInfo.java index abc5452636..7f1b4d98ee 100644 --- a/tools/droiddoc/src/AttrTagInfo.java +++ b/tools/droiddoc/src/AttrTagInfo.java @@ -98,7 +98,8 @@ public class AttrTagInfo extends TagInfo public FieldInfo reference() { return REF_COMMAND.equals(mCommand) ? mRefField : null; } - + + @Override public String name() { return NAME_COMMAND.equals(mCommand) ? mAttrName : null; } @@ -107,6 +108,7 @@ public class AttrTagInfo extends TagInfo return DESCRIPTION_COMMAND.equals(mCommand) ? mDescrComment : null; } + @Override public void makeHDF(HDF data, String base) { super.makeHDF(data, base); diff --git a/tools/droiddoc/src/ClassInfo.java b/tools/droiddoc/src/ClassInfo.java index 5c61941cfe..32078f9362 100644 --- a/tools/droiddoc/src/ClassInfo.java +++ b/tools/droiddoc/src/ClassInfo.java @@ -101,7 +101,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco mSelfFields = null; mSelfAttributes = null; mDeprecatedKnown = false; - + Arrays.sort(mEnumConstants, FieldInfo.comparator); Arrays.sort(mInnerClasses, ClassInfo.comparator); } @@ -111,16 +111,16 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco // objects selfAttributes(); } - + public void init3(TypeInfo[] types, ClassInfo[] realInnerClasses){ mTypeParameters = types; mRealInnerClasses = realInnerClasses; } - + public ClassInfo[] getRealInnerClasses(){ return mRealInnerClasses; } - + public TypeInfo[] getTypeParameters(){ return mTypeParameters; } @@ -146,6 +146,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco } } + @Override public ContainerInfo parent() { return this; @@ -351,7 +352,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco { return comment().briefTags(); } - + public boolean isDeprecated() { boolean deprecated = false; if (!mDeprecatedKnown) { @@ -551,7 +552,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco public MethodInfo[] allSelfMethods() { return mAllSelfMethods; } - + public void addMethod(MethodInfo method) { MethodInfo[] methods = new MethodInfo[mAllSelfMethods.length + 1]; int i = 0; @@ -596,7 +597,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco } } } - + //constructors too for (MethodInfo m: constructors()) { for (AttrTagInfo tag: m.comment().attrTags()) { @@ -1136,7 +1137,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco if (kind != null) { data.setValue(base + ".kind", kind); } - + // xml attributes i=0; for (AttributeInfo attr: cl.selfAttributes()) { @@ -1170,6 +1171,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco } } + @Override public boolean isHidden() { int val = mHidden; @@ -1301,7 +1303,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco return f; } } - + // then look at our enum constants (these are really fields, maybe // they should be mixed into fields(). not sure) for (FieldInfo f: enumConstants()) { @@ -1346,11 +1348,11 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco return false; } } - + public void setNonWrittenConstructors(MethodInfo[] nonWritten) { mNonWrittenConstructors = nonWritten; } - + public MethodInfo[] getNonWrittenConstructors() { return mNonWrittenConstructors; } @@ -1377,23 +1379,24 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco } return null; } - + public void setHiddenMethods(MethodInfo[] mInfo){ mHiddenMethods = mInfo; } public MethodInfo[] getHiddenMethods(){ return mHiddenMethods; } + @Override public String toString(){ return this.qualifiedName(); } - + public void setReasonIncluded(String reason) { mReasonIncluded = reason; } - + public String getReasonIncluded() { - return mReasonIncluded; + return mReasonIncluded; } private ClassDoc mClass; diff --git a/tools/droiddoc/src/Comment.java b/tools/droiddoc/src/Comment.java index 3f1bf6c506..f9b9dc2ead 100644 --- a/tools/droiddoc/src/Comment.java +++ b/tools/droiddoc/src/Comment.java @@ -206,7 +206,7 @@ public class Comment for (int i=0; i= 0) { for (int i=0; i= 0) { return mDocOnly != 0; @@ -391,5 +391,5 @@ public class Comment ArrayList mUndeprecateTagsList = new ArrayList(); ArrayList mAttrTagsList = new ArrayList(); - + } diff --git a/tools/droiddoc/src/Converter.java b/tools/droiddoc/src/Converter.java index 4014f7f08e..ee911f429e 100644 --- a/tools/droiddoc/src/Converter.java +++ b/tools/droiddoc/src/Converter.java @@ -238,6 +238,7 @@ public class Converter } private static Cache mClasses = new Cache() { + @Override protected Object make(Object o) { ClassDoc c = (ClassDoc)o; @@ -268,19 +269,21 @@ public class Converter } return cl; } + @Override protected void made(Object o, Object r) { if (mClassesNeedingInit == null) { initClass((ClassDoc)o, (ClassInfo)r); ((ClassInfo)r).init2(); } - } + } + @Override ClassInfo[] all() { return (ClassInfo[])mCache.values().toArray(new ClassInfo[mCache.size()]); } }; - + private static MethodInfo[] getHiddenMethods(MethodDoc[] methods){ if (methods == null) return null; ArrayList out = new ArrayList(); @@ -342,7 +345,7 @@ public class Converter } return out.toArray(new MethodInfo[out.size()]); } - + private static MethodInfo[] convertNonWrittenConstructors(ConstructorDoc[] methods) { if (methods == null) return null; @@ -367,6 +370,7 @@ public class Converter } private static Cache mMethods = new Cache() { + @Override protected Object make(Object o) { if (o instanceof AnnotationTypeElementDoc) { @@ -374,7 +378,7 @@ public class Converter MethodInfo result = new MethodInfo( m.getRawCommentText(), Converter.convertTypes(m.typeParameters()), - m.name(), m.signature(), + m.name(), m.signature(), Converter.obtainClass(m.containingClass()), Converter.obtainClass(m.containingClass()), m.isPublic(), m.isProtected(), @@ -399,7 +403,7 @@ public class Converter MethodInfo result = new MethodInfo( m.getRawCommentText(), Converter.convertTypes(m.typeParameters()), - m.name(), m.signature(), + m.name(), m.signature(), Converter.obtainClass(m.containingClass()), Converter.obtainClass(m.containingClass()), m.isPublic(), m.isProtected(), @@ -424,7 +428,7 @@ public class Converter MethodInfo result = new MethodInfo( m.getRawCommentText(), Converter.convertTypes(m.typeParameters()), - m.name(), m.signature(), + m.name(), m.signature(), Converter.obtainClass(m.containingClass()), Converter.obtainClass(m.containingClass()), m.isPublic(), m.isProtected(), @@ -472,6 +476,7 @@ public class Converter } private static Cache mFields = new Cache() { + @Override protected Object make(Object o) { FieldDoc f = (FieldDoc)o; @@ -496,6 +501,7 @@ public class Converter } private static Cache mPackagees = new Cache() { + @Override protected Object make(Object o) { PackageDoc p = (PackageDoc)o; @@ -510,7 +516,8 @@ public class Converter } private static Cache mTypes = new Cache() { - protected Object make(Object o) + @Override + protected Object make(Object o) { Type t = (Type)o; String simpleTypeName; @@ -524,6 +531,7 @@ public class Converter Converter.obtainClass(t.asClassDoc())); return ti; } + @Override protected void made(Object o, Object r) { Type t = (Type)o; @@ -545,8 +553,9 @@ public class Converter Converter.convertTypes(t.asWildcardType().extendsBounds())); } } + @Override protected Object keyFor(Object o) - { + { Type t = (Type)o; String keyString = o.getClass().getName() + "/" + o.toString() + "/"; if (t.asParameterizedType() != null){ @@ -584,13 +593,13 @@ public class Converter }else{ keyString += "NoWildCardType//"; } - - - + + + return keyString; } }; - + private static MemberInfo obtainMember(MemberDoc o) @@ -599,6 +608,7 @@ public class Converter } private static Cache mMembers = new Cache() { + @Override protected Object make(Object o) { if (o instanceof MethodDoc) { @@ -633,6 +643,7 @@ public class Converter } private static Cache mAnnotationInstances = new Cache() { + @Override protected Object make(Object o) { AnnotationDesc a = (AnnotationDesc)o; diff --git a/tools/droiddoc/src/DroidDoc.java b/tools/droiddoc/src/DroidDoc.java index 39f9393f36..ef64e3691e 100644 --- a/tools/droiddoc/src/DroidDoc.java +++ b/tools/droiddoc/src/DroidDoc.java @@ -40,7 +40,7 @@ public class DroidDoc private static final int TYPE_WIDGET = 1; private static final int TYPE_LAYOUT = 2; private static final int TYPE_LAYOUT_PARAM = 3; - + public static final int SHOW_PUBLIC = 0x00000001; public static final int SHOW_PROTECTED = 0x00000003; public static final int SHOW_PACKAGE = 0x00000007; @@ -84,7 +84,7 @@ public class DroidDoc } return false; } - + public static boolean start(RootDoc r) { String keepListFile = null; @@ -792,7 +792,7 @@ public class DroidDoc data.setValue("package.since", pkg.getSince()); data.setValue("package.descr", "...description..."); - makeClassListHDF(data, "package.interfaces", + makeClassListHDF(data, "package.interfaces", ClassInfo.sortByName(pkg.interfaces())); makeClassListHDF(data, "package.classes", ClassInfo.sortByName(pkg.ordinaryClasses())); @@ -886,7 +886,7 @@ public class DroidDoc HDF data = makeHDF(); Collections.sort(keywords); - + int i=0; for (KeywordEntry entry: keywords) { String base = "keywords." + entry.firstChar() + "." + i; @@ -1074,7 +1074,7 @@ public class DroidDoc if (methodName.equals("getRawCommentText")) { return filterComment((String) method.invoke(target, args)); } - + // escape "&" in disjunctive types. if (proxy instanceof Type && methodName.equals("toString")) { return ((String) method.invoke(target, args)) @@ -1129,7 +1129,7 @@ public class DroidDoc throw new RuntimeException("invalid scope for object " + scoped); } } - + /** * Collect the values used by the Dev tools and write them in files packaged with the SDK * @param output the ouput directory for the files. @@ -1139,16 +1139,16 @@ public class DroidDoc ArrayList broadcastActions = new ArrayList(); ArrayList serviceActions = new ArrayList(); ArrayList categories = new ArrayList(); - + ArrayList layouts = new ArrayList(); ArrayList widgets = new ArrayList(); ArrayList layoutParams = new ArrayList(); - + ClassInfo[] classes = Converter.allClasses(); // Go through all the fields of all the classes, looking SDK stuff. for (ClassInfo clazz : classes) { - + // first check constant fields for the SdkConstant annotation. FieldInfo[] fields = clazz.allSelfFields(); for (FieldInfo field : fields) { @@ -1177,7 +1177,7 @@ public class DroidDoc } } } - + // Now check the class for @Widget or if its in the android.widget package // (unless the class is hidden or abstract, or non public) if (clazz.isHidden() == false && clazz.isPublic() && clazz.isAbstract() == false) { @@ -1196,7 +1196,7 @@ public class DroidDoc } } } - + if (annotated == false) { // lets check if this is inside android.widget PackageInfo pckg = clazz.containingPackage(); @@ -1236,7 +1236,7 @@ public class DroidDoc Collections.sort(categories); writeValues(output + "/categories.txt", categories); - + // before writing the list of classes, we do some checks, to make sure the layout params // are enclosed by a layout class (and not one that has been declared as a widget) for (int i = 0 ; i < layoutParams.size();) { @@ -1248,10 +1248,10 @@ public class DroidDoc i++; } } - + writeClasses(output + "/widgets.txt", widgets, layouts, layoutParams); } - + /** * Writes a list of values into a text files. * @param pathname the absolute os path of the output file. @@ -1263,7 +1263,7 @@ public class DroidDoc try { fw = new FileWriter(pathname, false); bw = new BufferedWriter(fw); - + for (String value : values) { bw.append(value).append('\n'); } @@ -1297,7 +1297,7 @@ public class DroidDoc try { fw = new FileWriter(pathname, false); bw = new BufferedWriter(fw); - + // write the 3 types of classes. for (ClassInfo clazz : widgets) { writeClass(bw, clazz, 'W'); @@ -1340,7 +1340,7 @@ public class DroidDoc } writer.append('\n'); } - + /** * Checks the inheritance of {@link ClassInfo} objects. This method return *
    @@ -1348,7 +1348,7 @@ public class DroidDoc *
  • {@link #TYPE_WIDGET}: if the class extends android.view.View
  • *
  • {@link #TYPE_LAYOUT_PARAM}: if the class extends android.view.ViewGroup$LayoutParams
  • *
  • {@link #TYPE_NONE}: in all other cases
  • - *
+ * * @param clazz the {@link ClassInfo} to check. */ private static int checkInheritance(ClassInfo clazz) { @@ -1359,12 +1359,12 @@ public class DroidDoc } else if ("android.view.ViewGroup.LayoutParams".equals(clazz.qualifiedName())) { return TYPE_LAYOUT_PARAM; } - + ClassInfo parent = clazz.superclass(); if (parent != null) { return checkInheritance(parent); } - + return TYPE_NONE; } } diff --git a/tools/droiddoc/src/Errors.java b/tools/droiddoc/src/Errors.java index 95439f1c00..77852f8c73 100644 --- a/tools/droiddoc/src/Errors.java +++ b/tools/droiddoc/src/Errors.java @@ -41,6 +41,7 @@ public class Errors return this.msg.compareTo(that.msg); } + @Override public String toString() { String whereText = this.pos == null ? "unknown: " : this.pos.toString() + ':'; return whereText + this.msg; diff --git a/tools/droiddoc/src/FieldInfo.java b/tools/droiddoc/src/FieldInfo.java index 1c975e4da0..d9371e85aa 100644 --- a/tools/droiddoc/src/FieldInfo.java +++ b/tools/droiddoc/src/FieldInfo.java @@ -26,7 +26,7 @@ public class FieldInfo extends MemberInfo return a.name().compareTo(b.name()); } }; - + public FieldInfo(String name, ClassInfo containingClass, ClassInfo realContainingClass, boolean isPublic, boolean isProtected, boolean isPackagePrivate, boolean isPrivate, @@ -92,7 +92,7 @@ public class FieldInfo extends MemberInfo { return constantLiteralValue(mConstantValue); } - + public boolean isDeprecated() { boolean deprecated = false; if (!mDeprecatedKnown) { @@ -124,7 +124,7 @@ public class FieldInfo extends MemberInfo if (val instanceof Boolean || val instanceof Byte || val instanceof Short - || val instanceof Integer) + || val instanceof Integer) { str = val.toString(); } @@ -291,6 +291,7 @@ public class FieldInfo extends MemberInfo } } + @Override public boolean isExecutable() { return false; diff --git a/tools/droiddoc/src/MemberInfo.java b/tools/droiddoc/src/MemberInfo.java index 2a2572a466..05da583ad2 100644 --- a/tools/droiddoc/src/MemberInfo.java +++ b/tools/droiddoc/src/MemberInfo.java @@ -115,6 +115,7 @@ public abstract class MemberInfo extends DocInfo implements Comparable, Scoped return mIsSynthetic; } + @Override public ContainerInfo parent() { return mContainingClass; @@ -130,7 +131,7 @@ public abstract class MemberInfo extends DocInfo implements Comparable, Scoped { return mKind; } - + public AnnotationInstanceInfo[] annotations() { return mAnnotations; diff --git a/tools/droiddoc/src/MethodInfo.java b/tools/droiddoc/src/MethodInfo.java index bded88baa4..3211038e16 100644 --- a/tools/droiddoc/src/MethodInfo.java +++ b/tools/droiddoc/src/MethodInfo.java @@ -25,9 +25,9 @@ public class MethodInfo extends MemberInfo return a.name().compareTo(b.name()); } }; - + private class InlineTags implements InheritedTags - { + { public TagInfo[] tags() { return comment().tags(); @@ -42,7 +42,7 @@ public class MethodInfo extends MemberInfo } } } - + private static void addInterfaces(ClassInfo[] ifaces, ArrayList queue) { for (ClassInfo i: ifaces) { @@ -79,7 +79,7 @@ public class MethodInfo extends MemberInfo } return null; } - + private static void addRealInterfaces(ClassInfo[] ifaces, ArrayList queue) { for (ClassInfo i: ifaces) { @@ -92,7 +92,7 @@ public class MethodInfo extends MemberInfo addInterfaces(i.realInterfaces(), queue); } } - + public MethodInfo findRealOverriddenMethod(String name, String signature, HashSet notStrippable) { if (mReturnType == null) { // ctor @@ -103,7 +103,7 @@ public class MethodInfo extends MemberInfo } ArrayList queue = new ArrayList(); - if (containingClass().realSuperclass() != null && + if (containingClass().realSuperclass() != null && containingClass().realSuperclass().isAbstract()) { queue.add(containingClass()); } @@ -121,7 +121,7 @@ public class MethodInfo extends MemberInfo } return null; } - + public MethodInfo findSuperclassImplementation(HashSet notStrippable) { if (mReturnType == null) { // ctor @@ -138,7 +138,7 @@ public class MethodInfo extends MemberInfo } ArrayList queue = new ArrayList(); - if (containingClass().realSuperclass() != null && + if (containingClass().realSuperclass() != null && containingClass().realSuperclass().isAbstract()) { queue.add(containingClass()); } @@ -154,7 +154,7 @@ public class MethodInfo extends MemberInfo } return null; } - + public ClassInfo findRealOverriddenClass(String name, String signature) { if (mReturnType == null) { // ctor @@ -165,7 +165,7 @@ public class MethodInfo extends MemberInfo } ArrayList queue = new ArrayList(); - if (containingClass().realSuperclass() != null && + if (containingClass().realSuperclass() != null && containingClass().realSuperclass().isAbstract()) { queue.add(containingClass()); } @@ -199,7 +199,7 @@ public class MethodInfo extends MemberInfo } } } - + private class ReturnTags implements InheritedTags { public TagInfo[] tags() { return comment().returnTags(); @@ -213,7 +213,7 @@ public class MethodInfo extends MemberInfo } } } - + public boolean isDeprecated() { boolean deprecated = false; if (!mDeprecatedKnown) { @@ -237,7 +237,7 @@ public class MethodInfo extends MemberInfo } return mIsDeprecated; } - + public TypeInfo[] getTypeParameters(){ return mTypeParameters; } @@ -274,7 +274,7 @@ public class MethodInfo extends MemberInfo // The underlying MethodDoc for an interface's declared methods winds up being marked // non-abstract. Correct that here by looking at the immediate-parent class, and marking - // this method abstract if it is an unimplemented interface method. + // this method abstract if it is an unimplemented interface method. if (containingClass.isInterface()) { isAbstract = true; } @@ -448,7 +448,7 @@ public class MethodInfo extends MemberInfo + tag.parameterName() + "'"); } } - + // get our parent's tags to fill in the blanks MethodInfo overridden = this.findOverriddenMethod(name(), signature()); if (overridden != null) { @@ -508,7 +508,7 @@ public class MethodInfo extends MemberInfo { return mParameters; } - + public boolean matchesParams(String[] params, String[] dimensions) { @@ -589,6 +589,7 @@ public class MethodInfo extends MemberInfo return result; } + @Override public boolean isExecutable() { return true; @@ -617,21 +618,23 @@ public class MethodInfo extends MemberInfo { return mDefaultAnnotationElementValue; } - + public void setVarargs(boolean set){ mIsVarargs = set; } public boolean isVarArgs(){ return mIsVarargs; } + + @Override public String toString(){ return this.name(); } - + public void setReason(String reason) { mReasonOpened = reason; } - + public String getReason() { return mReasonOpened; } diff --git a/tools/droiddoc/src/PackageInfo.java b/tools/droiddoc/src/PackageInfo.java index 18c636eb3b..17ad1b7242 100644 --- a/tools/droiddoc/src/PackageInfo.java +++ b/tools/droiddoc/src/PackageInfo.java @@ -57,11 +57,13 @@ public class PackageInfo extends DocInfo implements ContainerInfo return s; } + @Override public ContainerInfo parent() { return null; } + @Override public boolean isHidden() { return comment().isHidden(); diff --git a/tools/droiddoc/src/ParamTagInfo.java b/tools/droiddoc/src/ParamTagInfo.java index c21ecd5a41..d6f2b6b908 100644 --- a/tools/droiddoc/src/ParamTagInfo.java +++ b/tools/droiddoc/src/ParamTagInfo.java @@ -76,6 +76,7 @@ public class ParamTagInfo extends ParsedTagInfo return mParameterName; } + @Override public void makeHDF(HDF data, String base) { data.setValue(base + ".name", parameterName()); diff --git a/tools/droiddoc/src/SampleTagInfo.java b/tools/droiddoc/src/SampleTagInfo.java index c80083bdc3..c7ad1cc80d 100644 --- a/tools/droiddoc/src/SampleTagInfo.java +++ b/tools/droiddoc/src/SampleTagInfo.java @@ -36,7 +36,7 @@ import java.util.regex.Matcher; * Both tags accept either a filename and an id or just a filename. If no id * is provided, the entire file is copied. If an id is provided, the lines * in the given file between the first two lines containing BEGIN_INCLUDE(id) - * and END_INCLUDE(id), for the given id, are copied. The id may be only + * and END_INCLUDE(id), for the given id, are copied. The id may be only * letters, numbers and underscore (_). * * Four examples: @@ -274,6 +274,7 @@ public class SampleTagInfo extends TagInfo return result.substring(0); } + @Override public void makeHDF(HDF data, String base) { data.setValue(base + ".name", name()); diff --git a/tools/droiddoc/src/SeeTagInfo.java b/tools/droiddoc/src/SeeTagInfo.java index 94863b5042..8420ed3bfc 100644 --- a/tools/droiddoc/src/SeeTagInfo.java +++ b/tools/droiddoc/src/SeeTagInfo.java @@ -45,6 +45,7 @@ public class SeeTagInfo extends TagInfo return linkReference().label; } + @Override public void makeHDF(HDF data, String base) { LinkReference linkRef = linkReference(); diff --git a/tools/droiddoc/src/SourcePositionInfo.java b/tools/droiddoc/src/SourcePositionInfo.java index 62448032f1..ac605ec8ae 100644 --- a/tools/droiddoc/src/SourcePositionInfo.java +++ b/tools/droiddoc/src/SourcePositionInfo.java @@ -76,6 +76,7 @@ public class SourcePositionInfo implements Comparable return new SourcePositionInfo(that.file, line, 0); } + @Override public String toString() { return file + ':' + line; diff --git a/tools/droiddoc/src/TypeInfo.java b/tools/droiddoc/src/TypeInfo.java index 5196c1355e..45e9db98f8 100644 --- a/tools/droiddoc/src/TypeInfo.java +++ b/tools/droiddoc/src/TypeInfo.java @@ -249,6 +249,7 @@ public class TypeInfo } } + @Override public String toString(){ String returnString = ""; returnString += "Primitive?: " + mIsPrimitive + " TypeVariable?: " +