Пример #1
0
 private SmiSymbol determineBestMatchBasedOnSnmpVersion(List<SmiSymbol> symbols) {
   if (symbols.size() == 2) {
     SmiSymbol s0 = symbols.get(0);
     SmiSymbol s1 = symbols.get(1);
     SmiVersion version0 = s0.getModule().getVersion();
     SmiVersion version1 = s1.getModule().getVersion();
     if (version0 != null && version1 != null && version0 != version1) {
       if (getVersion() == version0) {
         return s0;
       } else if (getVersion() == version1) {
         return s1;
       }
     }
   }
   return null;
 }
Пример #2
0
 private SmiSymbol determineBestMatchBasedOnOtherImports(
     IdToken idToken, List<SmiSymbol> symbols) {
   for (SmiSymbol symbol : symbols) {
     for (SmiImports imports : m_imports) {
       if (imports.getModule() == symbol.getModule()) {
         m_log.debug(
             "Determined best match for "
                 + idToken
                 + " based on other imports from "
                 + symbol.getModule().getId());
         return symbol;
       }
     }
   }
   return null;
 }