Package ch.sahits.util

Examples of ch.sahits.util.ClassChecker.implementsInterface()


  @Override
  public List<IBuilding> findBuildings(ICity city,Class<? extends IBuilding> buildingClass) {
    List<IBuilding> result = new ArrayList<IBuilding>();
    for (IBuilding buidlding : city.getBuildings()) {
      ClassChecker checker = new ClassChecker(buidlding.getClass());
      if (checker.extendsClass(buildingClass) || checker.implementsInterface(buildingClass)){
        result.add(buidlding);
      }
    }
    return result;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.