Dali Provisional API
Release 3.2

org.eclipse.jpt.common.utility
Interface MethodSignature


public interface 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(StringBuilder sb)
          Append a string representation of the method's signature: "foo(int, java.lang.String)"
 boolean describes(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(String otherName, JavaType[] otherParameterTypes)
          Return whether the method signature equals the specified signature.
 String getName()
          Return the method's name.
 JavaType[] getParameterTypes()
          Return the method's parameter types.
 String getSignature()
          Return a string representation of the method's signature: "foo(int, java.lang.String)"
 void printSignatureOn(PrintWriter pw)
          Print a string representation of the method's signature: "foo(int, java.lang.String)"
 

Method Detail

getName

String getName()
Return the method's name.


getParameterTypes

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


describes

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


equals

boolean equals(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

String getSignature()
Return a string representation of the method's signature:

"foo(int, java.lang.String)"


appendSignatureTo

void appendSignatureTo(StringBuilder sb)
Append a string representation of the method's signature:

"foo(int, java.lang.String)"


printSignatureOn

void printSignatureOn(PrintWriter pw)
Print a string representation of the method's signature:

"foo(int, java.lang.String)"


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.