Coverage Report - org.seasar.cubby.plugins.s2.customizer.PointcutFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
PointcutFactory
0%
0/6
0%
0/2
2
 
 1  
 /*
 2  
  * Copyright 2004-2010 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  
 
 17  
 package org.seasar.cubby.plugins.s2.customizer;
 18  
 
 19  
 import org.seasar.cubby.plugins.s2.aop.ActionMethodPointcutImpl;
 20  
 import org.seasar.framework.aop.Pointcut;
 21  
 import org.seasar.framework.util.StringUtil;
 22  
 
 23  
 /**
 24  
  * {@link org.seasar.framework.aop.Pointcut ポイントカット}を構築するためのファクトリクラスです。
 25  
  * 
 26  
  * @author baba
 27  
  */
 28  0
 class PointcutFactory {
 29  
 
 30  
         /**
 31  
          * 指定されたポイントカットを表す文字列から、 {@link org.seasar.framework.aop.Pointcut ポイントカット}
 32  
          * を構築して返します。
 33  
          * 
 34  
          * @param pointcutStr
 35  
          *            ポイントカットを表す文字列
 36  
          * @return ポイントカット
 37  
          */
 38  
         public static Pointcut createPointcut(final String pointcutStr) {
 39  0
                 if (!StringUtil.isEmpty(pointcutStr)) {
 40  0
                         final String[] methodNames = StringUtil.split(pointcutStr, ", \n");
 41  0
                         return new ActionMethodPointcutImpl(methodNames);
 42  
                 }
 43  0
                 return null;
 44  
         }
 45  
 
 46  
         /**
 47  
          * 指定された{@link Class クラス}から、 {@link org.seasar.framework.aop.Pointcut
 48  
          * ポイントカット}を構築して返します。
 49  
          * 
 50  
          * @param clazz
 51  
          *            クラス
 52  
          * @return ポイントカット
 53  
          */
 54  
         public static Pointcut createPointcut(final Class<?> clazz) {
 55  0
                 return new ActionMethodPointcutImpl(clazz);
 56  
         }
 57  
 
 58  
 }