com.sap.mw.jco
Class JCO.Function

java.lang.Object
  |
  +--com.sap.mw.jco.JCO.Function
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
JCO

public static class JCO.Function
extends java.lang.Object
implements java.io.Serializable

Class that represents a function. A function consists of name, an import parameter list, an export parameter list and a table parameter list.

See Also:
Serialized Form

Constructor Summary
JCO.Function(IFunctionTemplate template)
          Creates an instance of the function from a template
JCO.Function(java.lang.String name)
          Creates an instance of the function
JCO.Function(java.lang.String name, JCO.ParameterList input, JCO.ParameterList output, JCO.ParameterList tables)
          Creates an instance of the function
 
Method Summary
 JCO.AbapException getException(java.lang.String key)
          Returns the ABAP exception for the specified key
 JCO.AbapException[] getExceptionList()
          Returns the list of ABAP exceptions that can occur
 JCO.ParameterList getExportParameterList()
          Returns the list of export parameters
 JCO.ParameterList getImportParameterList()
          Returns the list import parameters
 java.lang.String getName()
          Returns the function name
 JCO.ParameterList getTableParameterList()
          Returns the list of table parameters
 void setExceptionList(JCO.AbapException[] exception_list)
          Sets the ABAP exception list
 void setExportParameterList(JCO.ParameterList export_parameters)
          Sets the export parameters
 void setImportParameterList(JCO.ParameterList import_parameters)
          Sets the import parameters
 void setName(java.lang.String name)
          Sets the function name
 void setTableParameterList(JCO.ParameterList table_parameters)
          Sets the table parameters
 java.lang.String toString()
          Converts to a string representation
 void writeHTML(java.lang.String html_filename)
          Dump the function and all parameters and tables to the specified HTML file.
 void writeHTML(java.io.Writer writer)
          Dump the function and all parameters and tables to the specified HTML file.
 void writeXML(java.lang.String xml_filename)
          Dump the function and all parameters and tables to the specified XML file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JCO.Function

public JCO.Function(java.lang.String name)
Creates an instance of the function
Parameters:
name - the name of the function

JCO.Function

public JCO.Function(java.lang.String name,
                    JCO.ParameterList input,
                    JCO.ParameterList output,
                    JCO.ParameterList tables)
Creates an instance of the function
Parameters:
name - the name of the function
input - the list of import parameters
output - the list of export parameters
tables - the list of table parameters

JCO.Function

public JCO.Function(IFunctionTemplate template)
Creates an instance of the function from a template
Parameters:
template - the function template which completely specifies the function and its parameters
Method Detail

getName

public java.lang.String getName()
Returns the function name
Returns:
the name of the function

setName

public void setName(java.lang.String name)
Sets the function name
Parameters:
name - the name of the function

getImportParameterList

public JCO.ParameterList getImportParameterList()
Returns the list import parameters
Returns:
the import parameters or null if the function does not have any import parameters

setImportParameterList

public void setImportParameterList(JCO.ParameterList import_parameters)
Sets the import parameters
Parameters:
import_parameters - the import parameters

getExportParameterList

public JCO.ParameterList getExportParameterList()
Returns the list of export parameters
Returns:
the export parameters or null if the function does not have any export parameters

setExportParameterList

public void setExportParameterList(JCO.ParameterList export_parameters)
Sets the export parameters
Parameters:
export_parameters - the export parameters

getTableParameterList

public JCO.ParameterList getTableParameterList()
Returns the list of table parameters
Returns:
the table parameters or null if the function does not have any table parameters

setTableParameterList

public void setTableParameterList(JCO.ParameterList table_parameters)
Sets the table parameters
Parameters:
table_parameters - the table parameters

getExceptionList

public JCO.AbapException[] getExceptionList()
Returns the list of ABAP exceptions that can occur
Returns:
the list of exceptions or null if the function does not have any ABAP runtime exceptions

setExceptionList

public void setExceptionList(JCO.AbapException[] exception_list)
Sets the ABAP exception list
Parameters:
exception_list - the exception list

getException

public JCO.AbapException getException(java.lang.String key)
Returns the ABAP exception for the specified key
Returns:
the ABAP exception for the specified key or null if not defined

toString

public java.lang.String toString()
Converts to a string representation
Overrides:
toString in class java.lang.Object

writeHTML

public void writeHTML(java.lang.String html_filename)
Dump the function and all parameters and tables to the specified HTML file. This method comes in handy for debugging purposes.
Parameters:
html_filename - the file to write to
Throws:
JCO.Exception - thrown if something else went wrong

writeHTML

public void writeHTML(java.io.Writer writer)
               throws java.io.IOException
Dump the function and all parameters and tables to the specified HTML file. This method comes in handy for debugging purposes.
Parameters:
writer - the stream to write to
Throws:
java.io.IOException - thrown in case of an IO error
JCO.Exception - thrown if something else went wrong
Since:
JCo 2.0

writeXML

public void writeXML(java.lang.String xml_filename)
Dump the function and all parameters and tables to the specified XML file. This method comes in handy for debugging purposes.
Parameters:
xml_filename - the file to write to
Throws:
JCO.Exception - thrown if something went wrong