com.sap.mw.jco

Class JCO.Function

java.lang.Object
  extended bycom.sap.mw.jco.JCO.Function
All Implemented Interfaces:
Serializable
Enclosing class:
JCO

public static class JCO.Function
extends Object
implements 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(String name)
          Creates an instance of the function
JCO.Function(String name, JCO.ParameterList input, JCO.ParameterList output, JCO.ParameterList tables)
          Creates an instance of the function
 
Method Summary
 JCO.AbapException getException(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
 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(String name)
          Sets the function name
 void setTableParameterList(JCO.ParameterList table_parameters)
          Sets the table parameters
 String toString()
          Converts to a string representation
 void writeHTML(String html_filename)
          Dump the function and all parameters and tables to the specified HTML file.
 void writeHTML(Writer writer)
          Dump the function and all parameters and tables to the specified HTML file.
protected  void writeXML(OutputStream output_stream)
          Dump the function and all parameters and tables to the specified output stream This method comes in handy for debugging purposes.
 void writeXML(String xml_filename)
          Dump the function and all parameters and tables to the specified XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JCO.Function

public JCO.Function(String name)
Creates an instance of the function

Parameters:
name - the name of the function

JCO.Function

public JCO.Function(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 String getName()
Returns the function name

Returns:
the name of the function

setName

public void setName(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(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 String toString()
Converts to a string representation


writeHTML

public void writeHTML(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(Writer writer)
               throws 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:
IOException - thrown in case of an IO error
JCO.Exception - thrown if something else went wrong
Since:
JCo 2.0

writeXML

public void writeXML(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

writeXML

protected void writeXML(OutputStream output_stream)
                 throws IOException
Dump the function and all parameters and tables to the specified output stream This method comes in handy for debugging purposes.

Parameters:
output_stream - the stream to dump the function to
Throws:
IOException - thrown in case of an IO error
JCO.Exception - thrown if something else went wrong


Copyright 2006 SAP AG Complete Copyright Notice