com.plumtree.openfoundation.reflect
Class XPMethod

java.lang.Object
  extended bycom.plumtree.openfoundation.reflect.XPMethod

public class XPMethod
extends java.lang.Object

This class corresponds to java.lang.reflect.Method. It provides information about, and access to, a single method on a class or interface.

Author:
djc

Constructor Summary
XPMethod(java.lang.reflect.Method method)
          Constructs a XPMethod object.
 
Method Summary
 java.lang.String GetName()
          Returns the name of the method represented by this Method object, as a String.
 XPType[] GetParameterTypes()
          Returns an array of XPType objects that represent the formal parameter types, in declaration order, of the method represented by this Method object.
 XPType GetReturnType()
          Returns a XPType object that represents the formal return type of the method represented by this Method object.
 java.lang.reflect.Method GetUnderlyingObject()
          Return the underlying java.lang.reflect.Method object.
 java.lang.Object Invoke(java.lang.Object obj, java.lang.Object[] parameters)
          Invokes the underlying method represented by this Method object, on the specified object with the specified parameters.
 boolean IsPublic()
          Verify if this is a public method.
 boolean IsStatic()
          Verify if this is a static method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPMethod

public XPMethod(java.lang.reflect.Method method)
Constructs a XPMethod object.

Parameters:
method - a java.lang.reflect.Method object
Method Detail

GetName

public java.lang.String GetName()
Returns the name of the method represented by this Method object, as a String.

Returns:
the simple name of the underlying member

GetReturnType

public XPType GetReturnType()
Returns a XPType object that represents the formal return type of the method represented by this Method object.

Returns:
the return type for the method this object represents

GetParameterTypes

public XPType[] GetParameterTypes()
Returns an array of XPType objects that represent the formal parameter types, in declaration order, of the method represented by this Method object.

Returns:
the parameter types for the method this object represents

Invoke

public java.lang.Object Invoke(java.lang.Object obj,
                               java.lang.Object[] parameters)
Invokes the underlying method represented by this Method object, on the specified object with the specified parameters.

Parameters:
obj - the object the underlying method is invoked from
parameters - the arguments used for the method call
Returns:
the result of dispatching the method represented by this object on obj with parameters

GetUnderlyingObject

public java.lang.reflect.Method GetUnderlyingObject()
Return the underlying java.lang.reflect.Method object.

Returns:
a native Method object

IsPublic

public boolean IsPublic()
Verify if this is a public method.

Returns:
true for pulbic otherwise false

IsStatic

public boolean IsStatic()
Verify if this is a static method.

Returns:
true for static otherwise false


Copyright 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.