public FieldArray getInheritedFields() { FieldArray result = new FieldArrayImpl(); FieldDeclaration curField; for (TypeDeclarationIterator typeIter = getAncestors().getIterator(); typeIter.hasNext(); ) { for (FieldIterator fieldIter = typeIter.getNext().getFields().getIterator(); fieldIter.hasNext(); ) { curField = fieldIter.getNext(); if (isVisible(curField) && !isRedefined(curField)) { result.add(curField); } } } return result; }
public boolean isEmpty() { if (_localVars != null) { return _localVars.isEmpty(); } else if (_fields != null) { return _fields.isEmpty(); } else { return true; } }
public int getCount() { if (_localVars != null) { return _localVars.getCount(); } else if (_fields != null) { return _fields.getCount(); } else { return 0; } }
public VariableDeclaration get(int idx) { if (_localVars != null) { return _localVars.get(idx); } else if (_fields != null) { return _fields.get(idx); } else { return null; } }
public void add(FieldDeclaration decl) { if (_fields == null) { _fields = new FieldArrayImpl(); } _fields.add(decl); }