示例#1
0
  @Override
  public void collectMembers(List<Member> mbrs, List<StructPart> alreadySeen) {
    if (alreadySeen.contains(this)) {
      return;
    }

    alreadySeen.add(this);
    mbrs.addAll(getMembers());
    if (!getSuperTypes().isEmpty()) {
      for (StructPart superType : getSuperTypes()) {
        superType.collectMembers(mbrs, alreadySeen);
      }
    }
  }
示例#2
0
 @Override
 public boolean isSubtypeOf(StructPart part) {
   if (!getSuperTypes().isEmpty()) {
     for (StructPart superType : getSuperTypes()) {
       if (superType.equals(part)) {
         return true;
       }
     }
     for (StructPart superType : getSuperTypes()) {
       if (superType.isSubtypeOf(part)) return true;
     }
     return false;
   } else {
     return false;
   }
 }