further restricted code visibility
[javainspect.git] / src / main / java / eu / svjatoslav / inspector / java / structure / FieldDescriptor.java
index 19bb585..7128c4e 100755 (executable)
@@ -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<ClassDescriptor> typeArguments = new ArrayList<ClassDescriptor>();
-
-       public boolean isInherited;
+       private final List<ClassDescriptor> typeArguments = new ArrayList<ClassDescriptor>();
+       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;
        }