ParameterList (Micro Focus COBOL Java Class Library)
Keywords: com.microfocus.cobol.lang.ParameterList class

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.microfocus.cobol.lang
Class ParameterList

    java.lang.Object
      com.microfocus.cobol.lang.ParameterList

All Implemented Interfaces:
  Cloneable

public class ParameterList
extends Object
implements Cloneable

ParameterList is a helper class designed to cut-down the effort in creating list of COBOL parameters

Copyright: Copyright (c) 2002-2003
Company: Micro Focus International Ltd

Since:
  Net Express 4.0, Server Express 4.0
Version:
  3.14, 2/4/03

Constructor Summary
`ParameterList()` Construct a ParameterList for use with cobcall Example:

Method Summary
`ParameterList` | `add(boolean aboolean)` Add a boolean to the ParameterList
`ParameterList` | `add(boolean aboolean, int usage)` Add a boolean to the ParameterList with a specific usage
`ParameterList` | `add(byte abyte)` Add a byte to the ParameterList
`ParameterList` | `add(byte abyte, int usage)` Add a byte to the ParameterList with a specific usage
`ParameterList` | `add(char achar)` Add a char to the ParameterList
`ParameterList` | `add(char achar, int usage)` Add a char to the ParameterList with a specific usage
`ParameterList` | `add(double adouble)` Add a double to the ParameterList
`ParameterList` | `add(double adouble, int usage)` Add a double to the ParameterList with a specific usage
`ParameterList` | `add(float afloat)` Add a float to the ParameterList
`ParameterList` | `add(float afloat, int usage)` Add a float to the ParameterList with a specific usage
`ParameterList` | `add(int aint)` Add a int to the ParameterList
`ParameterList` | `add(int aint, int usage)` Add a int to the ParameterList with a specific usage
`ParameterList` | `add(long along)` Add a long to the ParameterList
`ParameterList` | `add(long along, int usage)` Add a long to the ParameterList with a specific usage
`ParameterList` | `add(Object argument)` Adds a BY_REFERENCE parameter to the ParameterList
`ParameterList` | `add(Object argument, int usage)` Adds a parameter with a specific usage to the ParameterList.
`ParameterList` | `add(short ashort)` Add a short to the ParameterList
`ParameterList` | `add(short ashort, int usage)` Add a short to the ParameterList with a specific usage
`Object` | `clone()` Creates and returns a copy of a ParameterList and it's objects/
`Object` | `getArgument(int index)` get argument at index
`Object[]` | `getArguments()` Returns a Object[] that represents the parameters in the ParameterList
`int` | `getUsage(int index)` get usage for argument at index
`int[]` | `getUsageDescrption()` Returns a array of integer that represent the parameter types or null if all the paramaters are BY_REFERENCE.
`boolean` | `isEmpty()` is the argument list empty?

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParameterList

    public ParameterList()

  Construct a ParameterList for use with cobcall
  Example:

       RuntimeSystem.cobcall("testIntbyValue", new ParameterList()

       .add(myOneInt,RuntimeSystem.BY_VALUE));

Method Detail

### add

    public ParameterList add(Object argument)

  Adds a BY_REFERENCE parameter to the ParameterList

  Parameters:
    `argument` - a parameter
  Returns:
    the updated ParameterList

### add

    public ParameterList add(Object argument,
                             int usage)

  Adds a parameter with a specific usage to the ParameterList.

       RuntimeSystem.cobcall("someprogram", new ParameterList()

       .add(myOneInt,RuntimeSystem.BY_VALUE)
       .add(myTwoInt,RuntimeSystem.BY_REFERENCE)
       );

  Parameters:
    `argument` - a parameter
    `usage` - eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
  Returns:
    the updated ParameterList

### add

    public ParameterList add(int aint)

  Add a int to the ParameterList

       RuntimeSystem.cobcall("add2nums", new ParameterList()

       .add(10)
       .add(32)
       );

  Parameters:
    `aint` - a integer
  Returns:
    a updated ParameterList

### add

    public ParameterList add(int aint,
                             int usage)

  Add a int to the ParameterList with a specific usage

       RuntimeSystem.cobcall("add2nums", new ParameterList()

       .add(10, RuntimeSystem.BY_VALUE)
       .add(32, RuntimeSystem.BY_VALUE)
       );

  Parameters:
    `aint` - a integer
    `usage` - eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
  Returns:
    a updated ParameterList

### add

    public ParameterList add(long along)

  Add a long to the ParameterList

       RuntimeSystem.cobcall("add2nums", new ParameterList()

       .add((long)10)
       .add((long)32)
       );

  Parameters:
    `along` - a long
  Returns:
    a updated ParameterList

### add

    public ParameterList add(long along,
                             int usage)

  Add a long to the ParameterList with a specific usage

       RuntimeSystem.cobcall("add2nums", new ParameterList()

       .add((long)10, RuntimeSystem.BY_VALUE)
       .add((long)32, RuntimeSystem.BY_VALUE)
       );

  Parameters:
    `along` - a long
    `usage` - eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
  Returns:
    a updated ParameterList

