~ubuntu-branches/ubuntu/trusty/jcc/trusty-proposed

« back to all changes in this revision

Viewing changes to jcc/sources/JCCEnv.h

  • Committer: Bazaar Package Importer
  • Author(s): Ludovico Cavedon
  • Date: 2010-07-18 11:16:04 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100718111604-pmncb3js701dk0qp
Tags: 2.6-1
* New upstream release.
* Fix typo in README.Debian.
* Refresh avoid-ftbfs-unknown-archs.patch.
* Update Standards-Version to 3.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
#endif
69
69
 
 
70
#define _EXC_PYTHON ((int) 0)
 
71
#define _EXC_JAVA   ((int) 1)
 
72
 
 
73
typedef jclass (*getclassfn)(void);
70
74
 
71
75
class countedRef {
72
76
public:
86
90
        mid_obj_toString,
87
91
        mid_obj_hashCode,
88
92
        mid_obj_getClass,
 
93
        mid_iterator,
89
94
        mid_iterator_next,
90
95
        mid_enumeration_nextElement,
 
96
        mid_Boolean_booleanValue,
 
97
        mid_Byte_byteValue,
 
98
        mid_Character_charValue,
 
99
        mid_Double_doubleValue,
 
100
        mid_Float_floatValue,
 
101
        mid_Integer_intValue,
 
102
        mid_Long_longValue,
 
103
        mid_Short_shortValue,
91
104
        max_mid
92
105
    };
93
106
 
96
109
    std::multimap<int, countedRef> refs;
97
110
    int handlers;
98
111
 
99
 
    class exception {
100
 
    public:
101
 
        jthrowable throwable;
102
 
        exception(jthrowable throwable) {
103
 
            this->throwable = throwable;
104
 
        }
105
 
    };
106
 
 
107
 
#ifdef PYTHON
108
 
    class pythonError {
109
 
    public:
110
 
        jthrowable throwable;
111
 
        pythonError(jthrowable throwable) {
112
 
            this->throwable = throwable;
113
 
        }
114
 
    };
115
 
#endif
116
 
 
117
112
    explicit JCCEnv(JavaVM *vm, JNIEnv *env);
118
113
    virtual ~JCCEnv() {};
119
114
 
137
132
    virtual jstring getJavaVersion() const;
138
133
 
139
134
    virtual jclass findClass(const char *className) const;
 
135
    virtual jboolean isInstanceOf(jobject obj,
 
136
                                  getclassfn initializeClass) const;
 
137
 
140
138
    virtual void registerNatives(jclass cls, JNINativeMethod *methods,
141
139
                                 int n) const;
142
140
 
 
141
    virtual jobject iterator(jobject obj) const;
143
142
    virtual jobject iteratorNext(jobject obj) const;
144
143
    virtual jobject enumerationNext(jobject obj) const;
145
144
 
146
145
    virtual jobject newGlobalRef(jobject obj, int id);
147
146
    virtual jobject deleteGlobalRef(jobject obj, int id);
148
147
 
149
 
    virtual jobject newObject(jclass (*initializeClass)(), jmethodID **mids,
 
148
    virtual jobject newObject(getclassfn initializeClass, jmethodID **mids,
150
149
                              int m, ...);
151
150
 
152
151
    virtual jobjectArray newObjectArray(jclass cls, int size);
210
209
    virtual void callStaticVoidMethod(jclass cls,
211
210
                                      jmethodID mid, ...) const;
212
211
 
 
212
    virtual jboolean booleanValue(jobject obj) const;
 
213
    virtual jbyte byteValue(jobject obj) const;
 
214
    virtual jchar charValue(jobject obj) const;
 
215
    virtual jdouble doubleValue(jobject obj) const;
 
216
    virtual jfloat floatValue(jobject obj) const;
 
217
    virtual jint intValue(jobject obj) const;
 
218
    virtual jlong longValue(jobject obj) const;
 
219
    virtual jshort shortValue(jobject obj) const;
 
220
 
213
221
    virtual jmethodID getMethodID(jclass cls, const char *name,
214
222
                                  const char *signature) const;
215
223
    virtual jfieldID getFieldID(jclass cls, const char *name,
263
271
    }
264
272
 
265
273
    virtual void setClassPath(const char *classPath);
 
274
    virtual char *getClassPath();
266
275
 
267
276
    virtual jstring fromUTF(const char *bytes) const;
268
277
    virtual char *toUTF(jstring str) const;