Interface IFunctionDeclaration

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, ICElement, IDeclaration, ISourceManipulation, ISourceReference
All Known Subinterfaces:
IBinaryFunction, IFunction, IFunctionTemplate, IFunctionTemplateDeclaration, IMethod, IMethodDeclaration, IMethodTemplate, IMethodTemplateDeclaration

public interface IFunctionDeclaration extends IDeclaration
Represents a function
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Method Details

    • getExceptions

      String[] getExceptions()
      Returns the type signatures of the exceptions this method throws, in the order declared in the source. Returns an empty array if this method throws no exceptions.

      For example, a source method declaring "void f(int a) throw (x1, x2);", would return the array {"x1", "x2"}.

    • getNumberOfParameters

      int getNumberOfParameters()
      Returns the number of parameters of this method.
    • getParameterInitializer

      String getParameterInitializer(int pos)
      Returns the initializer of parameters position for this method. Returns an empty string if this argument has no initializer.

      For example, a method declared as public void foo(String text, int length=9) would return the array {"9"}.

    • getParameterTypes

      String[] getParameterTypes()
      Returns the type signatures for the parameters of this method. Returns an empty array if this method has no parameters. This is a handle-only method.

      For example, a source method declared as void foo(string text, int length) would return the array {"string","int"}.

    • getReturnType

      String getReturnType()
      Returns the return value of this method.
    • getSignature

      String getSignature() throws CModelException
      Returns the signature of the method.
      Throws:
      CModelException