public Attribute getAttributeInHierarchy(String name) { Entity entity = this; while (entity != null) { Attribute attribute = entity.getAttribute(name); if (attribute != null) { return attribute; } entity = entity.mExtendEntity; } return null; }
public void addCharacteristic(Characteristic<?> characteristic) { if (mCharacteristics == null) { mCharacteristics = new ArrayList<Characteristic<?>>(1); } if (containsCharacteristic(characteristic) || (mExtendEntity != null && mExtendEntity.containsCharacteristic(characteristic))) { System.out.println( ">> WARNING: Duplicate " + characteristic.getClass().getSimpleName() + ": " + characteristic); return; } mCharacteristics.add(characteristic); }