Skip to content
Snippets Groups Projects
Commit e0b10d26 authored by Jesper's avatar Jesper
Browse files

Don't document synthetic stuff

parent 48c6b433
No related branches found
No related tags found
No related merge requests found
extendj @ b3bb5e2e
Subproject commit 1829cf5620db5d9d729f6aa16f109d7ad1b59e7a Subproject commit b3bb5e2e978320d58af250b073ac42fac954b82d
...@@ -75,8 +75,7 @@ aspect Inheritance { ...@@ -75,8 +75,7 @@ aspect Inheritance {
eq InterfaceDecl.inheritedMethodsNameMap() { eq InterfaceDecl.inheritedMethodsNameMap() {
Map<String, Collection<MethodDecl>> result = new HashMap<>(); Map<String, Collection<MethodDecl>> result = new HashMap<>();
for (Iterator<TypeDecl> outerIter = interfacesIterator(); outerIter.hasNext(); ) { for (TypeDecl typeDecl : superInterfaces()) {
TypeDecl typeDecl = outerIter.next();
for (SimpleSet<MethodDecl> supertypeMethods : typeDecl.methodsSignatureMap().values()) { for (SimpleSet<MethodDecl> supertypeMethods : typeDecl.methodsSignatureMap().values()) {
for (MethodDecl method : supertypeMethods) { for (MethodDecl method : supertypeMethods) {
if (!method.isPrivate()) { if (!method.isPrivate()) {
......
...@@ -176,10 +176,16 @@ public class JsonBuilder { ...@@ -176,10 +176,16 @@ public class JsonBuilder {
} }
public static boolean shouldDocument(BodyDecl member, JsonObject doc) { public static boolean shouldDocument(BodyDecl member, JsonObject doc) {
if (member.isSynthetic()) {
return false;
}
return doc == null || !doc.get("apilevel").stringValue("").equals("internal"); return doc == null || !doc.get("apilevel").stringValue("").equals("internal");
} }
public static boolean isHighLevelApi(BodyDecl member, JsonObject doc) { public static boolean isHighLevelApi(BodyDecl member, JsonObject doc) {
if (member.isSynthetic()) {
return false;
}
if (doc == null) { if (doc == null) {
return true; return true;
} }
...@@ -451,9 +457,9 @@ public class JsonBuilder { ...@@ -451,9 +457,9 @@ public class JsonBuilder {
JsonArray fieldArray = new JsonArray(); JsonArray fieldArray = new JsonArray();
for (Iterable<Variable> vars : superclass.localFieldsMap().values()) { for (Iterable<Variable> vars : superclass.localFieldsMap().values()) {
for (Variable var : vars) { for (Variable var : vars) {
if (!declaredFields.contains(var.name()) if (shouldDocument(var.fieldDecl())
&& !var.isPrivate() && !declaredFields.contains(var.name())
&& shouldDocument(var.fieldDecl())) { && !var.isPrivate()) {
declaredFields.add(var.name()); declaredFields.add(var.name());
fieldArray.add(var.name()); fieldArray.add(var.name());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment