org.eclipse.cdt.ui
Class FunctionPrototypeSummary

java.lang.Object
  extended by org.eclipse.cdt.ui.FunctionPrototypeSummary
All Implemented Interfaces:
IFunctionSummary.IFunctionPrototypeSummary

public class FunctionPrototypeSummary
extends java.lang.Object
implements IFunctionSummary.IFunctionPrototypeSummary

This class is a helper class which takes care of implementing some of the function prototype parsing and stripping.


Constructor Summary
FunctionPrototypeSummary(java.lang.String proto)
          Create a function prototype summary based on a prototype string.
 
Method Summary
 java.lang.String getArguments()
          Get the arguments of the function.
 java.lang.String getName()
          Get the name of the function.
 java.lang.String getPrototypeString(boolean namefirst)
          Get a nice user defined string.
 java.lang.String getPrototypeString(boolean namefirst, boolean appendReturnType)
           
 java.lang.String getReturnType()
          Get the return type of the function.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionPrototypeSummary

public FunctionPrototypeSummary(java.lang.String proto)
Create a function prototype summary based on a prototype string.

Parameters:
proto - The string describing the prototype which is properly formed with following format -- returntype function(arguments) The following formats will be converted as follows: function(arguments) --> function(arguments) //constructors! returntype function --> returntype function() function --> void function()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: IFunctionSummary.IFunctionPrototypeSummary
Get the name of the function. This should be the same as for IFunctionSummary. ie "int main(int argc, char **argv)" --> "main"

Specified by:
getName in interface IFunctionSummary.IFunctionPrototypeSummary
Returns:
The name of the function without any additional information.

getReturnType

public java.lang.String getReturnType()
Description copied from interface: IFunctionSummary.IFunctionPrototypeSummary
Get the return type of the function. ie "int main(int argc, char **argv)" --> "int"

Specified by:
getReturnType in interface IFunctionSummary.IFunctionPrototypeSummary
Returns:
A string containing the return type of the function.

getArguments

public java.lang.String getArguments()
Description copied from interface: IFunctionSummary.IFunctionPrototypeSummary
Get the arguments of the function. ie "int main(int argc, char **argv)" --> "int argc, char **argv"

Specified by:
getArguments in interface IFunctionSummary.IFunctionPrototypeSummary
Returns:
A string containing the arguments of the function, or null if the function has no arguments.

getPrototypeString

public java.lang.String getPrototypeString(boolean namefirst)
Description copied from interface: IFunctionSummary.IFunctionPrototypeSummary
Get a nice user defined string. The format of which depends on the variable namefirst namefirst == true: main(int argc, char **argv) int namefirst == false: int main(int argc, char **argv);

Specified by:
getPrototypeString in interface IFunctionSummary.IFunctionPrototypeSummary

getPrototypeString

public java.lang.String getPrototypeString(boolean namefirst,
                                           boolean appendReturnType)