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;
.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());
return parentClass.getGraphId() + ":" + name;
}
- public int getOutsideVisibleReferencesCount() {
+ protected int getOutsideVisibleReferencesCount() {
if (!isVisible())
return 0;
return 0;
}
- public ClassDescriptor getType() {
+ protected ClassDescriptor getType() {
return type;
}