summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/google/doclava/AnnotationInstanceInfo.java16
-rw-r--r--src/com/google/doclava/MemberInfo.java15
2 files changed, 28 insertions, 3 deletions
diff --git a/src/com/google/doclava/AnnotationInstanceInfo.java b/src/com/google/doclava/AnnotationInstanceInfo.java
index c72ca9a..d353426 100644
--- a/src/com/google/doclava/AnnotationInstanceInfo.java
+++ b/src/com/google/doclava/AnnotationInstanceInfo.java
@@ -120,13 +120,27 @@ public class AnnotationInstanceInfo implements Resolvable {
return allResolved;
}
+ /**
+ * Convert the specified list of {@code AnnotationInstanceInfo} into an HDF-formatted list, and
+ * add the HDF list into the specified {@code Data}.
+ */
public static void makeLinkListHDF(Data data, String base, AnnotationInstanceInfo[] annotations) {
if (annotations == null) return;
final int N = annotations.length;
for (int i = 0; i < N; i++) {
AnnotationInstanceInfo aii = annotations[i];
- aii.type().makeShortDescrHDF(data, base + "." + i);
+ final String aiiBase = base + "." + i;
+
+ // Serialize data about the annotation element values
+ for (int elemIdx = 0; elemIdx < aii.elementValues().size(); ++elemIdx) {
+ final String elemBase = aiiBase + ".elementValues." + elemIdx;
+ final AnnotationValueInfo value = aii.elementValues().get(elemIdx);
+ data.setValue(elemBase + ".name", value.element().name());
+ data.setValue(elemBase + ".value", value.valueString());
+ }
+
+ aii.type().makeShortDescrHDF(data, aiiBase);
}
}
diff --git a/src/com/google/doclava/MemberInfo.java b/src/com/google/doclava/MemberInfo.java
index 76087eb..da11360 100644
--- a/src/com/google/doclava/MemberInfo.java
+++ b/src/com/google/doclava/MemberInfo.java
@@ -143,9 +143,20 @@ public abstract class MemberInfo extends DocInfo implements Comparable, Scoped {
return mContainingClass;
}
+ /**
+ * Returns {@code true} if the member's scope is above the minimum requested scope passed to
+ * Doclava, <emph>or</emph> if the member is tagged with an annotation which was specified in a
+ * "-showAnnotation" argument to Doclava
+ */
public boolean checkLevel() {
- return Doclava.checkLevel(mIsPublic, mIsProtected, mIsPackagePrivate, mIsPrivate,
- isHiddenOrRemoved());
+ if (Doclava.checkLevel(mIsPublic, mIsProtected, mIsPackagePrivate, mIsPrivate,
+ isHiddenOrRemoved())) {
+ return true;
+ } else if (mShowAnnotations != null && !mShowAnnotations.isEmpty()) {
+ return true;
+ }
+
+ return false;
}
public String kind() {