system/src/sc/layer/LayeredSystem.java
public Layer lookupInactiveLayer(String layerName, boolean checkPeers, boolean skipExcluded) {
      Layer res = inactiveLayerIndex.get(layerName);
      if (res != null && (!skipExcluded || !res.excluded)) {
         if (!res.initCompleted)
            System.err.println("*** Layer: " + res + " did not fully initialize!");
         if (res.layeredSystem == null)
            System.err.println("*** Layer: " + res + " has no layeredSystem in lookupInactiveLayer!");
         return res;
      }
      if (checkPeers && peerSystems != null) {
         for (int i = 0; i < peerSystems.size(); i++) {
            LayeredSystem peer = peerSystems.get(i);
            Layer peerRes = peer.lookupInactiveLayer(layerName, false, skipExcluded);
            if (peerRes != null) {
               if (!peerRes.initCompleted)
                  System.err.println("*** Layer: " + peerRes + " did not fully initialize!");
               if (peerRes.layeredSystem == null)
                  System.err.println("*** Layer - peer: " + peerRes + " has no layeredSystem in lookupInactiveLayer!");
               return peerRes;
            }
         }
      }
      return null;
   }
/** Provide skipExcluded = false unless you want to return null if the layer is excluded */
Provide skipExcluded = false unless you want to return null if the layer is excluded
Provide skipExcluded = false unless you want to return null if the layer is excluded
public Layer lookupInactiveLayer(String layerName, boolean checkPeers, boolean skipExcluded) {
      Layer res = inactiveLayerIndex.get(layerName);
      if (res != null && (!skipExcluded || !res.excluded)) {
         if (!res.initCompleted)
            System.err.println("*** Layer: " + res + " did not fully initialize!");
         if (res.layeredSystem == null)
            System.err.println("*** Layer: " + res + " has no layeredSystem in lookupInactiveLayer!");
         return res;
      }
      if (checkPeers && peerSystems != null) {
         for (int i = 0; i < peerSystems.size(); i++) {
            LayeredSystem peer = peerSystems.get(i);
            Layer peerRes = peer.lookupInactiveLayer(layerName, false, skipExcluded);
            if (peerRes != null) {
               if (!peerRes.initCompleted)
                  System.err.println("*** Layer: " + peerRes + " did not fully initialize!");
               if (peerRes.layeredSystem == null)
                  System.err.println("*** Layer - peer: " + peerRes + " has no layeredSystem in lookupInactiveLayer!");
               return peerRes;
            }
         }
      }
      return null;
   }
public Layer lookupInactiveLayer ( String layerName , boolean checkPeers , boolean skipExcluded ) { Layer res = inactiveLayerIndex . get ( layerName ) ; if ( res != null && ( ! skipExcluded || ! res . excluded ) ) { if ( ! res . initCompleted ) System . err . println ( "*** Layer: " + res + " did not fully initialize!" ) ; if ( res . layeredSystem == null ) System . err . println ( "*** Layer: " + res + " has no layeredSystem in lookupInactiveLayer!" ) ; return res ; } if ( checkPeers && peerSystems != null ) { for ( int i = 0 ; i < peerSystems . size ( ) ; i ++ ) { LayeredSystem peer = peerSystems . get ( i ) ; Layer peerRes = peer . lookupInactiveLayer ( layerName , false , skipExcluded ) ; if ( peerRes != null ) { if ( ! peerRes . initCompleted ) System . err . println ( "*** Layer: " + peerRes + " did not fully initialize!" ) ; if ( peerRes . layeredSystem == null ) System . err . println ( "*** Layer - peer: " + peerRes + " has no layeredSystem in lookupInactiveLayer!" ) ; return peerRes ; } } } return null ; }
Provide skipExcluded = false unless you want to return null if the layer is excluded
Provide skipExcluded = false unless you want to return null if the layer is excluded