|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microfocus.cobol.lang.ParameterList
ParameterList is a helper class designed to cut-down the effort in creating list of COBOL parameters
Copyright: Copyright (c) 2002-2003
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 |
public ParameterList()
RuntimeSystem.cobcall("testIntbyValue", new ParameterList()
.add(myOneInt,RuntimeSystem.BY_VALUE));
Method Detail |
public ParameterList add(Object argument)
argument
- a parameter
public ParameterList add(Object argument, int usage)
RuntimeSystem.cobcall("someprogram", new ParameterList()
.add(myOneInt,RuntimeSystem.BY_VALUE) .add(myTwoInt,RuntimeSystem.BY_REFERENCE) );
argument
- a parameterusage
- eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
public ParameterList add(int aint)
RuntimeSystem.cobcall("add2nums", new ParameterList()
.add(10) .add(32) );
aint
- a integer
public ParameterList add(int aint, int usage)
RuntimeSystem.cobcall("add2nums", new ParameterList()
.add(10, RuntimeSystem.BY_VALUE) .add(32, RuntimeSystem.BY_VALUE) );
aint
- a integerusage
- eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
public ParameterList add(long along)
RuntimeSystem.cobcall("add2nums", new ParameterList()
.add((long)10) .add((long)32) );
along
- a long
public ParameterList add(long along, int usage)
RuntimeSystem.cobcall("add2nums", new ParameterList()
.add((long)10, RuntimeSystem.BY_VALUE) .add((long)32, RuntimeSystem.BY_VALUE) );
along
- a longusage
- eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
public ParameterList add(short ashort)
RuntimeSystem.cobcall("add2nums", new ParameterList()
.add((short)10) .add((short)32) );
ashort
- a short
public ParameterList add(short ashort, int usage)
RuntimeSystem.cobcall("add2nums", new ParameterList()
.add((short)10, RuntimeSystem.BY_VALUE) .add((short)32, RuntimeSystem.BY_VALUE) );
ashort
- a shortusage
- eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
public ParameterList add(byte abyte)
RuntimeSystem.cobcall("add2nums", new ParameterList()
.add((byte)10) .add((byte)32) );
abyte
- a byte
public ParameterList add(byte abyte, int usage)
RuntimeSystem.cobcall("add2nums", new ParameterList()
.add((byte)10, RuntimeSystem.BY_VALUE) .add((byte)32, RuntimeSystem.BY_VALUE) );
abyte
- a byteusage
- eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
public ParameterList add(char achar)
RuntimeSystem.cobcall("showchars", new ParameterList()
.add((char)'C') .add((char)'D') );
achar
- a char
public ParameterList add(char achar, int usage)
RuntimeSystem.cobcall("showchars", new ParameterList()
.add((char)'A', RuntimeSystem.BY_VALUE) .add((char)'B', RuntimeSystem.BY_VALUE) );
achar
- a charusage
- eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
public ParameterList add(boolean aboolean)
RuntimeSystem.cobcall("showbools", new ParameterList()
.add((boolean)false) .add((boolean)true) );
aboolean
- a boolean
public ParameterList add(boolean aboolean, int usage)
RuntimeSystem.cobcall("showbools", new ParameterList()
.add((boolean)true, RuntimeSystem.BY_VALUE) .add((boolean)false, RuntimeSystem.BY_VALUE) );
aboolean
- a booleanusage
- eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
public ParameterList add(float afloat)
RuntimeSystem.cobcall("addfloat", new ParameterList()
.add((float)false) .add((float)true) );
afloat
- a float
public ParameterList add(float afloat, int usage)
RuntimeSystem.cobcall("addfloat", new ParameterList()
.add((float)true, RuntimeSystem.BY_VALUE) .add((float)false, RuntimeSystem.BY_VALUE) );
afloat
- a floatusage
- eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
public ParameterList add(double adouble)
RuntimeSystem.cobcall("adddouble", new ParameterList()
.add((double)false) .add((double)true) );
adouble
- adouble
public ParameterList add(double adouble, int usage)
RuntimeSystem.cobcall("adddouble", new ParameterList()
.add((double)true, RuntimeSystem.BY_VALUE) .add((double)false, RuntimeSystem.BY_VALUE) );
adouble
- a doubleusage
- eg: RuntimeSystem.BY_REFERENCE, RuntimeSystem.BY_VALUE, RuntimeSystem.B_CONTENT
public Object[] getArguments()
public int[] getUsageDescrption()
public Object clone() throws CloneNotSupportedException
CloneNotSupportedException
public boolean isEmpty()
public Object getArgument(int index)
index
-
public int getUsage(int index)
index
-
|
|||||||||||
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.