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

« back to all changes in this revision

Viewing changes to _jcc/java/lang/Boolean.cpp

  • 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:
22
22
    namespace lang {
23
23
 
24
24
        enum {
 
25
            mid__init_,
 
26
            mid_booleanValue,
25
27
            max_mid
26
28
        };
27
29
 
37
39
            {
38
40
                jclass cls = env->findClass("java/lang/Boolean");
39
41
 
40
 
                _mids = NULL;
 
42
                _mids = new jmethodID[max_mid];
 
43
                _mids[mid__init_] = env->getMethodID(cls, "<init>", "(Z)V");
 
44
                _mids[mid_booleanValue] =
 
45
                    env->getMethodID(cls, "booleanValue", "()Z");
 
46
 
41
47
                class$ = (Class *) new JObject(cls);
42
48
 
43
49
                FALSE = new Boolean(env->getStaticObjectField(cls, "FALSE", "Ljava/lang/Boolean;"));
46
52
 
47
53
            return (jclass) class$->this$;
48
54
        }
 
55
 
 
56
        Boolean::Boolean(jboolean b) : Object(env->newObject(initializeClass, &_mids, mid__init_, b)) {
 
57
        }
 
58
 
 
59
        int Boolean::booleanValue() const
 
60
        {
 
61
            return (int) env->callBooleanMethod(this$, _mids[mid_booleanValue]);
 
62
        }
49
63
    }
50
64
}
51
65