From: Svjatoslav Agejenko Date: Thu, 4 Jul 2013 07:16:03 +0000 (+0300) Subject: possibility to selectively hide classes by API X-Git-Tag: javainspect-1.1~14^2~2 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=e02a80d8ed21a1170b20ef099803b7f9bbff72ab;p=javainspect.git possibility to selectively hide classes by API --- diff --git a/src/main/java/eu/svjatoslav/inspector/java/structure/ClassDescriptor.java b/src/main/java/eu/svjatoslav/inspector/java/structure/ClassDescriptor.java index c8a2773..7e7c4ee 100644 --- a/src/main/java/eu/svjatoslav/inspector/java/structure/ClassDescriptor.java +++ b/src/main/java/eu/svjatoslav/inspector/java/structure/ClassDescriptor.java @@ -44,6 +44,8 @@ public class ClassDescriptor implements GraphElement { boolean isArray; + private boolean isShown = true; + private final ClassGraph dump; List interfaces = new ArrayList(); @@ -55,7 +57,8 @@ public class ClassDescriptor implements GraphElement { */ private int referenceCount = 0; - public ClassDescriptor(final Class clazz, final ClassGraph dump) { + public ClassDescriptor(final Class clazz, + final ClassGraph dump) { this.dump = dump; fullyQualifiedName = clazz.getName(); @@ -325,6 +328,10 @@ public class ClassDescriptor implements GraphElement { return superClassColor; } + public void hide() { + isShown = false; + } + public void indexFields(final Field[] fields) { for (final Field field : fields) { if (nameToFieldMap.containsKey(field.getName())) @@ -353,7 +360,7 @@ public class ClassDescriptor implements GraphElement { if (Utils.isSystemPackage(fullyQualifiedName)) return false; - return true; + return isShown; } public void registerReference() {