Add missing @Override to DroidDoc and ApiCheck
Change-Id: Ic7829a4ea62a614ef8b525bd84f8fbaaa4674d06
This commit is contained in:
parent
270de9284a
commit
5ee390d856
19 changed files with 123 additions and 88 deletions
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -80,6 +80,7 @@ public class SourcePositionInfo implements Comparable
|
|||
return new SourcePositionInfo(that.file, line, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
if (this.file == null) {
|
||||
|
|
|
@ -35,6 +35,7 @@ class AnnotationInstanceInfo
|
|||
return mElementValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder str = new StringBuilder();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -206,7 +206,7 @@ public class Comment
|
|||
for (int i=0; i<N; i++) {
|
||||
if (mInlineTagsList.get(i).name().equals("@more")) {
|
||||
more = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (more >= 0) {
|
||||
for (int i=0; i<more; i++) {
|
||||
|
@ -225,7 +225,7 @@ public class Comment
|
|||
}
|
||||
}
|
||||
mBriefTagsList.add(t);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ public class Comment
|
|||
return b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean isDocOnly() {
|
||||
if (mDocOnly >= 0) {
|
||||
return mDocOnly != 0;
|
||||
|
@ -391,5 +391,5 @@ public class Comment
|
|||
ArrayList<TagInfo> mUndeprecateTagsList = new ArrayList<TagInfo>();
|
||||
ArrayList<AttrTagInfo> mAttrTagsList = new ArrayList<AttrTagInfo>();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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<MethodInfo> out = new ArrayList<MethodInfo>();
|
||||
|
@ -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;
|
||||
|
|
|
@ -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<String> broadcastActions = new ArrayList<String>();
|
||||
ArrayList<String> serviceActions = new ArrayList<String>();
|
||||
ArrayList<String> categories = new ArrayList<String>();
|
||||
|
||||
|
||||
ArrayList<ClassInfo> layouts = new ArrayList<ClassInfo>();
|
||||
ArrayList<ClassInfo> widgets = new ArrayList<ClassInfo>();
|
||||
ArrayList<ClassInfo> layoutParams = new ArrayList<ClassInfo>();
|
||||
|
||||
|
||||
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
|
||||
* <ul>
|
||||
|
@ -1348,7 +1348,7 @@ public class DroidDoc
|
|||
* <li>{@link #TYPE_WIDGET}: if the class extends <code>android.view.View</code></li>
|
||||
* <li>{@link #TYPE_LAYOUT_PARAM}: if the class extends <code>android.view.ViewGroup$LayoutParams</code></li>
|
||||
* <li>{@link #TYPE_NONE}: in all other cases</li>
|
||||
* </ul>
|
||||
* </ul>
|
||||
* @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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<ClassInfo> queue)
|
||||
{
|
||||
for (ClassInfo i: ifaces) {
|
||||
|
@ -79,7 +79,7 @@ public class MethodInfo extends MemberInfo
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private static void addRealInterfaces(ClassInfo[] ifaces, ArrayList<ClassInfo> 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<ClassInfo> queue = new ArrayList<ClassInfo>();
|
||||
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<ClassInfo> queue = new ArrayList<ClassInfo>();
|
||||
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<ClassInfo> queue = new ArrayList<ClassInfo>();
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -76,6 +76,7 @@ public class ParamTagInfo extends ParsedTagInfo
|
|||
return mParameterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void makeHDF(HDF data, String base)
|
||||
{
|
||||
data.setValue(base + ".name", parameterName());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -45,6 +45,7 @@ public class SeeTagInfo extends TagInfo
|
|||
return linkReference().label;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void makeHDF(HDF data, String base)
|
||||
{
|
||||
LinkReference linkRef = linkReference();
|
||||
|
|
|
@ -76,6 +76,7 @@ public class SourcePositionInfo implements Comparable
|
|||
return new SourcePositionInfo(that.file, line, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return file + ':' + line;
|
||||
|
|
|
@ -249,6 +249,7 @@ public class TypeInfo
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
String returnString = "";
|
||||
returnString += "Primitive?: " + mIsPrimitive + " TypeVariable?: " +
|
||||
|
|
Loading…
Reference in a new issue