From ad485fec491ab52453fedce0f7d5f5743f567009 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Tue, 3 Mar 2015 20:57:54 +0200 Subject: [PATCH] further restricted code visibility --- .../java/structure/FieldDescriptor.java | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) 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; } -- 2.20.1