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.aop.JoinPoint; 18 import org.as2lib.aop.Advice; 19 20 /** 21 * {@code BeforeAdvice} is invoked before the execution of a specific join point, this 22 * advice has been woven into. 23 * 24 * @author Simon Wacker 25 * @see <a href="http://www.simonwacker.com/blog/archives/000066.php">Advice</a> 26 */ 27 interface org.as2lib.aop.advice.BeforeAdvice extends Advice { 28 29 /** 30 * Executes the actions to perform before the {@code joinPoint} is proceeded. 31 * 32 * <p>It is not possible to alter the context of the procession of the join point. 33 * The passed-in {@code args} are just a copy of the arguments passed-to the join 34 * point. 35 * 36 * <p>If you use the proxy returned by the {@code AbstractBeforeAdvice#getProxy} 37 * method to overwrite the actual join point, this method is invoked before the 38 * given {@code joinPoint} is proceeded with the values of the given {@code args}. 39 * 40 * @param joinPoint the join point the advice was woven into 41 * @param args the arguments passed to the join point 42 */ 43 public function execute(joinPoint:JoinPoint, args:Array):Void; 44 45 }