Coverage Report - org.acegisecurity.vote.LabelParameterStrategy
 
Classes in this File Line Coverage Branch Coverage Complexity
LabelParameterStrategy
N/A 
N/A 
1
 
 1  
 /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
 2  
  *
 3  
  * Licensed under the Apache License, Version 2.0 (the "License");
 4  
  * you may not use this file except in compliance with the License.
 5  
  * You may obtain a copy of the License at
 6  
  *
 7  
  *     http://www.apache.org/licenses/LICENSE-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing, software
 10  
  * distributed under the License is distributed on an "AS IS" BASIS,
 11  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12  
  * See the License for the specific language governing permissions and
 13  
  * limitations under the License.
 14  
  */
 15  
 package org.acegisecurity.vote;
 16  
 
 17  
 import java.lang.reflect.Method;
 18  
 
 19  
 
 20  
 /**
 21  
  * This is a strategy interface for determining which parts of a method invocation
 22  
  * are labeled. Not all arguments are necessarily labeled. This offers a plugabble
 23  
  * mechanism to define various ways to label data.
 24  
  *
 25  
  * @author Greg Turnquist
 26  
  * @version $Id: LabelParameterStrategy.java 1784 2007-02-24 21:00:24Z luke_t $
 27  
  */
 28  
 public interface LabelParameterStrategy {
 29  
     //~ Methods ========================================================================================================
 30  
 
 31  
     /**
 32  
      * Get the actual label associated with the argument. NOTE: This currently only supports one label per
 33  
      * argument.
 34  
      *
 35  
      * @param method
 36  
      * @param arg
 37  
      *
 38  
      * @return string value of the label
 39  
      */
 40  
     String getLabel(Method method, Object arg);
 41  
 
 42  
     /**
 43  
      * Evaluate if one particular argument is labeled. The context of the method is also provided should that
 44  
      * have bearing on the label.
 45  
      *
 46  
      * @param method
 47  
      * @param arg
 48  
      *
 49  
      * @return boolean
 50  
      */
 51  
     boolean isLabeled(Method method, Object arg);
 52  
 }