com.aurorasoftworks.signal.runtime.core.context.proxy
Class AbstractMethodHandler

java.lang.Object
  extended by com.aurorasoftworks.signal.runtime.core.context.proxy.AbstractMethodHandler
All Implemented Interfaces:
IMethodHandler

public abstract class AbstractMethodHandler
extends java.lang.Object
implements IMethodHandler

A base class for implementations of IMethodHandler

Author:
Marek

Constructor Summary
protected AbstractMethodHandler(java.lang.String methodName)
          Creates a new AbstractMethodHandler object for a method that does not accept arguments.
protected AbstractMethodHandler(java.lang.String methodName, java.lang.Class argumentType)
          Creates a new AbstractMethodHandler object for a method that accepts a single argument.
protected AbstractMethodHandler(java.lang.String methodName, java.lang.Class[] argumentTypes)
          Creates a new AbstractMethodHandler object.
 
Method Summary
 java.lang.Class[] getArgumentTypes()
          Returns the types of arguments this methods accepts.
 java.lang.String getMethodName()
          Returns the name of this method object
 boolean matchesArgumentTypes(java.lang.Class[] types)
          Determines if the signature of this method object matches the provided sequence of types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.aurorasoftworks.signal.runtime.core.context.proxy.IMethodHandler
invoke
 

Constructor Detail

AbstractMethodHandler

protected AbstractMethodHandler(java.lang.String methodName,
                                java.lang.Class[] argumentTypes)
Creates a new AbstractMethodHandler object.

Parameters:
methodName - name of the method this objects represents
argumentTypes - types of arguments of the method this object represents

AbstractMethodHandler

protected AbstractMethodHandler(java.lang.String methodName,
                                java.lang.Class argumentType)
Creates a new AbstractMethodHandler object for a method that accepts a single argument.

Parameters:
methodName - name of the method this objects represents
argumentType - type of the single argument of the method this object represents

AbstractMethodHandler

protected AbstractMethodHandler(java.lang.String methodName)
Creates a new AbstractMethodHandler object for a method that does not accept arguments.

Parameters:
methodName - name of the method this objects represents
Method Detail

matchesArgumentTypes

public boolean matchesArgumentTypes(java.lang.Class[] types)
Determines if the signature of this method object matches the provided sequence of types.

Specified by:
matchesArgumentTypes in interface IMethodHandler
Parameters:
types - a sequence of types to compare the signature of this method object to
Returns:
true if a match is found, false otherwise

getMethodName

public java.lang.String getMethodName()
Returns the name of this method object

Specified by:
getMethodName in interface IMethodHandler
Returns:
name of this method

getArgumentTypes

public java.lang.Class[] getArgumentTypes()
Returns the types of arguments this methods accepts.

Specified by:
getArgumentTypes in interface IMethodHandler
Returns:
a sequence of types that matches the signature of this method object (an empty array if the method does not accept any arguments)


Copyright © 2010. All Rights Reserved.