ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

javafe.reader
Class MethodSignature

java.lang.Object
  extended byjavafe.reader.MethodSignature

class MethodSignature
extends java.lang.Object

Represents the signature of a method in terms of AST elements.


Field Summary
private  java.util.Vector parameters
          The parameter types of this method signature.
private  Type return_
          The return type of this method signature.
 
Constructor Summary
(package private) MethodSignature(int classLocation)
          Construct a new method signature with an empty sequence of parameter types and a void return type.
 
Method Summary
(package private)  void appendParameter(Type parameterType)
          Append a parameter type to this method signature.
(package private)  int countParameters()
          Count the number of parameter types in this method signature.
(package private)  Type getReturn()
          Return the return type of this method signature.
(package private)  Type parameterAt(int index)
          Return a parameter type from this method signature.
(package private)  void setReturn(Type return_)
          Change the return type of this method signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameters

private java.util.Vector parameters
The parameter types of this method signature. Initialized by constructor.


return_

private Type return_
The return type of this method signature. Initialized by constructor.

Constructor Detail

MethodSignature

MethodSignature(int classLocation)
Construct a new method signature with an empty sequence of parameter types and a void return type.

Method Detail

countParameters

int countParameters()
Count the number of parameter types in this method signature.

Returns:
the number of parameter types

parameterAt

Type parameterAt(int index)
Return a parameter type from this method signature.

Parameters:
index - the index of the parameter type to return
Returns:
the parameter type at index index

appendParameter

void appendParameter(Type parameterType)
Append a parameter type to this method signature.

Parameters:
parameterType - the parameter type to append

getReturn

Type getReturn()
Return the return type of this method signature.

Returns:
the return type

setReturn

void setReturn(Type return_)
Change the return type of this method signature.

Parameters:
return_ - the new return type

ESC/Java2
© 2003,2004,2005 David Cok and Joseph Kiniry
© 2005 UCD Dublin
© 2003,2004 Radboud University Nijmegen
© 1999,2000 Compaq Computer Corporation
© 1997,1998,1999 Digital Equipment Corporation
All Rights Reserved

The ESC/Java2 Project Homepage