KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > core > ReflectedCallData


1 // Copyright (c) Corporation for National Research Initiatives
2
package org.python.core;
3
4 class ReflectedCallData {
5     public Object JavaDoc[] args;
6     public int length;
7     public Object JavaDoc self;
8     public int errArg;
9
10     public ReflectedCallData() {
11         args = Py.EmptyObjects;
12         length = 0;
13         self = null;
14         errArg = -2;
15     }
16
17     public void setLength(int newLength) {
18         length = newLength;
19         if (newLength <= args.length)
20             return;
21         args = new Object JavaDoc[newLength];
22     }
23
24     public Object JavaDoc[] getArgsArray() {
25         if (length == args.length)
26             return args;
27         Object JavaDoc[] newArgs = new Object JavaDoc[length];
28         System.arraycopy(args, 0, newArgs, 0, length);
29         args = newArgs;
30         return newArgs;
31     }
32 }
33
Popular Tags