alt.jiapi.event
Class MethodEvent

java.lang.Object
  extended by java.util.EventObject
      extended by alt.jiapi.event.JiapiEvent
          extended by alt.jiapi.event.MethodEvent
All Implemented Interfaces:
java.io.Serializable

public class MethodEvent
extends JiapiEvent

MethodEvent objects are used to identify methods that are entered or exited.

Version:
$Revision: 1.12 $ $Date: 2002/03/20 12:00:32 $
Author:
Mika Riekkinen, Joni Suominen
See Also:
Serialized Form

Field Summary
static int METHOD_ENTERED
          Constant used as an id of the MethodEvent
static int METHOD_EXITED
          Constant used as an id of the MethodEvent
 
Fields inherited from class alt.jiapi.event.JiapiEvent
id, sourceObject, target, targetName
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MethodEvent(MethodEventProducer mep, java.lang.Object sourceObject, java.lang.String methodName, int id)
          Constructor.
MethodEvent(MethodEventProducer mep, java.lang.Object sourceObject, java.lang.String methodName, java.lang.Object target, java.lang.Object[] methodArgs, int id)
          Constructor.
 
Method Summary
 java.lang.String getClassName()
          Get the name of the class producing this event.
 java.lang.Object[] getMethodArgs()
          Get the arguments.
 java.lang.String getMethodName()
          Get the name of the method producing this event.
 boolean isConstructor()
          Is this method a constructor?
 boolean isStaticInitializer()
          Is this method a static initializer.
 
Methods inherited from class alt.jiapi.event.JiapiEvent
finalize, getSourceObject, getTarget, getTargetName, protect, release, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

METHOD_ENTERED

public static final int METHOD_ENTERED
Constant used as an id of the MethodEvent

See Also:
Constant Field Values

METHOD_EXITED

public static final int METHOD_EXITED
Constant used as an id of the MethodEvent

See Also:
Constant Field Values
Constructor Detail

MethodEvent

public MethodEvent(MethodEventProducer mep,
                   java.lang.Object sourceObject,
                   java.lang.String methodName,
                   int id)
Constructor. Target and method args are set to null.

Parameters:
mep - an instance of MethodEventProducer
sourceObject - A Source Object. On static methods, this is the Class, that method belongs to. Otherwise Source Object is 'this'.
methodName - Name of the method
id - METHOD_ENTERED or METHOD_EXITED values should be used

MethodEvent

public MethodEvent(MethodEventProducer mep,
                   java.lang.Object sourceObject,
                   java.lang.String methodName,
                   java.lang.Object target,
                   java.lang.Object[] methodArgs,
                   int id)
Constructor.

Parameters:
mep - an instance of MethodEventProducer
sourceObject - A Source Object. On static methods, this is the Class, that method belongs to. Otherwise Source Object is 'this'.
methodName - Name of the method
target - 'this'
methodArgs - arguments of the method
id - METHOD_ENTERED or METHOD_EXITED values should be used
Method Detail

getClassName

public java.lang.String getClassName()
Get the name of the class producing this event.

Returns:
name of the class producing this event

getMethodArgs

public java.lang.Object[] getMethodArgs()
Get the arguments.

Returns:
arguments, or null, if they were not given.

getMethodName

public java.lang.String getMethodName()
Get the name of the method producing this event.

Returns:
name of the method

isConstructor

public boolean isConstructor()
Is this method a constructor?

Returns:
true, if this MethoEvent was triggered by constructor.

isStaticInitializer

public boolean isStaticInitializer()
Is this method a static initializer.

Returns:
true, if this MethoEvent was triggered by static initializer.


Copyright © 2001. Documenation generated August 26 2011.