From: Svjatoslav Agejenko Date: Tue, 3 Mar 2015 18:57:54 +0000 (+0200) Subject: further restricted code visibility X-Git-Tag: javainspect-1.5~12 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=ad485fec491ab52453fedce0f7d5f5743f567009;p=javainspect.git further restricted code visibility --- diff --git a/src/main/java/eu/svjatoslav/inspector/java/structure/FieldDescriptor.java b/src/main/java/eu/svjatoslav/inspector/java/structure/FieldDescriptor.java index 19bb585..7128c4e 100755 --- a/src/main/java/eu/svjatoslav/inspector/java/structure/FieldDescriptor.java +++ b/src/main/java/eu/svjatoslav/inspector/java/structure/FieldDescriptor.java @@ -15,18 +15,17 @@ import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; -public class FieldDescriptor implements GraphElement { +/** + * This class corresponds to single field within a java class. + */ - /** - * This class corresponds to single field within a java class. - */ +public class FieldDescriptor implements GraphElement { - public String name; + private String name; private ClassDescriptor type; private final ClassDescriptor parentClass; - List typeArguments = new ArrayList(); - - public boolean isInherited; + private final List typeArguments = new ArrayList(); + private boolean isInherited; public FieldDescriptor(final ClassDescriptor parent) { parentClass = parent; @@ -38,9 +37,6 @@ public class FieldDescriptor implements GraphElement { .equals(parentClass.getFullyQualifiedName())) isInherited = true; - // if (field.getType().isArray()) - // System.out.println("field name: " + field.getName()); - name = field.getName(); type = parentClass.getClassGraph().getOrCreateClassDescriptor( field.getType()); @@ -127,7 +123,7 @@ public class FieldDescriptor implements GraphElement { return parentClass.getGraphId() + ":" + name; } - public int getOutsideVisibleReferencesCount() { + protected int getOutsideVisibleReferencesCount() { if (!isVisible()) return 0; @@ -139,7 +135,7 @@ public class FieldDescriptor implements GraphElement { return 0; } - public ClassDescriptor getType() { + protected ClassDescriptor getType() { return type; }