Coverage Report - org.seasar.cubby.customizer.PointcutFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
PointcutFactory
0%
0/6
0%
0/2
0
 
 1  
 /*
 2  
  * Copyright 2004-2008 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.cubby.customizer;
 17  
 
 18  
 import org.seasar.cubby.aop.ActionMethodPointcutImpl;
 19  
 import org.seasar.framework.aop.Pointcut;
 20  
 import org.seasar.framework.util.StringUtil;
 21  
 
 22  
 /**
 23  
  * {@link org.seasar.framework.aop.Pointcut ポイントカット}を構築するためのファクトリクラスです。
 24  
  * 
 25  
  * @author baba
 26  
  */
 27  0
 class PointcutFactory {
 28  
 
 29  
     /**
 30  
      * 指定されたポイントカットを表す文字列から、 {@link org.seasar.framework.aop.Pointcut ポイントカット}を構築して返します。
 31  
      * 
 32  
      * @param pointcutStr
 33  
      *            ポイントカットを表す文字列
 34  
      * @return ポイントカット
 35  
      */
 36  
     public static Pointcut createPointcut(final String pointcutStr) {
 37  0
         if (!StringUtil.isEmpty(pointcutStr)) {
 38  0
             String[] methodNames = StringUtil.split(pointcutStr, ", \n");
 39  0
             return new ActionMethodPointcutImpl(methodNames);
 40  
         }
 41  0
         return null;
 42  
     }
 43  
 
 44  
     /**
 45  
      * 指定された{@link Class クラス}から、
 46  
      * {@link org.seasar.framework.aop.Pointcut ポイントカット}を構築して返します。
 47  
      * 
 48  
      * @param clazz
 49  
      *            クラス
 50  
      * @return ポイントカット
 51  
      */
 52  
     public static Pointcut createPointcut(final Class<?> clazz) {
 53  0
         return new ActionMethodPointcutImpl(clazz);
 54  
     }
 55  
 
 56  
 }