ListBaseScript.java
2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa;
import com.adobe.xfa.*;
import com.adobe.xfa.ut.ExFull;
import com.adobe.xfa.ut.ResId;
public class ListBaseScript
extends ObjScript {
protected static final ScriptTable moScriptTable = new ScriptTable(ObjScript.moScriptTable, "list", new ScriptPropObj[]{new ScriptPropObj(ListBaseScript.class, "length", "getLength", null, 4, 10, 9, 0)}, new ScriptFuncObj[]{new ScriptFuncObj(ListBaseScript.class, "item", "item", 7, new int[]{4}, 1, 10, 9, 0), new ScriptFuncObj(ListBaseScript.class, "append", "append", 1, new int[]{7}, 1, 10, 9, "appendPermsCheck", 0), new ScriptFuncObj(ListBaseScript.class, "remove", "remove", 1, new int[]{7}, 1, 10, 9, "removePermsCheck", 0), new ScriptFuncObj(ListBaseScript.class, "insert", "insert", 1, new int[]{7, 7}, 2, 10, 9, "insertPermsCheck", 0)});
public static void getLength(Obj pObj, Arg oRetVal) {
int nArg = ((ListBase)pObj).length();
oRetVal.setInteger(nArg);
}
public static boolean appendPermsCheck(Obj obj, Arg[] args) {
return ((ListBase)obj).appendPermsCheck();
}
public static boolean removePermsCheck(Obj obj, Arg[] args) {
Obj oObject = args[0].getObject();
if (!(oObject instanceof Node)) {
throw new ExFull(ResId.ArgumentMismatchException);
}
return ((ListBase)obj).removePermsCheck(oObject);
}
public static boolean insertPermsCheck(Obj obj, Arg[] args) {
return ((ListBase)obj).insertPermsCheck();
}
public static void item(Obj pObj, Arg oRetVal, Arg[] pArgs) {
Obj oArg = null;
int nArg = pArgs[0].getInteger();
oArg = ((ListBase)pObj).item(nArg);
oRetVal.setObject(oArg);
}
public static void append(Obj pObj, Arg oRetVal, Arg[] pArgs) {
Obj oObject = pArgs[0].getObject();
((ListBase)pObj).append(oObject);
}
public static void remove(Obj pObj, Arg oRetVal, Arg[] pArgs) {
Obj oObject = pArgs[0].getObject();
((ListBase)pObj).remove(oObject);
}
public static void insert(Obj pObj, Arg oRetVal, Arg[] pArgs) {
Obj oObject1 = pArgs[0].getObject();
if (!(oObject1 instanceof Node)) {
throw new ExFull(ResId.ArgumentMismatchException);
}
Obj oObject2 = pArgs[1].getObject();
if (!(oObject2 instanceof Node)) {
throw new ExFull(ResId.ArgumentMismatchException);
}
((ListBase)pObj).insert(oObject1, oObject2);
}
public static ScriptTable getScriptTable() {
return moScriptTable;
}
}