1  /*
     2   * Copyright the original author or authors.
     3   * 
     4   * Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (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.mozilla.org/MPL/MPL-1.1.html
     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, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  import org.as2lib.core.BasicInterface;
    18  import org.as2lib.aop.Pointcut;
    19  
    20  /**
    21   * {@code PointcutFactory} creates and returns pointcuts based on pointcut patterns.
    22   * 
    23   * <p>A pointcut pattern consists of the join point's type, for example method
    24   * execution or get or set access join points.
    25   * <code>execution(org.as2lib.env.Logger.debug)</code>
    26   * <code>set(org.as2lib.MyClass.myProperty)</code>
    27   * <code>get(org.as2lib.MyClass.myProperty)</code>
    28   * 
    29   * <p>A pointcut pattern may also be more complex by combining multiple pointcuts with
    30   * a specific logic.
    31   * <code>execution(org.as2lib.env.Logger.debug) || set(org.as2lib.MyClass.myProperty)</code>
    32   * 
    33   * <p>Note that not all pointcuts allow all of the above ways to describe a pointcut
    34   * pattern. This depends on the given implementation.
    35   * 
    36   * @author Simon Wacker
    37   */
    38  interface org.as2lib.aop.pointcut.PointcutFactory extends BasicInterface {
    39  	
    40  	/**
    41  	 * Returns a pointcut based on the passed-in {@code pattern} representation.
    42  	 *
    43  	 * @param pattern the string representation of the pointcut
    44  	 * @return the object-oriented view of the passed-in pointcut {@code pattern}
    45  	 */
    46  	public function getPointcut(pattern:String):Pointcut;
    47  	
    48  }