Package cn.wensiqun.info

Examples of cn.wensiqun.info.HierarchyInfo


    if(exceptFind == null){
      exceptFind = new Class<?>[0];
    }
    except = new HashMap<Class<?>, HierarchyInfo>();
    for(Class<?> e : exceptFind){
      except.put(e, new HierarchyInfo(e));
    }
    all = new HashMap<Class<?>, HierarchyInfo>(except);
  }
View Full Code Here


  }
 
  public void analyzeAndAdd(Class<?> clazz){
    for(Class<?> e : except.keySet()){
      if(!all.containsKey(clazz) && e.isAssignableFrom(clazz)){
        all.put(clazz, new HierarchyInfo(clazz));
      }
    }
  }
View Full Code Here

    private void architecture(){
      List<HierarchyInfo> allHierchyInfoList =
          new ArrayList<HierarchyInfo>(all.values());
     
    for(int i=0; i<allHierchyInfoList.size(); i++){
      HierarchyInfo c1 = allHierchyInfoList.get(i);
      for(int j=i+1; j<allHierchyInfoList.size(); j++){
        HierarchyInfo c2 = allHierchyInfoList.get(j);
        if(isDirectChildOfClass(c2.getType(), c1.getType())){
          c1.getChildren().add(c2);
        }else if(isDirectChildOfClass(c1.getType(), c2.getType())){
          c2.getChildren().add(c1);
        }
      }
    }
  }
View Full Code Here

    if(exceptFind == null){
      exceptFind = new Class<?>[0];
    }
    except = new HashMap<Class<?>, HierarchyInfo>();
    for(Class<?> e : exceptFind){
      except.put(e, new HierarchyInfo(e));
    }
    all = new HashMap<Class<?>, HierarchyInfo>(except);
  }
View Full Code Here

  }
 
  public void analyzeAndAdd(Class<?> clazz){
    for(Class<?> e : except.keySet()){
      if(!all.containsKey(clazz) && e.isAssignableFrom(clazz)){
        all.put(clazz, new HierarchyInfo(clazz));
      }
    }
  }
View Full Code Here

    private void architecture(){
      List<HierarchyInfo> allHierchyInfoList =
          new ArrayList<HierarchyInfo>(all.values());
     
    for(int i=0; i<allHierchyInfoList.size(); i++){
      HierarchyInfo c1 = allHierchyInfoList.get(i);
      for(int j=i+1; j<allHierchyInfoList.size(); j++){
        HierarchyInfo c2 = allHierchyInfoList.get(j);
        if(isDirectChildOfClass(c2.getType(), c1.getType())){
          c1.getChildren().add(c2);
        }else if(isDirectChildOfClass(c1.getType(), c2.getType())){
          c2.getChildren().add(c1);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of cn.wensiqun.info.HierarchyInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.