nl.tudelft.simulation.language.reflection
Class MethodSignature

java.lang.Object
  extended bynl.tudelft.simulation.language.reflection.MethodSignature
All Implemented Interfaces:
java.io.Serializable

public class MethodSignature
extends java.lang.Object
implements java.io.Serializable

A method descriptor represents the parameters that the method takes and the value that it returns. It is a series of characters generated by the grammar described at The Java Virtual Machine Specification
(c) copyright 2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Since:
1.3
Version:
1.3 March 24, 2004
Author:
Peter Jacobs , Niels Lang Alexander Verbraeck
See Also:
Serialized Form

Constructor Summary
MethodSignature(java.lang.reflect.Constructor constructor)
          constructs a new MethodSignature
MethodSignature(java.lang.reflect.Method method)
          constructs a new MethodSignature
MethodSignature(java.lang.String value)
          constructs a new MethodSignature
 
Method Summary
 java.lang.String getParameterDescriptor()
           
static java.lang.String getParameterDescriptor(java.lang.String methodDescriptor)
           
 java.lang.Class[] getParameterTypes()
          returns the parameterTypes
static java.lang.Class[] getParameterTypes(java.lang.String methodDescriptor)
          returns the parameterTypes
 java.lang.String getReturnDescriptor()
           
static java.lang.String getReturnDescriptor(java.lang.String methodDescriptor)
           
 java.lang.Class getReturnType()
          returns the returnType of this methodDescriptor
static java.lang.Class getReturnType(java.lang.String methodDescriptor)
          returns the returnType of this methodDescriptor
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodSignature

public MethodSignature(java.lang.String value)
constructs a new MethodSignature

Parameters:
value - the descriptor

MethodSignature

public MethodSignature(java.lang.reflect.Method method)
constructs a new MethodSignature

Parameters:
method - the method

MethodSignature

public MethodSignature(java.lang.reflect.Constructor constructor)
constructs a new MethodSignature

Parameters:
constructor - the constructor
Method Detail

getParameterDescriptor

public java.lang.String getParameterDescriptor()
Returns:
Returns the parameterDescriptor

getParameterTypes

public java.lang.Class[] getParameterTypes()
                                    throws java.lang.ClassNotFoundException
returns the parameterTypes

Returns:
ClassDescriptor[] the result
Throws:
java.lang.ClassNotFoundException - on incomplete classPath

getReturnDescriptor

public java.lang.String getReturnDescriptor()
Returns:
Returns the returnDescriptor

getReturnType

public java.lang.Class getReturnType()
                              throws java.lang.ClassNotFoundException
returns the returnType of this methodDescriptor

Returns:
Returns the returnType
Throws:
java.lang.ClassNotFoundException - on incomplete classPath

toString

public java.lang.String toString()
See Also:
Object.toString()

getParameterDescriptor

public static java.lang.String getParameterDescriptor(java.lang.String methodDescriptor)
Parameters:
methodDescriptor - the methodDescriptor
Returns:
Returns the parameterDescriptor

getParameterTypes

public static java.lang.Class[] getParameterTypes(java.lang.String methodDescriptor)
                                           throws java.lang.ClassNotFoundException
returns the parameterTypes

Parameters:
methodDescriptor - the string
Returns:
ClassDescriptor[] the result
Throws:
java.lang.ClassNotFoundException - on incomplete classPath

getReturnDescriptor

public static java.lang.String getReturnDescriptor(java.lang.String methodDescriptor)
Parameters:
methodDescriptor - the methodDescriptor
Returns:
Returns the returnDescriptor

getReturnType

public static java.lang.Class getReturnType(java.lang.String methodDescriptor)
                                     throws java.lang.ClassNotFoundException
returns the returnType of this methodDescriptor

Parameters:
methodDescriptor - the returnDescriptor
Returns:
Returns the returnType
Throws:
java.lang.ClassNotFoundException - on incomplete classPath


Copyright © 2002-2004 Delft University of Technology, the Netherlands. All Rights Reserved.