org.codehaus.aspectwerkz.joinpoint
Class ThrowsJoinPoint

java.lang.Object
  extended byorg.codehaus.aspectwerkz.joinpoint.AbstractJoinPoint
      extended byorg.codehaus.aspectwerkz.joinpoint.ThrowsJoinPoint
All Implemented Interfaces:
JoinPoint, java.io.Serializable

public class ThrowsJoinPoint
extends AbstractJoinPoint

Matches well defined point of execution in the program where an exception is thrown out of a method.
Stores meta data from the join point. I.e a reference to original object an method, the original exception etc.
Handles the invocation of the advices added to the join point.

Author:
Jonas Bonér
See Also:
Serialized Form

Constructor Summary
ThrowsJoinPoint(java.lang.String uuid, MethodJoinPoint methodJoinPoint, java.lang.Throwable exception)
          Creates a new throws join point.
 
Method Summary
 java.lang.Throwable getException()
          Returns the exception.
 java.lang.Class getExceptionClass()
          Returns the exception class.
 java.lang.String getExceptionName()
          Returns the exception class name.
 java.lang.String getLocalizedMessage()
          Returns the localized message.
 java.lang.String getMessage()
          Returns the message.
 java.lang.reflect.Method getMethod()
          Returns the target method.
 java.lang.String getMethodName()
          Returns the method name of the original invocation.
 java.lang.Object[] getMethodParameters()
          Returns the parameters from the original invocation.
 java.lang.Class[] getMethodParameterTypes()
          Returns the parameter types from the original invocation.
 java.lang.Class getMethodReturnType()
          Returns the return type from the original invocation.
 java.lang.Class getTargetClass()
          Returns the target class.
 java.lang.Object getTargetInstance()
          Returns the target instance.
 java.lang.Object proceed()
          Invokes the next advice in the chain until it reaches the end.
 java.lang.Object proceedInNewThread()
          To be called instead of proceed() when a new thread is spawned.
 
Methods inherited from class org.codehaus.aspectwerkz.joinpoint.AbstractJoinPoint
getAttribute
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrowsJoinPoint

public ThrowsJoinPoint(java.lang.String uuid,
                       MethodJoinPoint methodJoinPoint,
                       java.lang.Throwable exception)
Creates a new throws join point.

Parameters:
uuid - the UUID for the AspectWerkz system to use
methodJoinPoint - the method join point
exception - the exception
Method Detail

proceedInNewThread

public java.lang.Object proceedInNewThread()
                                    throws java.lang.Throwable
To be called instead of proceed() when a new thread is spawned. Otherwise the result is unpredicable.

Returns:
the result from the next invocation
Throws:
java.lang.Throwable

proceed

public java.lang.Object proceed()
                         throws java.lang.Throwable
Invokes the next advice in the chain until it reaches the end.

Returns:
the result from a throws pointcut
Throws:
java.lang.Throwable

getException

public java.lang.Throwable getException()
Returns the exception.

Returns:
the exception

getExceptionClass

public java.lang.Class getExceptionClass()
Returns the exception class.

Returns:
the exception class

getExceptionName

public java.lang.String getExceptionName()
Returns the exception class name.

Returns:
the exception class name

getMessage

public java.lang.String getMessage()
Returns the message.

Returns:
the message

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Returns the localized message.

Returns:
the localized message

getTargetInstance

public java.lang.Object getTargetInstance()
Returns the target instance.

Returns:
the target instance

getTargetClass

public java.lang.Class getTargetClass()
Returns the target class.

Returns:
the target class

getMethod

public java.lang.reflect.Method getMethod()
Returns the target method.

Returns:
the target method

getMethodName

public java.lang.String getMethodName()
Returns the method name of the original invocation.

Returns:
the method name

getMethodParameters

public java.lang.Object[] getMethodParameters()
Returns the parameters from the original invocation.

Returns:
the parameters

getMethodParameterTypes

public java.lang.Class[] getMethodParameterTypes()
Returns the parameter types from the original invocation.

Returns:
the parameter types

getMethodReturnType

public java.lang.Class getMethodReturnType()
Returns the return type from the original invocation.

Returns:
the return type


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.