### add

    public ParameterList add(short ashort)

  Add a short to the ParameterList

       RuntimeSystem.cobcall("add2nums", new ParameterList()

       .add((short)10)
       .add((short)32)
       );

  Parameters:
    `ashort` - a short
  Returns:
    a updated ParameterList

### add

    public ParameterList add(short ashort,
                             int usage)

  Add a short to the ParameterList with a specific usage

       RuntimeSystem.cobcall("add2nums", new ParameterList()

       .add((short)10, RuntimeSystem.BY_VALUE)
       .add((short)32, RuntimeSystem.BY_VALUE)
       );

  Parameters:
    `ashort` - a short
    `usage` - eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
  Returns:
    a updated ParameterList

### add

    public ParameterList add(byte abyte)

  Add a byte to the ParameterList

       RuntimeSystem.cobcall("add2nums", new ParameterList()

       .add((byte)10)
       .add((byte)32)
       );

  Parameters:
    `abyte` - a byte
  Returns:
    a updated ParameterList

### add

    public ParameterList add(byte abyte,
                             int usage)

  Add a byte to the ParameterList with a specific usage

       RuntimeSystem.cobcall("add2nums", new ParameterList()

       .add((byte)10, RuntimeSystem.BY_VALUE)
       .add((byte)32, RuntimeSystem.BY_VALUE)
       );

  Parameters:
    `abyte` - a byte
    `usage` - eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
  Returns:
    a updated ParameterList

### add

    public ParameterList add(char achar)

  Add a char to the ParameterList

       RuntimeSystem.cobcall("showchars", new ParameterList()

       .add((char)'C')
       .add((char)'D')
       );

  Parameters:
    `achar` - a char
  Returns:
    a updated ParameterList

### add

    public ParameterList add(char achar,
                             int usage)

  Add a char to the ParameterList with a specific usage

       RuntimeSystem.cobcall("showchars", new ParameterList()

       .add((char)'A', RuntimeSystem.BY_VALUE)
       .add((char)'B', RuntimeSystem.BY_VALUE)
       );

  Parameters:
    `achar` - a char
    `usage` - eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
  Returns:
    a updated ParameterList

### add

    public ParameterList add(boolean aboolean)

  Add a boolean to the ParameterList

       RuntimeSystem.cobcall("showbools", new ParameterList()

       .add((boolean)false)
       .add((boolean)true)
       );

  Parameters:
    `aboolean` - a boolean
  Returns:
    a updated ParameterList

### add

    public ParameterList add(boolean aboolean,
                             int usage)

  Add a boolean to the ParameterList with a specific usage

       RuntimeSystem.cobcall("showbools", new ParameterList()

       .add((boolean)true,  RuntimeSystem.BY_VALUE)
       .add((boolean)false, RuntimeSystem.BY_VALUE)
       );

  Parameters:
    `aboolean` - a boolean
    `usage` - eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
  Returns:
    a updated ParameterList

### add

    public ParameterList add(float afloat)

  Add a float to the ParameterList

       RuntimeSystem.cobcall("addfloat", new ParameterList()

       .add((float)false)
       .add((float)true)
       );

  Parameters:
    `afloat` - a float
  Returns:
    a updated ParameterList

### add

    public ParameterList add(float afloat,
                             int usage)

  Add a float to the ParameterList with a specific usage

       RuntimeSystem.cobcall("addfloat", new ParameterList()

       .add((float)true,  RuntimeSystem.BY_VALUE)
       .add((float)false, RuntimeSystem.BY_VALUE)
       );

  Parameters:
    `afloat` - a float
    `usage` - eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
  Returns:
    a updated ParameterList

### add

    public ParameterList add(double adouble)

  Add a double to the ParameterList

       RuntimeSystem.cobcall("adddouble", new ParameterList()

       .add((double)false)
       .add((double)true)
       );

  Parameters:
    `adouble` - adouble
  Returns:
    a updated ParameterList

### add

    public ParameterList add(double adouble,
                             int usage)

  Add a double to the ParameterList with a specific usage

       RuntimeSystem.cobcall("adddouble", new ParameterList()

       .add((double)true,  RuntimeSystem.BY_VALUE)
       .add((double)false, RuntimeSystem.BY_VALUE)
       );

  Parameters:
    `adouble` - a double
    `usage` - eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
  Returns:
    a updated ParameterList

### getArguments

    public Object[] getArguments()

  Returns a Object[] that represents the parameters in the ParameterList

  Returns:
    a Object[] parameter list

### getUsageDescrption

    public int[] getUsageDescrption()

  Returns a array of integer that represent the parameter types or null if all the paramaters are BY_REFERENCE.

  Returns:
    a int[] array BY_* values

### clone

    public Object clone()
                 throws CloneNotSupportedException

  Creates and returns a copy of a ParameterList and it's objects/

  Returns:
    a clone of this instance.
  Throws:
    `CloneNotSupportedException`

### isEmpty

    public boolean isEmpty()

  is the argument list empty?

  Returns:
    boolean

### getArgument

    public Object getArgument(int index)

  get argument at index

  Parameters:
    `index` -
  Returns:
    Object at index

### getUsage

    public int getUsage(int index)

  get usage for argument at index

  Parameters:
    `index` -
  Returns:
    Object at index

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.