Chinaunix首页 | 论坛 | 博客
  • 博客访问: 649019
  • 博文数量: 632
  • 博客积分: 39960
  • 博客等级: 大将
  • 技术积分: 4975
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-16 18:20
文章分类

全部博文(632)

文章存档

2011年(1)

2008年(631)

我的朋友

分类:

2008-10-16 18:22:38

    private ConfigAttributeDefinition lookupUrlInMap(Map requestMap, String url) {
       
ConfigAttributeDefinition cad = (ConfigAttributeDefinition)requestMap.get(url);
        if(cad != null) {
            return cad;
        }
          
        Iterator entries = requestMap.entrySet().iterator();

        
while (entries.hasNext()) {
            Map.Entry entry 
= (Map.Entry) entries.next();
            Object p 
= entry.getKey();
            
boolean matched = urlMatcher.pathMatchesUrl(p, url);

            
if (logger.isDebugEnabled()) {
                logger.debug(
"Candidate is: '" + url + "'; pattern is " + p + "; matched=" + matched);
            }

            
if (matched) {
                
return (ConfigAttributeDefinition) entry.getValue();
            }
        }

        
return null;
    }

--------------------next---------------------

阅读(340) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~