org.eclipse.jpt.utility
Interface MethodSignature

All Superinterfaces:
java.lang.Comparable<MethodSignature>

public interface MethodSignature
extends java.lang.Comparable<MethodSignature>

This interface describes a Java method signature; i.e. its "name" and its "parameter types". The parameter types are referenced by name, allowing us to reference classes that are not (or cannot be) loaded. Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves. This interface is not intended to be implemented by clients.


Method Summary
 void appendSignatureTo(java.lang.StringBuilder sb)
          Append a string representation of the method's signature: "foo(int, java.lang.String)"
 boolean describes(java.lang.reflect.Method method)
          Return whether the method signature describes the specified method.
 boolean equals(MethodSignature other)
          Return whether the method signature equals the specified signature.
 boolean equals(java.lang.String otherName, JavaType[] otherParameterTypes)
          Return whether the method signature equals the specified signature.
 java.lang.String getName()
          Return the method's name.
 JavaType[] getParameterTypes()
          Return the method's parameter types.
 java.lang.String getSignature()
          Return a string representation of the method's signature: "foo(int, java.lang.String)"
 void printSignatureOn(java.io.PrintWriter pw)
          Print a string representation of the method's signature: "foo(int, java.lang.String)"
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getName

java.lang.String getName()
Return the method's name.


getParameterTypes

JavaType[] getParameterTypes()
Return the method's parameter types.


describes

boolean describes(java.lang.reflect.Method method)
Return whether the method signature describes the specified method.


equals

boolean equals(java.lang.String otherName,
               JavaType[] otherParameterTypes)
Return whether the method signature equals the specified signature.


equals

boolean equals(MethodSignature other)
Return whether the method signature equals the specified signature.


getSignature

java.lang.String getSignature()
Return a string representation of the method's signature: "foo(int, java.lang.String)"


appendSignatureTo

void appendSignatureTo(java.lang.StringBuilder sb)
Append a string representation of the method's signature: "foo(int, java.lang.String)"


printSignatureOn

void printSignatureOn(java.io.PrintWriter pw)
Print a string representation of the method's signature: "foo(int, java.lang.String)"