org.jboss.aop.advice.annotation
Class AdviceMethodFactory

java.lang.Object
  extended by org.jboss.aop.advice.annotation.AdviceMethodFactory

public class AdviceMethodFactory
extends Object

Utility class to select an advice method for a given joinpoint.

Version:
$Revision: 70826 $
Author:
Kabir Khan, Flavia Rainone

Field Summary
static AdviceMethodFactory AFTER
          Factory that selects advice methods for after interception.
static AdviceMethodFactory AROUND
          Factory that selects advice methods for aroung interception.
static AdviceMethodFactory BEFORE
          Factory that selects advice methods for before interception.
static AdviceMethodFactory FINALLY
          Factory that selects advice methods for finally interception.
static AdviceMethodFactory THROWING
          Factory that selects advice methods for throwing interception.
 
Method Summary
 AdviceMethodProperties findAdviceMethod(AdviceMethodProperties properties)
          Finds the more appropriate advice method.
 void setAdviceType(AdviceType adviceType)
          Sets the type of advice this factory represents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEFORE

public static final AdviceMethodFactory BEFORE
Factory that selects advice methods for before interception.


AFTER

public static final AdviceMethodFactory AFTER
Factory that selects advice methods for after interception.


THROWING

public static final AdviceMethodFactory THROWING
Factory that selects advice methods for throwing interception.


FINALLY

public static final AdviceMethodFactory FINALLY
Factory that selects advice methods for finally interception.


AROUND

public static final AdviceMethodFactory AROUND
Factory that selects advice methods for aroung interception.

Method Detail

setAdviceType

public void setAdviceType(AdviceType adviceType)
Sets the type of advice this factory represents.

Parameters:
adviceType - the type of the advice this factory is associated to

findAdviceMethod

public final AdviceMethodProperties findAdviceMethod(AdviceMethodProperties properties)
                                              throws NoMatchingAdviceException
Finds the more appropriate advice method.

Parameters:
properties - contains information regarding the queried advice method
Returns:
a properties fullfilled with the found method information.
Throws:
NoMatchingAdviceException - if no suitable method was found.


Copyright © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.