01: /*
02: * <copyright>
03: *
04: * Copyright 1997-2004 BBNT Solutions, LLC
05: * under sponsorship of the Defense Advanced Research Projects
06: * Agency (DARPA).
07: *
08: * You can redistribute this software and/or modify it under the
09: * terms of the Cougaar Open Source License as published on the
10: * Cougaar Open Source Website (www.cougaar.org).
11: *
12: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23: *
24: * </copyright>
25: */
26:
27: package org.cougaar.lib.contract.lang.op;
28:
29: import java.util.*;
30:
31: import org.cougaar.lib.contract.lang.*;
32: import org.cougaar.lib.contract.lang.op.constant.*;
33: import org.cougaar.lib.contract.lang.op.logical.*;
34: import org.cougaar.lib.contract.lang.op.list.*;
35: import org.cougaar.lib.contract.lang.op.reflect.*;
36:
37: public interface OpCodes {
38:
39: /** All <code>Op</code>s have unique integer ID **/
40: // constant
41: public static final int CONSTANT_ID = 0;
42: public static final int GET_ID = 1;
43: // list
44: public static final int ALL_ID = 2;
45: public static final int EMPTY_ID = 3;
46: public static final int EXISTS_ID = 4;
47: // logical
48: public static final int AND_ID = 5;
49: public static final int FALSE_ID = 6;
50: public static final int NOT_ID = 7;
51: public static final int OR_ID = 8;
52: public static final int TRUE_ID = 9;
53: // reflect
54: public static final int APPLY_ID = 10;
55: public static final int FIELD_ID = 11;
56: public static final int INSTANCEOF_ID = 12;
57: public static final int METHOD_ID = 13;
58: public static final int REFLECT_ID = 14;
59: public static final int THIS_ID = 15;
60:
61: /** All <code>Op</code>s have unique names **/
62: // constant
63: public static final String CONSTANT_NAME = "const";
64: public static final String GET_NAME = "get";
65: // list
66: public static final String ALL_NAME = "all";
67: public static final String EMPTY_NAME = "empty";
68: public static final String EXISTS_NAME = "exists";
69: // logical
70: public static final String AND_NAME = "and";
71: public static final String FALSE_NAME = "false";
72: public static final String NOT_NAME = "not";
73: public static final String OR_NAME = "or";
74: public static final String TRUE_NAME = "true";
75: // reflect
76: public static final String APPLY_NAME = "apply";
77: public static final String FIELD_NAME = "field";
78: public static final String INSTANCEOF_NAME = "instanceof";
79: public static final String METHOD_NAME = "method";
80: public static final String REFLECT_NAME = "reflect";
81: public static final String THIS_NAME = "this";
82: }
|