summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/google/doclava/Doclava.java6
-rw-r--r--src/com/google/doclava/MemberInfo.java8
2 files changed, 11 insertions, 3 deletions
diff --git a/src/com/google/doclava/Doclava.java b/src/com/google/doclava/Doclava.java
index e2f7d88..23ede5f 100644
--- a/src/com/google/doclava/Doclava.java
+++ b/src/com/google/doclava/Doclava.java
@@ -90,6 +90,7 @@ public class Doclava {
public static HashSet<String> knownTags = new HashSet<String>();
public static FederationTagger federationTagger = new FederationTagger();
public static Set<String> showAnnotations = new HashSet<String>();
+ public static boolean showAnnotationOverridesVisibility = false;
public static Set<String> hiddenPackages = new HashSet<String>();
public static boolean includeDefaultAssets = true;
private static boolean generateDocs = true;
@@ -213,6 +214,8 @@ public class Doclava {
keepListFile = a[1];
} else if (a[0].equals("-showAnnotation")) {
showAnnotations.add(a[1]);
+ } else if (a[0].equals("-showAnnotationOverridesVisibility")) {
+ showAnnotationOverridesVisibility = true;
} else if (a[0].equals("-hidePackage")) {
hiddenPackages.add(a[1]);
} else if (a[0].equals("-proguard")) {
@@ -589,6 +592,9 @@ public class Doclava {
if (option.equals("-showAnnotation")) {
return 2;
}
+ if (option.equals("-showAnnotationOverridesVisibility")) {
+ return 1;
+ }
if (option.equals("-hidePackage")) {
return 2;
}
diff --git a/src/com/google/doclava/MemberInfo.java b/src/com/google/doclava/MemberInfo.java
index da11360..2d4a682 100644
--- a/src/com/google/doclava/MemberInfo.java
+++ b/src/com/google/doclava/MemberInfo.java
@@ -145,14 +145,16 @@ public abstract class MemberInfo extends DocInfo implements Comparable, Scoped {
/**
* 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
+ * Doclava. Provided that the {@code -showAnnotationOverridesVisibility} argument was passed to
+ * Doclava, this will <emph>also</emph> return {@code true} if the member is tagged with an
+ * annotation which was specified in a {@code -showAnnotation} argument to Doclava
*/
public boolean checkLevel() {
if (Doclava.checkLevel(mIsPublic, mIsProtected, mIsPackagePrivate, mIsPrivate,
isHiddenOrRemoved())) {
return true;
- } else if (mShowAnnotations != null && !mShowAnnotations.isEmpty()) {
+ } else if (Doclava.showAnnotationOverridesVisibility &&
+ mShowAnnotations != null && !mShowAnnotations.isEmpty()) {
return true;
}