Package ch.sahits.util

Examples of ch.sahits.util.ClassChecker


  @Override
  public final void gameUpdate(Event e, Object notice) {
    if (e instanceof ViewChangeEvent){
      ViewChangeEvent event = (ViewChangeEvent) e;
      ClassChecker cc = new ClassChecker(getClass());
      if (event.getAddresse().equals(getClass()) ||
          cc.implementsInterfaceIndirectly(event.getAddresse())){
        if (notice instanceof EViewChangeEvent){
          EViewChangeEvent change = (EViewChangeEvent) notice;
          switch (change) {
          case DISPLAY_NEW_SP:
            for (Iterator<RenderablePart> iter = iterator(); iter.hasNext();) {
View Full Code Here


  @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

  @Override
  public final void gameUpdate(Event e, Object notice) {
    if (e instanceof ViewChangeEvent){
      ViewChangeEvent event = (ViewChangeEvent) e;
      ClassChecker cc = new ClassChecker(getClass());
      if (event.getAddresse().equals(getClass()) ||
          cc.implementsInterfaceIndirectly(event.getAddresse())){
        if (notice instanceof EViewChangeEvent){
          EViewChangeEvent change = (EViewChangeEvent) notice;
          switch (change) {
          case DISPLAY_NEW_SP:
            for (Iterator<RenderablePart> iter = iterator(); iter.hasNext();) {
View Full Code Here

TOP

Related Classes of ch.sahits.util.ClassChecker

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.