com.metamatrix.query.function
Class FunctionForm

java.lang.Object
  extended by com.metamatrix.query.function.FunctionForm
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class FunctionForm
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

The FunctionForm class represents a particular form of a function signature. It is different from the FunctionMethod class because it ignores type information and instead differentiates function signatures based on their function name and the names of the arguments.

See Also:
Serialized Form

Constructor Summary
FunctionForm(FunctionMethod method)
          Construct a function form by pulling all info from a FunctionMethod.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Implements Comparable interface so that this object can be compared to other FunctionForm objects and ordered alphabetically.
 boolean equals(java.lang.Object obj)
          Compare this function form with another based on the name and argument names.
 java.lang.String getArgDescription(int index)
          Get argument description at index.
 java.util.List getArgDescriptions()
          Get list of argument descriptions.
 java.lang.String getArgName(int index)
          Get argument name at index.
 java.util.List getArgNames()
          Get list of argument names.
 java.lang.String getCategory()
          Get category.
 java.lang.String getDescription()
          Get description of function.
 java.lang.String getDisplayString()
          Get display string for this function form
 java.lang.String getName()
          Get name of function.
 java.lang.String getReturnDescription()
          Get description of return parameter
 java.lang.String getReturnName()
          Get name of return parameter
 int hashCode()
          Return hash code based on the name and input parameter names
 java.lang.String toString()
          String representation of the function form for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionForm

public FunctionForm(FunctionMethod method)
Construct a function form by pulling all info from a FunctionMethod. Because a FunctionForm is only created from a validated method, we can assume many things, such as that function name, type, category are non-null.

Parameters:
method - FunctionMethod to build form from
Method Detail

getName

public java.lang.String getName()
Get name of function.

Returns:
Name

getDescription

public java.lang.String getDescription()
Get description of function.

Returns:
Description

getCategory

public java.lang.String getCategory()
Get category.

Returns:
Category

getArgNames

public java.util.List getArgNames()
Get list of argument names.

Returns:
List of argument names (String)

getArgName

public java.lang.String getArgName(int index)
Get argument name at index.

Parameters:
index - Index to use
Returns:
Argument name at index

getArgDescriptions

public java.util.List getArgDescriptions()
Get list of argument descriptions.

Returns:
List of argument descriptions (String)

getArgDescription

public java.lang.String getArgDescription(int index)
Get argument description at index.

Parameters:
index - Index to use
Returns:
Argument description at index

getReturnName

public java.lang.String getReturnName()
Get name of return parameter

Returns:
Name of return parameter

getReturnDescription

public java.lang.String getReturnDescription()
Get description of return parameter

Returns:
Description of return parameter

getDisplayString

public java.lang.String getDisplayString()
Get display string for this function form

Returns:
Display version of this function form

toString

public java.lang.String toString()
String representation of the function form for debugging purposes.

Overrides:
toString in class java.lang.Object
Returns:
String representation

hashCode

public int hashCode()
Return hash code based on the name and input parameter names

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code

equals

public boolean equals(java.lang.Object obj)
Compare this function form with another based on the name and argument names.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Other object

compareTo

public int compareTo(java.lang.Object obj)
Implements Comparable interface so that this object can be compared to other FunctionForm objects and ordered alphabetically.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - Other object
Returns:
1 if other > this, 0 if other == this, -1 if other < this


Copyright © 2009. All Rights Reserved.