1 /* src/vm/javaobjects.hpp - functions to create and access Java objects
3 Copyright (C) 2008 Theobroma Systems Ltd.
5 This file is part of CACAO.
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2, or (at
10 your option) any later version.
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 #ifndef _JAVAOBJECTS_HPP
26 #define _JAVAOBJECTS_HPP
32 #include "mm/memory.h"
34 #include "native/llni.h"
38 #include "vm/global.h"
39 #include "vm/globals.hpp"
40 #include "vm/method.h"
46 * This class provides low-level functions to access Java object
49 * These functions do NOT take care about the GC critical section!
50 * Please use FieldAccess wherever possible.
52 class RawFieldAccess {
54 template<class T> static inline T raw_get(void* address, const off_t offset);
55 template<class T> static inline void raw_set(void* address, const off_t offset, T value);
59 template<class T> inline T RawFieldAccess::raw_get(void* address, const off_t offset)
61 T* p = (T*) (((uintptr_t) address) + offset);
66 template<class T> inline void RawFieldAccess::raw_set(void* address, const off_t offset, T value)
68 T* p = (T*) (((uintptr_t) address) + offset);
74 * This classes provides functions to access Java object instance
75 * fields. These functions enter a critical GC section before
76 * accessing the Java object throught the handle and leave it
79 class FieldAccess : private RawFieldAccess {
81 template<class T> static inline T get(java_handle_t* h, const off_t offset);
82 template<class T> static inline void set(java_handle_t* h, const off_t offset, T value);
85 template<class T> inline T FieldAccess::get(java_handle_t* h, const off_t offset)
92 // XXX This should be _handle->get_object();
95 result = raw_get<T>(o, offset);
102 template<> inline java_handle_t* FieldAccess::get(java_handle_t* h, const off_t offset)
105 java_object_t* result;
106 java_handle_t* hresult;
108 GC::critical_enter();
110 // XXX This should be _handle->get_object();
113 result = raw_get<java_object_t*>(o, offset);
115 hresult = LLNI_WRAP(result);
117 GC::critical_leave();
123 template<class T> inline void FieldAccess::set(java_handle_t* h, const off_t offset, T value)
127 GC::critical_enter();
129 // XXX This should be h->get_object();
132 raw_set(o, offset, value);
134 GC::critical_leave();
137 template<> inline void FieldAccess::set<java_handle_t*>(java_handle_t* h, const off_t offset, java_handle_t* value)
140 java_object_t* ovalue;
142 GC::critical_enter();
144 // XXX This should be h->get_object();
146 ovalue = LLNI_UNWRAP(value);
148 raw_set(o, offset, ovalue);
150 GC::critical_leave();
161 class java_lang_Object {
163 // Handle of Java object.
164 java_handle_t* _handle;
167 java_lang_Object() : _handle(NULL) {}
168 java_lang_Object(java_handle_t* h) : _handle(h) {}
169 java_lang_Object(jobject h) : _handle((java_handle_t*) h) {}
170 virtual ~java_lang_Object() {}
173 virtual inline java_handle_t* get_handle() const { return _handle; }
174 inline vftbl_t* get_vftbl () const;
175 inline classinfo* get_Class () const;
177 inline bool is_null () const;
178 inline bool is_non_null() const;
182 inline vftbl_t* java_lang_Object::get_vftbl() const
184 GC::critical_enter();
186 // XXX This should be h->get_object();
187 java_object_t* o = LLNI_UNWRAP(_handle);
188 vftbl_t* vftbl = o->vftbl;
190 GC::critical_leave();
195 inline classinfo* java_lang_Object::get_Class() const
197 return get_vftbl()->clazz;
201 inline bool java_lang_Object::is_null() const
203 return (_handle == NULL);
206 inline bool java_lang_Object::is_non_null() const
208 return (_handle != NULL);
220 class java_lang_Boolean : public java_lang_Object, private FieldAccess {
222 // Static offsets of the object's instance fields.
223 // TODO These offsets need to be checked on VM startup.
224 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
227 java_lang_Boolean(java_handle_t* h) : java_lang_Object(h) {}
229 inline uint8_t get_value();
230 inline void set_value(uint8_t value);
233 inline uint8_t java_lang_Boolean::get_value()
235 return get<int32_t>(_handle, offset_value);
238 inline void java_lang_Boolean::set_value(uint8_t value)
240 set(_handle, offset_value, (uint32_t) value);
252 class java_lang_Byte : public java_lang_Object, private FieldAccess {
254 // Static offsets of the object's instance fields.
255 // TODO These offsets need to be checked on VM startup.
256 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
259 java_lang_Byte(java_handle_t* h) : java_lang_Object(h) {}
261 inline int8_t get_value();
262 inline void set_value(int8_t value);
265 inline int8_t java_lang_Byte::get_value()
267 return get<int32_t>(_handle, offset_value);
270 inline void java_lang_Byte::set_value(int8_t value)
272 set(_handle, offset_value, (int32_t) value);
277 * java/lang/Character
284 class java_lang_Character : public java_lang_Object, private FieldAccess {
286 // Static offsets of the object's instance fields.
287 // TODO These offsets need to be checked on VM startup.
288 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
291 java_lang_Character(java_handle_t* h) : java_lang_Object(h) {}
293 inline uint16_t get_value();
294 inline void set_value(uint16_t value);
297 inline uint16_t java_lang_Character::get_value()
299 return get<int32_t>(_handle, offset_value);
302 inline void java_lang_Character::set_value(uint16_t value)
304 set(_handle, offset_value, (uint32_t) value);
316 class java_lang_Short : public java_lang_Object, private FieldAccess {
318 // Static offsets of the object's instance fields.
319 // TODO These offsets need to be checked on VM startup.
320 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
323 java_lang_Short(java_handle_t* h) : java_lang_Object(h) {}
325 inline int16_t get_value();
326 inline void set_value(int16_t value);
329 inline int16_t java_lang_Short::get_value()
331 return get<int32_t>(_handle, offset_value);
334 inline void java_lang_Short::set_value(int16_t value)
336 set(_handle, offset_value, (int32_t) value);
348 class java_lang_Integer : public java_lang_Object, private FieldAccess {
350 // Static offsets of the object's instance fields.
351 // TODO These offsets need to be checked on VM startup.
352 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
355 java_lang_Integer(java_handle_t* h) : java_lang_Object(h) {}
357 inline int32_t get_value();
358 inline void set_value(int32_t value);
361 inline int32_t java_lang_Integer::get_value()
363 return get<int32_t>(_handle, offset_value);
366 inline void java_lang_Integer::set_value(int32_t value)
368 set(_handle, offset_value, value);
380 class java_lang_Long : public java_lang_Object, private FieldAccess {
382 // Static offsets of the object's instance fields.
383 // TODO These offsets need to be checked on VM startup.
384 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int64_t));
387 java_lang_Long(java_handle_t* h) : java_lang_Object(h) {}
389 inline int64_t get_value();
390 inline void set_value(int64_t value);
393 inline int64_t java_lang_Long::get_value()
395 return get<int64_t>(_handle, offset_value);
398 inline void java_lang_Long::set_value(int64_t value)
400 set(_handle, offset_value, value);
412 class java_lang_Float : public java_lang_Object, private FieldAccess {
414 // Static offsets of the object's instance fields.
415 // TODO These offsets need to be checked on VM startup.
416 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), sizeof(float));
419 java_lang_Float(java_handle_t* h) : java_lang_Object(h) {}
421 inline float get_value();
422 inline void set_value(float value);
425 inline float java_lang_Float::get_value()
427 return get<float>(_handle, offset_value);
430 inline void java_lang_Float::set_value(float value)
432 set(_handle, offset_value, value);
444 class java_lang_Double : public java_lang_Object, private FieldAccess {
446 // Static offsets of the object's instance fields.
447 // TODO These offsets need to be checked on VM startup.
448 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), sizeof(double));
451 java_lang_Double(java_handle_t* h) : java_lang_Object(h) {}
453 inline double get_value();
454 inline void set_value(double value);
457 inline double java_lang_Double::get_value()
459 return get<double>(_handle, offset_value);
462 inline void java_lang_Double::set_value(double value)
464 set(_handle, offset_value, value);
468 #if defined(ENABLE_JAVASE)
470 # if defined(ENABLE_ANNOTATIONS)
472 * OpenJDK sun/reflect/ConstantPool
477 * 1. java.lang.Object constantPoolOop;
479 class sun_reflect_ConstantPool : public java_lang_Object, private FieldAccess {
481 // Static offsets of the object's instance fields.
482 // TODO These offsets need to be checked on VM startup.
483 static const off_t offset_constantPoolOop = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
486 sun_reflect_ConstantPool(java_handle_t* h) : java_lang_Object(h) {}
487 sun_reflect_ConstantPool(java_handle_t* h, jclass constantPoolOop);
490 inline void set_constantPoolOop(classinfo* value);
491 inline void set_constantPoolOop(jclass value);
495 inline sun_reflect_ConstantPool::sun_reflect_ConstantPool(java_handle_t* h, jclass constantPoolOop) : java_lang_Object(h)
497 set_constantPoolOop(constantPoolOop);
501 inline void sun_reflect_ConstantPool::set_constantPoolOop(classinfo* value)
503 set(_handle, offset_constantPoolOop, value);
506 inline void sun_reflect_ConstantPool::set_constantPoolOop(jclass value)
508 // XXX jclass is a boxed object.
509 set_constantPoolOop(LLNI_classinfo_unwrap(value));
511 # endif // ENABLE_ANNOTATIONS
513 #endif // ENABLE_JAVASE
516 #if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
519 * GNU Classpath java/lang/Class
524 * 1. java.lang.Object[] signers;
525 * 2. java.security.ProtectionDomain pd;
526 * 3. java.lang.Object vmdata;
527 * 4. java.lang.reflect.Constructor constructor;
529 class java_lang_Class : public java_lang_Object, private FieldAccess {
531 // Static offsets of the object's instance fields.
532 // TODO These offsets need to be checked on VM startup.
533 static const off_t offset_signers = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
534 static const off_t offset_pd = MEMORY_ALIGN(offset_signers + SIZEOF_VOID_P, SIZEOF_VOID_P);
535 static const off_t offset_vmdata = MEMORY_ALIGN(offset_pd + SIZEOF_VOID_P, SIZEOF_VOID_P);
536 static const off_t offset_constructor = MEMORY_ALIGN(offset_vmdata + SIZEOF_VOID_P, SIZEOF_VOID_P);
539 java_lang_Class(java_handle_t* h) : java_lang_Object(h) {}
542 inline void set_pd(java_handle_t* value);
543 inline void set_pd(jobject value);
546 inline void java_lang_Class::set_pd(java_handle_t* value)
548 set(_handle, offset_pd, value);
551 inline void java_lang_Class::set_pd(jobject value)
553 set_pd((java_handle_t*) value);
558 * GNU Classpath java/lang/StackTraceElement
563 * 1. java.lang.String fileName;
565 * 3. java.lang.String declaringClass;
566 * 4. java.lang.String methodName;
567 * 5. boolean isNative;
569 class java_lang_StackTraceElement : public java_lang_Object, private FieldAccess {
571 // Static offsets of the object's instance fields.
572 // TODO These offsets need to be checked on VM startup.
573 static const off_t offset_fileName = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
574 static const off_t offset_lineNumber = MEMORY_ALIGN(offset_fileName + SIZEOF_VOID_P, sizeof(int32_t));
575 static const off_t offset_declaringClass = MEMORY_ALIGN(offset_lineNumber + sizeof(int32_t), SIZEOF_VOID_P);
576 static const off_t offset_methodName = MEMORY_ALIGN(offset_declaringClass + SIZEOF_VOID_P, SIZEOF_VOID_P);
577 static const off_t offset_isNative = MEMORY_ALIGN(offset_methodName + SIZEOF_VOID_P, SIZEOF_VOID_P);
580 java_lang_StackTraceElement(java_handle_t* h) : java_lang_Object(h) {}
581 java_lang_StackTraceElement(java_handle_t* h, java_handle_t* fileName, int32_t lineNumber, java_handle_t* declaringClass, java_handle_t* methodName, uint8_t isNative);
584 inline java_lang_StackTraceElement::java_lang_StackTraceElement(java_handle_t* h, java_handle_t* fileName, int32_t lineNumber, java_handle_t* declaringClass, java_handle_t* methodName, uint8_t isNative) : java_lang_Object(h)
586 java_lang_StackTraceElement((java_handle_t*) h);
588 set(_handle, offset_fileName, fileName);
589 set(_handle, offset_lineNumber, lineNumber);
590 set(_handle, offset_declaringClass, declaringClass);
591 set(_handle, offset_methodName, methodName);
592 set(_handle, offset_isNative, isNative);
597 * GNU Classpath java/lang/String
604 * 3. int cachedHashCode;
607 class java_lang_String : public java_lang_Object, private FieldAccess {
609 // Static offsets of the object's instance fields.
610 // TODO These offsets need to be checked on VM startup.
611 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
612 static const off_t offset_count = MEMORY_ALIGN(offset_value + SIZEOF_VOID_P, sizeof(int32_t));
613 static const off_t offset_cachedHashCode = MEMORY_ALIGN(offset_count + sizeof(int32_t), sizeof(int32_t));
614 static const off_t offset_offset = MEMORY_ALIGN(offset_cachedHashCode + sizeof(int32_t), sizeof(int32_t));
617 java_lang_String(java_handle_t* h) : java_lang_Object(h) {}
618 java_lang_String(jstring h);
619 java_lang_String(java_handle_t* h, java_handle_chararray_t* value, int32_t count, int32_t offset = 0);
622 inline java_handle_chararray_t* get_value () const;
623 inline int32_t get_count () const;
624 inline int32_t get_offset() const;
627 inline void set_value (java_handle_chararray_t* value);
628 inline void set_count (int32_t value);
629 inline void set_offset(int32_t value);
632 inline java_lang_String::java_lang_String(jstring h) : java_lang_Object(h)
634 java_lang_String((java_handle_t*) h);
637 inline java_lang_String::java_lang_String(java_handle_t* h, java_handle_chararray_t* value, int32_t count, int32_t offset) : java_lang_Object(h)
644 inline java_handle_chararray_t* java_lang_String::get_value() const
646 return get<java_handle_chararray_t*>(_handle, offset_value);
649 inline int32_t java_lang_String::get_count() const
651 return get<int32_t>(_handle, offset_count);
654 inline int32_t java_lang_String::get_offset() const
656 return get<int32_t>(_handle, offset_offset);
659 inline void java_lang_String::set_value(java_handle_chararray_t* value)
661 set(_handle, offset_value, value);
664 inline void java_lang_String::set_count(int32_t value)
666 set(_handle, offset_count, value);
669 inline void java_lang_String::set_offset(int32_t value)
671 set(_handle, offset_offset, value);
676 * GNU Classpath java/lang/Thread
681 * 1. java.lang.VMThread vmThread;
682 * 2. java.lang.ThreadGroup group;
683 * 3. java.lang.Runnable runnable;
684 * 4. java.lang.String name;
688 * 8. java.lang.Throwable stillborn;
689 * 9. java.lang.ClassLoader contextClassLoader;
690 * 10. boolean contextClassLoaderIsSystemClassLoader;
692 * 12. java.lang.Object parkBlocker;
693 * 13. gnu.java.util.WeakIdentityHashMap locals;
694 * 14. java_lang_Thread_UncaughtExceptionHandler exceptionHandler;
696 class java_lang_Thread : public java_lang_Object, private FieldAccess {
698 // Static offsets of the object's instance fields.
699 // TODO These offsets need to be checked on VM startup.
700 static const off_t offset_vmThread = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
701 static const off_t offset_group = MEMORY_ALIGN(offset_vmThread + SIZEOF_VOID_P, SIZEOF_VOID_P);
702 static const off_t offset_runnable = MEMORY_ALIGN(offset_group + SIZEOF_VOID_P, SIZEOF_VOID_P);
703 static const off_t offset_name = MEMORY_ALIGN(offset_runnable + SIZEOF_VOID_P, SIZEOF_VOID_P);
704 static const off_t offset_daemon = MEMORY_ALIGN(offset_name + SIZEOF_VOID_P, sizeof(int32_t));
705 static const off_t offset_priority = MEMORY_ALIGN(offset_daemon + sizeof(int32_t), sizeof(int32_t));
706 static const off_t offset_stacksize = MEMORY_ALIGN(offset_priority + sizeof(int32_t), sizeof(int64_t));
707 static const off_t offset_stillborn = MEMORY_ALIGN(offset_stacksize + sizeof(int64_t), SIZEOF_VOID_P);
708 static const off_t offset_contextClassLoader = MEMORY_ALIGN(offset_stillborn + SIZEOF_VOID_P, SIZEOF_VOID_P);
709 static const off_t offset_contextClassLoaderIsSystemClassLoader = MEMORY_ALIGN(offset_contextClassLoader + SIZEOF_VOID_P, SIZEOF_VOID_P);
710 static const off_t offset_threadId = MEMORY_ALIGN(offset_contextClassLoaderIsSystemClassLoader + sizeof(int32_t), sizeof(int64_t));
711 static const off_t offset_parkBlocker = MEMORY_ALIGN(offset_threadId + sizeof(int64_t), SIZEOF_VOID_P);
712 static const off_t offset_locals = MEMORY_ALIGN(offset_parkBlocker + SIZEOF_VOID_P, SIZEOF_VOID_P);
713 static const off_t offset_exceptionHandler = MEMORY_ALIGN(offset_locals + SIZEOF_VOID_P, SIZEOF_VOID_P);
716 java_lang_Thread(java_handle_t* h) : java_lang_Object(h) {}
717 // java_lang_Thread(threadobject* t);
720 inline java_handle_t* get_vmThread () const;
721 inline java_handle_t* get_group () const;
722 inline java_handle_t* get_name () const;
723 inline int32_t get_daemon () const;
724 inline int32_t get_priority () const;
725 inline java_handle_t* get_exceptionHandler() const;
728 inline void set_group(java_handle_t* value);
732 // inline java_lang_Thread::java_lang_Thread(threadobject* t) : java_lang_Object(h)
734 // java_lang_Thread(thread_get_object(t));
738 inline java_handle_t* java_lang_Thread::get_vmThread() const
740 return get<java_handle_t*>(_handle, offset_vmThread);
743 inline java_handle_t* java_lang_Thread::get_group() const
745 return get<java_handle_t*>(_handle, offset_group);
748 inline java_handle_t* java_lang_Thread::get_name() const
750 return get<java_handle_t*>(_handle, offset_name);
753 inline int32_t java_lang_Thread::get_daemon() const
755 return get<int32_t>(_handle, offset_daemon);
758 inline int32_t java_lang_Thread::get_priority() const
760 return get<int32_t>(_handle, offset_priority);
763 inline java_handle_t* java_lang_Thread::get_exceptionHandler() const
765 return get<java_handle_t*>(_handle, offset_exceptionHandler);
769 inline void java_lang_Thread::set_group(java_handle_t* value)
771 set(_handle, offset_group, value);
776 * GNU Classpath java/lang/VMThread
781 * 1. java.lang.Thread thread;
782 * 2. boolean running;
783 * 3. java.lang.VMThread vmdata;
785 class java_lang_VMThread : public java_lang_Object, private FieldAccess {
787 // Static offsets of the object's instance fields.
788 // TODO These offsets need to be checked on VM startup.
789 static const off_t offset_thread = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
790 static const off_t offset_running = MEMORY_ALIGN(offset_thread + SIZEOF_VOID_P, sizeof(int32_t));
791 static const off_t offset_vmdata = MEMORY_ALIGN(offset_running + sizeof(int32_t), SIZEOF_VOID_P);
794 java_lang_VMThread(java_handle_t* h) : java_lang_Object(h) {}
795 java_lang_VMThread(jobject h);
796 java_lang_VMThread(java_handle_t* h, java_handle_t* thread, threadobject* vmdata);
799 inline java_handle_t* get_thread() const;
800 inline threadobject* get_vmdata() const;
803 inline void set_thread(java_handle_t* value);
804 inline void set_vmdata(threadobject* value);
808 inline java_lang_VMThread::java_lang_VMThread(jobject h) : java_lang_Object(h)
810 java_lang_VMThread((java_handle_t*) h);
813 inline java_lang_VMThread::java_lang_VMThread(java_handle_t* h, java_handle_t* thread, threadobject* vmdata) : java_lang_Object(h)
820 inline java_handle_t* java_lang_VMThread::get_thread() const
822 return get<java_handle_t*>(_handle, offset_thread);
825 inline threadobject* java_lang_VMThread::get_vmdata() const
827 return get<threadobject*>(_handle, offset_vmdata);
831 inline void java_lang_VMThread::set_thread(java_handle_t* value)
833 set(_handle, offset_thread, value);
836 inline void java_lang_VMThread::set_vmdata(threadobject* value)
838 set(_handle, offset_vmdata, value);
843 * GNU Classpath java/lang/Throwable
848 * 1. java.lang.String detailMessage;
849 * 2. java.lang.Throwable cause;
850 * 3. java.lang.StackTraceElement[] stackTrace;
851 * 4. java.lang.VMThrowable vmState;
853 class java_lang_Throwable : public java_lang_Object, private FieldAccess {
855 // Static offsets of the object's instance fields.
856 // TODO These offsets need to be checked on VM startup.
857 static const off_t offset_detailMessage = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
858 static const off_t offset_cause = MEMORY_ALIGN(offset_detailMessage + SIZEOF_VOID_P, SIZEOF_VOID_P);
859 static const off_t offset_stackTrace = MEMORY_ALIGN(offset_cause + SIZEOF_VOID_P, SIZEOF_VOID_P);
860 static const off_t offset_vmState = MEMORY_ALIGN(offset_stackTrace + SIZEOF_VOID_P, SIZEOF_VOID_P);
863 java_lang_Throwable(java_handle_t* h) : java_lang_Object(h) {}
866 inline java_handle_t* get_detailMessage() const;
867 inline java_handle_t* get_cause () const;
868 inline java_handle_t* get_vmState () const;
872 inline java_handle_t* java_lang_Throwable::get_detailMessage() const
874 return get<java_handle_t*>(_handle, offset_detailMessage);
877 inline java_handle_t* java_lang_Throwable::get_cause() const
879 return get<java_handle_t*>(_handle, offset_cause);
882 inline java_handle_t* java_lang_Throwable::get_vmState() const
884 return get<java_handle_t*>(_handle, offset_vmState);
889 * GNU Classpath java/lang/VMThrowable
894 * 1. java.lang.Object vmdata;
896 class java_lang_VMThrowable : public java_lang_Object, private FieldAccess {
898 // Static offsets of the object's instance fields.
899 // TODO These offsets need to be checked on VM startup.
900 static const off_t offset_vmdata = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
903 java_lang_VMThrowable(java_handle_t* h) : java_lang_Object(h) {}
904 java_lang_VMThrowable(jobject h);
906 inline java_handle_bytearray_t* get_vmdata() const;
907 inline void set_vmdata(java_handle_bytearray_t* value);
910 inline java_lang_VMThrowable::java_lang_VMThrowable(jobject h) : java_lang_Object(h)
912 java_lang_VMThrowable((java_handle_t*) h);
915 inline java_handle_bytearray_t* java_lang_VMThrowable::get_vmdata() const
917 return get<java_handle_bytearray_t*>(_handle, offset_vmdata);
920 inline void java_lang_VMThrowable::set_vmdata(java_handle_bytearray_t* value)
922 set(_handle, offset_vmdata, value);
927 * GNU Classpath java/lang/reflect/VMConstructor
932 * 1. java.lang.Class clazz;
934 * 3. byte[] annotations;
935 * 4. byte[] parameterAnnotations;
936 * 5. java.util.Map declaredAnnotations;
937 * 6. java.lang.reflect.Constructor cons;
939 class java_lang_reflect_VMConstructor : public java_lang_Object, private FieldAccess {
941 // Static offsets of the object's instance fields.
942 // TODO These offsets need to be checked on VM startup.
943 static const off_t offset_clazz = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
944 static const off_t offset_slot = MEMORY_ALIGN(offset_clazz + SIZEOF_VOID_P, sizeof(int32_t));
945 static const off_t offset_annotations = MEMORY_ALIGN(offset_slot + sizeof(int32_t), SIZEOF_VOID_P);
946 static const off_t offset_parameterAnnotations = MEMORY_ALIGN(offset_annotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
947 static const off_t offset_declaredAnnotations = MEMORY_ALIGN(offset_parameterAnnotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
948 static const off_t offset_cons = MEMORY_ALIGN(offset_declaredAnnotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
951 java_lang_reflect_VMConstructor(java_handle_t* h) : java_lang_Object(h) {}
952 java_lang_reflect_VMConstructor(jobject h);
953 java_lang_reflect_VMConstructor(methodinfo* m);
956 inline classinfo* get_clazz () const;
957 inline int32_t get_slot () const;
958 inline java_handle_bytearray_t* get_annotations () const;
959 inline java_handle_bytearray_t* get_parameterAnnotations() const;
960 inline java_handle_t* get_declaredAnnotations () const;
961 inline java_handle_t* get_cons () const;
964 inline void set_clazz (classinfo* value);
965 inline void set_slot (int32_t value);
966 inline void set_annotations (java_handle_bytearray_t* value);
967 inline void set_parameterAnnotations(java_handle_bytearray_t* value);
968 inline void set_declaredAnnotations (java_handle_t* value);
969 inline void set_cons (java_handle_t* value);
971 // Convenience functions.
972 inline methodinfo* get_method();
976 inline java_lang_reflect_VMConstructor::java_lang_reflect_VMConstructor(jobject h) : java_lang_Object(h)
978 java_lang_reflect_VMConstructor((java_handle_t*) h);
981 inline java_lang_reflect_VMConstructor::java_lang_reflect_VMConstructor(methodinfo* m)
983 _handle = builtin_new(class_java_lang_reflect_VMConstructor);
988 int slot = m - m->clazz->methods;
989 java_handle_bytearray_t* annotations = method_get_annotations(m);
990 java_handle_bytearray_t* parameterAnnotations = method_get_parameterannotations(m);
994 set_annotations(annotations);
995 set_parameterAnnotations(parameterAnnotations);
999 inline classinfo* java_lang_reflect_VMConstructor::get_clazz() const
1001 return get<classinfo*>(_handle, offset_clazz);
1004 inline int32_t java_lang_reflect_VMConstructor::get_slot() const
1006 return get<int32_t>(_handle, offset_slot);
1009 inline java_handle_bytearray_t* java_lang_reflect_VMConstructor::get_annotations() const
1011 return get<java_handle_bytearray_t*>(_handle, offset_annotations);
1014 inline java_handle_bytearray_t* java_lang_reflect_VMConstructor::get_parameterAnnotations() const
1016 return get<java_handle_bytearray_t*>(_handle, offset_parameterAnnotations);
1019 inline java_handle_t* java_lang_reflect_VMConstructor::get_declaredAnnotations() const
1021 return get<java_handle_t*>(_handle, offset_declaredAnnotations);
1024 inline java_handle_t* java_lang_reflect_VMConstructor::get_cons() const
1026 return get<java_handle_t*>(_handle, offset_cons);
1029 inline void java_lang_reflect_VMConstructor::set_clazz(classinfo* value)
1031 set(_handle, offset_clazz, value);
1034 inline void java_lang_reflect_VMConstructor::set_slot(int32_t value)
1036 set(_handle, offset_slot, value);
1039 inline void java_lang_reflect_VMConstructor::set_annotations(java_handle_bytearray_t* value)
1041 set(_handle, offset_annotations, value);
1044 inline void java_lang_reflect_VMConstructor::set_parameterAnnotations(java_handle_bytearray_t* value)
1046 set(_handle, offset_parameterAnnotations, value);
1049 inline void java_lang_reflect_VMConstructor::set_declaredAnnotations(java_handle_t* value)
1051 set(_handle, offset_declaredAnnotations, value);
1054 inline void java_lang_reflect_VMConstructor::set_cons(java_handle_t* value)
1056 set(_handle, offset_cons, value);
1059 inline methodinfo* java_lang_reflect_VMConstructor::get_method()
1061 classinfo* c = get_clazz();
1062 int32_t slot = get_slot();
1063 methodinfo* m = &(c->methods[slot]);
1069 * GNU Classpath java/lang/reflect/Constructor
1075 * 2. gnu.java.lang.reflect.MethodSignatureParser p;
1076 * 3. java.lang.reflect.VMConstructor cons;
1078 class java_lang_reflect_Constructor : public java_lang_Object, private FieldAccess {
1080 // Static offsets of the object's instance fields.
1081 // TODO These offsets need to be checked on VM startup.
1082 static const off_t offset_flag = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
1083 static const off_t offset_p = MEMORY_ALIGN(offset_flag + sizeof(int32_t), SIZEOF_VOID_P);
1084 static const off_t offset_cons = MEMORY_ALIGN(offset_p + SIZEOF_VOID_P, SIZEOF_VOID_P);
1087 java_lang_reflect_Constructor(java_handle_t* h) : java_lang_Object(h) {}
1088 java_lang_reflect_Constructor(jobject h);
1089 java_lang_reflect_Constructor(methodinfo* m);
1091 java_handle_t* new_instance(java_handle_objectarray_t* args);
1094 inline int32_t get_flag() const;
1095 inline java_handle_t* get_cons() const;
1098 inline void set_cons(java_handle_t* value);
1100 // Convenience functions.
1101 inline methodinfo* get_method () const;
1102 inline int32_t get_override() const;
1106 inline java_lang_reflect_Constructor::java_lang_reflect_Constructor(jobject h) : java_lang_Object(h)
1108 java_lang_reflect_Constructor((java_handle_t*) h);
1111 inline java_lang_reflect_Constructor::java_lang_reflect_Constructor(methodinfo* m)
1113 java_lang_reflect_VMConstructor jlrvmc(m);
1115 if (jlrvmc.is_null())
1118 _handle = builtin_new(class_java_lang_reflect_Constructor);
1123 // Link the two Java objects.
1124 set_cons(jlrvmc.get_handle());
1125 jlrvmc.set_cons(get_handle());
1129 inline int32_t java_lang_reflect_Constructor::get_flag() const
1131 return get<int32_t>(_handle, offset_flag);
1134 inline java_handle_t* java_lang_reflect_Constructor::get_cons() const
1136 return get<java_handle_t*>(_handle, offset_cons);
1140 inline void java_lang_reflect_Constructor::set_cons(java_handle_t* value)
1142 set(_handle, offset_cons, value);
1146 inline methodinfo* java_lang_reflect_Constructor::get_method() const
1148 java_lang_reflect_VMConstructor jlrvmc(get_cons());
1149 return jlrvmc.get_method();
1152 inline int32_t java_lang_reflect_Constructor::get_override() const
1159 * GNU Classpath java/lang/reflect/VMField
1164 * 1. java.lang.Class clazz;
1165 * 2. java.lang.String name;
1167 * 4. byte[] annotations;
1168 * 5. java.lang.Map declaredAnnotations;
1169 * 6. java.lang.reflect.Field f;
1171 class java_lang_reflect_VMField : public java_lang_Object, private FieldAccess {
1173 // Static offsets of the object's instance fields.
1174 // TODO These offsets need to be checked on VM startup.
1175 static const off_t offset_clazz = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
1176 static const off_t offset_name = MEMORY_ALIGN(offset_clazz + SIZEOF_VOID_P, SIZEOF_VOID_P);
1177 static const off_t offset_slot = MEMORY_ALIGN(offset_name + SIZEOF_VOID_P, sizeof(int32_t));
1178 static const off_t offset_annotations = MEMORY_ALIGN(offset_slot + sizeof(int32_t), SIZEOF_VOID_P);
1179 static const off_t offset_declaredAnnotations = MEMORY_ALIGN(offset_annotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
1180 static const off_t offset_f = MEMORY_ALIGN(offset_declaredAnnotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
1183 java_lang_reflect_VMField(java_handle_t* h) : java_lang_Object(h) {}
1184 java_lang_reflect_VMField(jobject h);
1185 java_lang_reflect_VMField(fieldinfo* f);
1188 inline classinfo* get_clazz () const;
1189 inline int32_t get_slot () const;
1190 inline java_handle_bytearray_t* get_annotations () const;
1191 inline java_handle_t* get_declaredAnnotations() const;
1192 inline java_handle_t* get_f () const;
1195 inline void set_clazz (classinfo* value);
1196 inline void set_name (java_handle_t* value);
1197 inline void set_slot (int32_t value);
1198 inline void set_annotations (java_handle_bytearray_t* value);
1199 inline void set_declaredAnnotations(java_handle_t* value);
1200 inline void set_f (java_handle_t* value);
1202 // Convenience functions.
1203 inline fieldinfo* get_field() const;
1207 inline java_lang_reflect_VMField::java_lang_reflect_VMField(jobject h) : java_lang_Object(h)
1209 java_lang_reflect_VMField((java_handle_t*) h);
1212 inline java_lang_reflect_VMField::java_lang_reflect_VMField(fieldinfo* f)
1214 _handle = builtin_new(class_java_lang_reflect_VMField);
1219 java_handle_t* name = javastring_intern(javastring_new(f->name));
1220 int slot = f - f->clazz->fields;
1221 java_handle_bytearray_t* annotations = field_get_annotations(f);
1223 set_clazz(f->clazz);
1226 set_annotations(annotations);
1230 inline classinfo* java_lang_reflect_VMField::get_clazz() const
1232 return get<classinfo*>(_handle, offset_clazz);
1235 inline int32_t java_lang_reflect_VMField::get_slot() const
1237 return get<int32_t>(_handle, offset_slot);
1240 inline java_handle_bytearray_t* java_lang_reflect_VMField::get_annotations() const
1242 return get<java_handle_bytearray_t*>(_handle, offset_annotations);
1245 inline java_handle_t* java_lang_reflect_VMField::get_declaredAnnotations() const
1247 return get<java_handle_t*>(_handle, offset_declaredAnnotations);
1250 inline java_handle_t* java_lang_reflect_VMField::get_f() const
1252 return get<java_handle_t*>(_handle, offset_f);
1256 inline void java_lang_reflect_VMField::set_clazz(classinfo* value)
1258 set(_handle, offset_clazz, value);
1261 inline void java_lang_reflect_VMField::set_name(java_handle_t* value)
1263 set(_handle, offset_name, value);
1266 inline void java_lang_reflect_VMField::set_slot(int32_t value)
1268 set(_handle, offset_slot, value);
1271 inline void java_lang_reflect_VMField::set_annotations(java_handle_bytearray_t* value)
1273 set(_handle, offset_annotations, value);
1276 inline void java_lang_reflect_VMField::set_declaredAnnotations(java_handle_t* value)
1278 set(_handle, offset_declaredAnnotations, value);
1281 inline void java_lang_reflect_VMField::set_f(java_handle_t* value)
1283 set(_handle, offset_f, value);
1286 inline fieldinfo* java_lang_reflect_VMField::get_field() const
1288 classinfo* c = get_clazz();
1289 int32_t slot = get_slot();
1290 fieldinfo* f = &(c->fields[slot]);
1296 * GNU Classpath java/lang/reflect/Field
1302 * 2. gnu.java.lang.reflect.FieldSignatureParser p;
1303 * 3. java.lang.reflect.VMField f;
1305 class java_lang_reflect_Field : public java_lang_Object, private FieldAccess {
1307 // Static offsets of the object's instance fields.
1308 // TODO These offsets need to be checked on VM startup.
1309 static const off_t offset_flag = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
1310 static const off_t offset_p = MEMORY_ALIGN(offset_flag + sizeof(int32_t), SIZEOF_VOID_P);
1311 static const off_t offset_f = MEMORY_ALIGN(offset_p + SIZEOF_VOID_P, SIZEOF_VOID_P);
1314 java_lang_reflect_Field(java_handle_t* h) : java_lang_Object(h) {}
1315 java_lang_reflect_Field(jobject h);
1316 java_lang_reflect_Field(fieldinfo* f);
1319 inline int32_t get_flag() const;
1320 inline java_handle_t* get_f() const;
1323 inline void set_f(java_handle_t* value);
1325 // Convenience functions.
1326 inline fieldinfo* get_field() const;
1330 inline java_lang_reflect_Field::java_lang_reflect_Field(jobject h) : java_lang_Object(h)
1332 java_lang_reflect_Field((java_handle_t*) h);
1335 inline java_lang_reflect_Field::java_lang_reflect_Field(fieldinfo* f)
1337 java_lang_reflect_VMField jlrvmf(f);
1339 if (jlrvmf.is_null())
1342 _handle = builtin_new(class_java_lang_reflect_Field);
1347 // Link the two Java objects.
1348 set_f(jlrvmf.get_handle());
1349 jlrvmf.set_f(get_handle());
1353 inline int32_t java_lang_reflect_Field::get_flag() const
1355 return get<int32_t>(_handle, offset_flag);
1358 inline java_handle_t* java_lang_reflect_Field::get_f() const
1360 return get<java_handle_t*>(_handle, offset_f);
1364 inline void java_lang_reflect_Field::set_f(java_handle_t* value)
1366 set(_handle, offset_f, value);
1370 inline fieldinfo* java_lang_reflect_Field::get_field() const
1372 java_lang_reflect_VMField jlrvmf(get_f());
1373 return jlrvmf.get_field();
1378 * GNU Classpath java/lang/reflect/VMMethod
1383 * 1. java.lang.Class clazz;
1384 * 2. java.lang.String name;
1386 * 4. byte[] annotations;
1387 * 5. byte[] parameterAnnotations;
1388 * 6. byte[] annotationDefault;
1389 * 7. java.lang.Map declaredAnnotations;
1390 * 8. java.lang.reflect.Method m;
1392 class java_lang_reflect_VMMethod : public java_lang_Object, private FieldAccess {
1394 // Static offsets of the object's instance fields.
1395 // TODO These offsets need to be checked on VM startup.
1396 static const off_t offset_clazz = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
1397 static const off_t offset_name = MEMORY_ALIGN(offset_clazz + SIZEOF_VOID_P, SIZEOF_VOID_P);
1398 static const off_t offset_slot = MEMORY_ALIGN(offset_name + SIZEOF_VOID_P, sizeof(int32_t));
1399 static const off_t offset_annotations = MEMORY_ALIGN(offset_slot + sizeof(int32_t), SIZEOF_VOID_P);
1400 static const off_t offset_parameterAnnotations = MEMORY_ALIGN(offset_annotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
1401 static const off_t offset_annotationDefault = MEMORY_ALIGN(offset_parameterAnnotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
1402 static const off_t offset_declaredAnnotations = MEMORY_ALIGN(offset_annotationDefault + SIZEOF_VOID_P, SIZEOF_VOID_P);
1403 static const off_t offset_m = MEMORY_ALIGN(offset_declaredAnnotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
1406 java_lang_reflect_VMMethod(java_handle_t* h) : java_lang_Object(h) {}
1407 java_lang_reflect_VMMethod(jobject h);
1408 java_lang_reflect_VMMethod(methodinfo* m);
1411 inline classinfo* get_clazz () const;
1412 inline int32_t get_slot () const;
1413 inline java_handle_bytearray_t* get_annotations () const;
1414 inline java_handle_bytearray_t* get_parameterAnnotations() const;
1415 inline java_handle_bytearray_t* get_annotationDefault () const;
1416 inline java_handle_t* get_declaredAnnotations () const;
1417 inline java_handle_t* get_m () const;
1420 inline void set_clazz (classinfo* value);
1421 inline void set_name (java_handle_t* value);
1422 inline void set_slot (int32_t value);
1423 inline void set_annotations (java_handle_bytearray_t* value);
1424 inline void set_parameterAnnotations(java_handle_bytearray_t* value);
1425 inline void set_annotationDefault (java_handle_bytearray_t* value);
1426 inline void set_declaredAnnotations (java_handle_t* value);
1427 inline void set_m (java_handle_t* value);
1429 // Convenience functions.
1430 inline methodinfo* get_method() const;
1433 inline java_lang_reflect_VMMethod::java_lang_reflect_VMMethod(jobject h) : java_lang_Object(h)
1435 java_lang_reflect_VMMethod((java_handle_t*) h);
1438 inline java_lang_reflect_VMMethod::java_lang_reflect_VMMethod(methodinfo* m)
1440 _handle = builtin_new(class_java_lang_reflect_VMMethod);
1445 java_handle_t* name = javastring_intern(javastring_new(m->name));
1446 int slot = m - m->clazz->methods;
1447 java_handle_bytearray_t* annotations = method_get_annotations(m);
1448 java_handle_bytearray_t* parameterAnnotations = method_get_parameterannotations(m);
1449 java_handle_bytearray_t* annotationDefault = method_get_annotationdefault(m);
1451 set_clazz(m->clazz);
1454 set_annotations(annotations);
1455 set_parameterAnnotations(parameterAnnotations);
1456 set_annotationDefault(annotationDefault);
1459 inline classinfo* java_lang_reflect_VMMethod::get_clazz() const
1461 return get<classinfo*>(_handle, offset_clazz);
1464 inline int32_t java_lang_reflect_VMMethod::get_slot() const
1466 return get<int32_t>(_handle, offset_slot);
1469 inline java_handle_bytearray_t* java_lang_reflect_VMMethod::get_annotations() const
1471 return get<java_handle_bytearray_t*>(_handle, offset_annotations);
1474 inline java_handle_bytearray_t* java_lang_reflect_VMMethod::get_parameterAnnotations() const
1476 return get<java_handle_bytearray_t*>(_handle, offset_parameterAnnotations);
1479 inline java_handle_bytearray_t* java_lang_reflect_VMMethod::get_annotationDefault() const
1481 return get<java_handle_bytearray_t*>(_handle, offset_annotationDefault);
1484 inline java_handle_t* java_lang_reflect_VMMethod::get_declaredAnnotations() const
1486 return get<java_handle_t*>(_handle, offset_declaredAnnotations);
1489 inline java_handle_t* java_lang_reflect_VMMethod::get_m() const
1491 return get<java_handle_t*>(_handle, offset_m);
1494 inline void java_lang_reflect_VMMethod::set_clazz(classinfo* value)
1496 set(_handle, offset_clazz, value);
1499 inline void java_lang_reflect_VMMethod::set_name(java_handle_t* value)
1501 set(_handle, offset_name, value);
1504 inline void java_lang_reflect_VMMethod::set_slot(int32_t value)
1506 set(_handle, offset_slot, value);
1509 inline void java_lang_reflect_VMMethod::set_annotations(java_handle_bytearray_t* value)
1511 set(_handle, offset_annotations, value);
1514 inline void java_lang_reflect_VMMethod::set_parameterAnnotations(java_handle_bytearray_t* value)
1516 set(_handle, offset_parameterAnnotations, value);
1519 inline void java_lang_reflect_VMMethod::set_annotationDefault(java_handle_bytearray_t* value)
1521 set(_handle, offset_annotationDefault, value);
1524 inline void java_lang_reflect_VMMethod::set_declaredAnnotations(java_handle_t* value)
1526 set(_handle, offset_declaredAnnotations, value);
1529 inline void java_lang_reflect_VMMethod::set_m(java_handle_t* value)
1531 set(_handle, offset_m, value);
1534 inline methodinfo* java_lang_reflect_VMMethod::get_method() const
1536 classinfo* c = get_clazz();
1537 int32_t slot = get_slot();
1538 methodinfo* m = &(c->methods[slot]);
1544 * GNU Classpath java/lang/reflect/Method
1550 * 2. gnu.java.lang.reflect.MethodSignatureParser p;
1551 * 3. java.lang.reflect.VMMethod m;
1553 class java_lang_reflect_Method : public java_lang_Object, private FieldAccess {
1555 // Static offsets of the object's instance fields.
1556 // TODO These offsets need to be checked on VM startup.
1557 static const off_t offset_flag = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
1558 static const off_t offset_p = MEMORY_ALIGN(offset_flag + sizeof(int32_t), SIZEOF_VOID_P);
1559 static const off_t offset_m = MEMORY_ALIGN(offset_p + SIZEOF_VOID_P, SIZEOF_VOID_P);
1562 java_lang_reflect_Method(java_handle_t* h) : java_lang_Object(h) {}
1563 java_lang_reflect_Method(jobject h);
1564 java_lang_reflect_Method(methodinfo* m);
1566 java_handle_t* invoke(java_handle_t* o, java_handle_objectarray_t* args);
1569 inline int32_t get_flag() const;
1570 inline java_handle_t* get_m() const;
1573 inline void set_m(java_handle_t* value);
1575 // Convenience functions.
1576 inline methodinfo* get_method () const;
1577 inline int32_t get_override() const;
1581 inline java_lang_reflect_Method::java_lang_reflect_Method(jobject h) : java_lang_Object(h)
1583 java_lang_reflect_Method((java_handle_t*) h);
1586 inline java_lang_reflect_Method::java_lang_reflect_Method(methodinfo* m)
1588 java_lang_reflect_VMMethod jlrvmm(m);
1590 if (jlrvmm.is_null())
1593 _handle = builtin_new(class_java_lang_reflect_Method);
1598 // Link the two Java objects.
1599 set_m(jlrvmm.get_handle());
1600 jlrvmm.set_m(get_handle());
1604 inline int32_t java_lang_reflect_Method::get_flag() const
1606 return get<int32_t>(_handle, offset_flag);
1609 inline java_handle_t* java_lang_reflect_Method::get_m() const
1611 return get<java_handle_t*>(_handle, offset_m);
1615 inline void java_lang_reflect_Method::set_m(java_handle_t* value)
1617 set(_handle, offset_m, value);
1621 inline methodinfo* java_lang_reflect_Method::get_method() const
1623 java_lang_reflect_VMMethod jlrvmm(get_m());
1624 return jlrvmm.get_method();
1627 inline int32_t java_lang_reflect_Method::get_override() const
1634 * GNU Classpath java/nio/Buffer
1643 * 5. gnu.classpath.Pointer address;
1645 class java_nio_Buffer : public java_lang_Object, private FieldAccess {
1647 // Static offsets of the object's instance fields.
1648 // TODO These offsets need to be checked on VM startup.
1649 static const off_t offset_cap = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
1650 static const off_t offset_limit = MEMORY_ALIGN(offset_cap + sizeof(int32_t), sizeof(int32_t));
1651 static const off_t offset_pos = MEMORY_ALIGN(offset_limit + sizeof(int32_t), sizeof(int32_t));
1652 static const off_t offset_mark = MEMORY_ALIGN(offset_pos + sizeof(int32_t), sizeof(int32_t));
1653 static const off_t offset_address = MEMORY_ALIGN(offset_mark + sizeof(int32_t), SIZEOF_VOID_P);
1656 java_nio_Buffer(java_handle_t* h) : java_lang_Object(h) {}
1659 inline int32_t get_cap() const;
1662 inline int32_t java_nio_Buffer::get_cap() const
1664 return get<int32_t>(_handle, offset_cap);
1669 * GNU Classpath java/nio/DirectByteBufferImpl
1678 * 5. gnu.classpath.Pointer address;
1679 * 6. java.nio.ByteOrder endian;
1680 * 7. byte[] backing_buffer;
1681 * 8. int array_offset;
1682 * 9. java.lang.Object owner;
1684 class java_nio_DirectByteBufferImpl : public java_lang_Object, private FieldAccess {
1686 // Static offsets of the object's instance fields.
1687 // TODO These offsets need to be checked on VM startup.
1688 static const off_t offset_cap = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
1689 static const off_t offset_limit = MEMORY_ALIGN(offset_cap + sizeof(int32_t), sizeof(int32_t));
1690 static const off_t offset_pos = MEMORY_ALIGN(offset_limit + sizeof(int32_t), sizeof(int32_t));
1691 static const off_t offset_mark = MEMORY_ALIGN(offset_pos + sizeof(int32_t), sizeof(int32_t));
1692 static const off_t offset_address = MEMORY_ALIGN(offset_mark + sizeof(int32_t), SIZEOF_VOID_P);
1693 static const off_t offset_endian = MEMORY_ALIGN(offset_address + SIZEOF_VOID_P, SIZEOF_VOID_P);
1694 static const off_t offset_backing_buffer = MEMORY_ALIGN(offset_endian + SIZEOF_VOID_P, SIZEOF_VOID_P);
1695 static const off_t offset_array_offset = MEMORY_ALIGN(offset_backing_buffer + SIZEOF_VOID_P, sizeof(int32_t));
1696 static const off_t offset_owner = MEMORY_ALIGN(offset_array_offset + sizeof(int32_t), SIZEOF_VOID_P);
1699 java_nio_DirectByteBufferImpl(java_handle_t* h) : java_lang_Object(h) {}
1700 java_nio_DirectByteBufferImpl(jobject h);
1703 inline java_handle_t* get_address() const;
1706 inline java_nio_DirectByteBufferImpl::java_nio_DirectByteBufferImpl(jobject h) : java_lang_Object(h)
1708 java_nio_DirectByteBufferImpl((java_handle_t*) h);
1711 inline java_handle_t* java_nio_DirectByteBufferImpl::get_address() const
1713 return get<java_handle_t*>(_handle, offset_address);
1718 * GNU Classpath gnu/classpath/Pointer
1720 * Actually there are two classes, gnu.classpath.Pointer32 and
1721 * gnu.classpath.Pointer64, but we only define the abstract super
1722 * class and use the int/long field as void* type.
1729 class gnu_classpath_Pointer : public java_lang_Object, private FieldAccess {
1731 // Static offsets of the object's instance fields.
1732 // TODO These offsets need to be checked on VM startup.
1733 static const off_t offset_data = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
1736 gnu_classpath_Pointer(java_handle_t* h) : java_lang_Object(h) {}
1737 gnu_classpath_Pointer(java_handle_t* h, void* data);
1740 inline void* get_data() const;
1743 inline void set_data(void* value);
1746 inline gnu_classpath_Pointer::gnu_classpath_Pointer(java_handle_t* h, void* data) : java_lang_Object(h)
1751 inline void* gnu_classpath_Pointer::get_data() const
1753 return get<void*>(_handle, offset_data);
1756 inline void gnu_classpath_Pointer::set_data(void* value)
1758 set(_handle, offset_data, value);
1761 #endif // WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH
1764 #if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
1767 * OpenJDK java/lang/AssertionStatusDirectives
1772 * 1. java.lang.String[] classes;
1773 * 2. boolean[] classEnabled;
1774 * 3. java.lang.String[] packages;
1775 * 4. boolean[] packageEnabled;
1778 class java_lang_AssertionStatusDirectives : public java_lang_Object, private FieldAccess {
1780 // Static offsets of the object's instance fields.
1781 // TODO These offsets need to be checked on VM startup.
1782 static const off_t offset_classes = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
1783 static const off_t offset_classEnabled = MEMORY_ALIGN(offset_classes + SIZEOF_VOID_P, SIZEOF_VOID_P);
1784 static const off_t offset_packages = MEMORY_ALIGN(offset_classEnabled + SIZEOF_VOID_P, SIZEOF_VOID_P);
1785 static const off_t offset_packageEnabled = MEMORY_ALIGN(offset_packages + SIZEOF_VOID_P, SIZEOF_VOID_P);
1786 static const off_t offset_deflt = MEMORY_ALIGN(offset_packageEnabled + SIZEOF_VOID_P, sizeof(int32_t));
1789 java_lang_AssertionStatusDirectives(java_handle_objectarray_t* classes, java_handle_booleanarray_t* classEnabled, java_handle_objectarray_t* packages, java_handle_booleanarray_t* packageEnabled);
1792 inline java_lang_AssertionStatusDirectives::java_lang_AssertionStatusDirectives(java_handle_objectarray_t* classes, java_handle_booleanarray_t* classEnabled, java_handle_objectarray_t* packages, java_handle_booleanarray_t* packageEnabled)
1794 classinfo* c = load_class_bootstrap(utf_new_char("java/lang/AssertionStatusDirectives"));
1796 // FIXME Load the class at VM startup.
1800 _handle = builtin_new(c);
1805 set(_handle, offset_classes, classes);
1806 set(_handle, offset_classEnabled, classEnabled);
1807 set(_handle, offset_packages, packages);
1808 set(_handle, offset_packageEnabled, packageEnabled);
1813 * OpenJDK java/lang/StackTraceElement
1818 * 1. java.lang.String declaringClass;
1819 * 2. java.lang.String methodName;
1820 * 3. java.lang.String fileName;
1821 * 4. int lineNumber;
1823 class java_lang_StackTraceElement : public java_lang_Object, private FieldAccess {
1825 // Static offsets of the object's instance fields.
1826 // TODO These offsets need to be checked on VM startup.
1827 static const off_t offset_declaringClass = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
1828 static const off_t offset_methodName = MEMORY_ALIGN(offset_declaringClass + SIZEOF_VOID_P, SIZEOF_VOID_P);
1829 static const off_t offset_fileName = MEMORY_ALIGN(offset_methodName + SIZEOF_VOID_P, SIZEOF_VOID_P);
1830 static const off_t offset_lineNumber = MEMORY_ALIGN(offset_fileName + SIZEOF_VOID_P, sizeof(int32_t));
1833 java_lang_StackTraceElement(java_handle_t* h) : java_lang_Object(h) {}
1834 java_lang_StackTraceElement(java_handle_t* declaringClass, java_handle_t* methodName, java_handle_t* fileName, int32_t lineNumber);
1837 inline java_lang_StackTraceElement::java_lang_StackTraceElement(java_handle_t* declaringClass, java_handle_t* methodName, java_handle_t* fileName, int32_t lineNumber)
1839 _handle = builtin_new(class_java_lang_StackTraceElement);
1844 set(_handle, offset_declaringClass, declaringClass);
1845 set(_handle, offset_methodName, methodName);
1846 set(_handle, offset_fileName, fileName);
1847 set(_handle, offset_lineNumber, lineNumber);
1852 * OpenJDK java/lang/String
1862 class java_lang_String : public java_lang_Object, private FieldAccess {
1864 // Static offsets of the object's instance fields.
1865 // TODO These offsets need to be checked on VM startup.
1866 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
1867 static const off_t offset_offset = MEMORY_ALIGN(offset_value + SIZEOF_VOID_P, sizeof(int32_t));
1868 static const off_t offset_count = MEMORY_ALIGN(offset_offset + sizeof(int32_t), sizeof(int32_t));
1869 static const off_t offset_hash = MEMORY_ALIGN(offset_count + sizeof(int32_t), sizeof(int32_t));
1872 java_lang_String(java_handle_t* h) : java_lang_Object(h) {}
1873 java_lang_String(jstring h);
1874 java_lang_String(java_handle_t* h, java_handle_chararray_t* value, int32_t count, int32_t offset = 0);
1877 inline java_handle_chararray_t* get_value () const;
1878 inline int32_t get_offset() const;
1879 inline int32_t get_count () const;
1882 inline void set_value (java_handle_chararray_t* value);
1883 inline void set_offset(int32_t value);
1884 inline void set_count (int32_t value);
1887 inline java_lang_String::java_lang_String(jstring h) : java_lang_Object(h)
1889 java_lang_String((java_handle_t*) h);
1892 inline java_lang_String::java_lang_String(java_handle_t* h, java_handle_chararray_t* value, int32_t count, int32_t offset) : java_lang_Object(h)
1899 inline java_handle_chararray_t* java_lang_String::get_value() const
1901 return get<java_handle_chararray_t*>(_handle, offset_value);
1904 inline int32_t java_lang_String::get_offset() const
1906 return get<int32_t>(_handle, offset_offset);
1909 inline int32_t java_lang_String::get_count() const
1911 return get<int32_t>(_handle, offset_count);
1914 inline void java_lang_String::set_value(java_handle_chararray_t* value)
1916 set(_handle, offset_value, value);
1919 inline void java_lang_String::set_offset(int32_t value)
1921 set(_handle, offset_offset, value);
1924 inline void java_lang_String::set_count(int32_t value)
1926 set(_handle, offset_count, value);
1931 * OpenJDK java/lang/Thread
1938 * 3. java_lang_Thread threadQ;
1940 * 5. boolean single_step;
1941 * 6. boolean daemon;
1942 * 7. boolean stillborn;
1943 * 8. java_lang_Runnable target;
1944 * 9. java_lang_ThreadGroup group;
1945 * 10. java_lang_ClassLoader contextClassLoader;
1946 * 11. java_security_AccessControlContext inheritedAccessControlContext;
1947 * 12. java_lang_ThreadLocal_ThreadLocalMap threadLocals;
1948 * 13. java_lang_ThreadLocal_ThreadLocalMap inheritableThreadLocals;
1949 * 14. long stackSize;
1950 * 15. long nativeParkEventPointer;
1952 * 17. int threadStatus;
1953 * 18. java_lang_Object parkBlocker;
1954 * 19. sun_nio_ch_Interruptible blocker;
1955 * 20. java_lang_Object blockerLock;
1956 * 21. boolean stopBeforeStart;
1957 * 22. java_lang_Throwable throwableFromStop;
1958 * 23. java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler;
1960 class java_lang_Thread : public java_lang_Object, private FieldAccess {
1962 // Static offsets of the object's instance fields.
1963 // TODO These offsets need to be checked on VM startup.
1964 static const off_t offset_name = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
1965 static const off_t offset_priority = MEMORY_ALIGN(offset_name + SIZEOF_VOID_P, sizeof(int32_t));
1966 static const off_t offset_threadQ = MEMORY_ALIGN(offset_priority + sizeof(int32_t), SIZEOF_VOID_P);
1967 static const off_t offset_eetop = MEMORY_ALIGN(offset_threadQ + SIZEOF_VOID_P, sizeof(int64_t));
1968 static const off_t offset_single_step = MEMORY_ALIGN(offset_eetop + sizeof(int64_t), sizeof(int32_t));
1969 static const off_t offset_daemon = MEMORY_ALIGN(offset_single_step + sizeof(int32_t), sizeof(int32_t));
1970 static const off_t offset_stillborn = MEMORY_ALIGN(offset_daemon + sizeof(int32_t), sizeof(int32_t));
1971 static const off_t offset_target = MEMORY_ALIGN(offset_stillborn + sizeof(int32_t), SIZEOF_VOID_P);
1972 static const off_t offset_group = MEMORY_ALIGN(offset_target + SIZEOF_VOID_P, SIZEOF_VOID_P);
1973 static const off_t offset_contextClassLoader = MEMORY_ALIGN(offset_group + SIZEOF_VOID_P, SIZEOF_VOID_P);
1974 static const off_t offset_inheritedAccessControlContext = MEMORY_ALIGN(offset_contextClassLoader + SIZEOF_VOID_P, SIZEOF_VOID_P);
1975 static const off_t offset_threadLocals = MEMORY_ALIGN(offset_inheritedAccessControlContext + SIZEOF_VOID_P, SIZEOF_VOID_P);
1976 static const off_t offset_inheritableThreadLocals = MEMORY_ALIGN(offset_threadLocals + SIZEOF_VOID_P, SIZEOF_VOID_P);
1977 static const off_t offset_stackSize = MEMORY_ALIGN(offset_inheritableThreadLocals + SIZEOF_VOID_P, sizeof(int64_t));
1978 static const off_t offset_nativeParkEventPointer = MEMORY_ALIGN(offset_stackSize + sizeof(int64_t), sizeof(int64_t));
1979 static const off_t offset_tid = MEMORY_ALIGN(offset_nativeParkEventPointer + sizeof(int64_t), sizeof(int64_t));
1980 static const off_t offset_threadStatus = MEMORY_ALIGN(offset_tid + sizeof(int64_t), sizeof(int32_t));
1981 static const off_t offset_parkBlocker = MEMORY_ALIGN(offset_threadStatus + sizeof(int32_t), SIZEOF_VOID_P);
1982 static const off_t offset_blocker = MEMORY_ALIGN(offset_parkBlocker + SIZEOF_VOID_P, SIZEOF_VOID_P);
1983 static const off_t offset_blockerLock = MEMORY_ALIGN(offset_blocker + SIZEOF_VOID_P, SIZEOF_VOID_P);
1984 static const off_t offset_stopBeforeStart = MEMORY_ALIGN(offset_blockerLock + SIZEOF_VOID_P, sizeof(int32_t));
1985 static const off_t offset_throwableFromStop = MEMORY_ALIGN(offset_stopBeforeStart + sizeof(int32_t), SIZEOF_VOID_P);
1986 static const off_t offset_uncaughtExceptionHandler = MEMORY_ALIGN(offset_throwableFromStop + SIZEOF_VOID_P, SIZEOF_VOID_P);
1989 java_lang_Thread(java_handle_t* h) : java_lang_Object(h) {}
1990 // java_lang_Thread(threadobject* t);
1993 inline int32_t get_priority () const;
1994 inline int32_t get_daemon () const;
1995 inline java_handle_t* get_group () const;
1996 inline java_handle_t* get_uncaughtExceptionHandler() const;
1999 inline void set_priority(int32_t value);
2000 inline void set_group (java_handle_t* value);
2004 inline int32_t java_lang_Thread::get_priority() const
2006 return get<int32_t>(_handle, offset_priority);
2009 inline int32_t java_lang_Thread::get_daemon() const
2011 return get<int32_t>(_handle, offset_daemon);
2014 inline java_handle_t* java_lang_Thread::get_group() const
2016 return get<java_handle_t*>(_handle, offset_group);
2019 inline java_handle_t* java_lang_Thread::get_uncaughtExceptionHandler() const
2021 return get<java_handle_t*>(_handle, offset_uncaughtExceptionHandler);
2025 inline void java_lang_Thread::set_priority(int32_t value)
2027 set(_handle, offset_priority, value);
2030 inline void java_lang_Thread::set_group(java_handle_t* value)
2032 set(_handle, offset_group, value);
2038 * OpenJDK java/lang/Throwable
2043 * 1. java.lang.Object backtrace;
2044 * 2. java.lang.String detailMessage;
2045 * 3. java.lang.Throwable cause;
2046 * 4. java.lang.StackTraceElement[] stackTrace;
2048 class java_lang_Throwable : public java_lang_Object, private FieldAccess {
2050 // Static offsets of the object's instance fields.
2051 // TODO These offsets need to be checked on VM startup.
2052 static const off_t offset_backtrace = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
2053 static const off_t offset_detailMessage = MEMORY_ALIGN(offset_backtrace + SIZEOF_VOID_P, SIZEOF_VOID_P);
2054 static const off_t offset_cause = MEMORY_ALIGN(offset_detailMessage + SIZEOF_VOID_P, SIZEOF_VOID_P);
2055 static const off_t offset_stackTrace = MEMORY_ALIGN(offset_cause + SIZEOF_VOID_P, SIZEOF_VOID_P);
2058 java_lang_Throwable(java_handle_t* h) : java_lang_Object(h) {}
2059 java_lang_Throwable(jobject h);
2060 java_lang_Throwable(jobject h, java_handle_bytearray_t* backtrace);
2063 inline java_handle_bytearray_t* get_backtrace () const;
2064 inline java_handle_t* get_detailMessage() const;
2065 inline java_handle_t* get_cause () const;
2068 inline void set_backtrace(java_handle_bytearray_t* value);
2072 inline java_lang_Throwable::java_lang_Throwable(jobject h) : java_lang_Object(h)
2074 java_lang_Throwable((java_handle_t*) h);
2077 inline java_lang_Throwable::java_lang_Throwable(jobject h, java_handle_bytearray_t* backtrace) : java_lang_Object(h)
2079 java_lang_Throwable((java_handle_t*) h);
2080 set_backtrace(backtrace);
2084 inline java_handle_bytearray_t* java_lang_Throwable::get_backtrace() const
2086 return get<java_handle_bytearray_t*>(_handle, offset_backtrace);
2089 inline java_handle_t* java_lang_Throwable::get_detailMessage() const
2091 return get<java_handle_t*>(_handle, offset_detailMessage);
2094 inline java_handle_t* java_lang_Throwable::get_cause() const
2096 return get<java_handle_t*>(_handle, offset_cause);
2100 inline void java_lang_Throwable::set_backtrace(java_handle_bytearray_t* value)
2102 set(_handle, offset_backtrace, value);
2107 * OpenJDK java/lang/reflect/Constructor
2112 * 1. boolean override;
2113 * 2. java.lang.Class clazz;
2115 * 4. java.lang.Class[] parameterTypes;
2116 * 5. java.lang.Class[] exceptionTypes;
2118 * 7. java.lang.String signature;
2119 * 8. sun.reflect.generics.repository.ConstructorRepository genericInfo;
2120 * 9. byte[] annotations;
2121 * 10. byte[] parameterAnnotations;
2122 * 11. java.lang.Class securityCheckCache;
2123 * 12. sun.reflect.ConstructorAccessor constructorAccessor;
2124 * 13. java.lang.reflect.Constructor root;
2125 * 14. java.util.Map declaredAnnotations;
2127 class java_lang_reflect_Constructor : public java_lang_Object, private FieldAccess {
2129 // Static offsets of the object's instance fields.
2130 // TODO These offsets need to be checked on VM startup.
2131 static const off_t offset_override = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
2132 static const off_t offset_clazz = MEMORY_ALIGN(offset_override + sizeof(int32_t), SIZEOF_VOID_P);
2133 static const off_t offset_slot = MEMORY_ALIGN(offset_clazz + SIZEOF_VOID_P, sizeof(int32_t));
2134 static const off_t offset_parameterTypes = MEMORY_ALIGN(offset_slot + sizeof(int32_t), SIZEOF_VOID_P);
2135 static const off_t offset_exceptionTypes = MEMORY_ALIGN(offset_parameterTypes + SIZEOF_VOID_P, SIZEOF_VOID_P);
2136 static const off_t offset_modifiers = MEMORY_ALIGN(offset_exceptionTypes + SIZEOF_VOID_P, sizeof(int32_t));
2137 static const off_t offset_signature = MEMORY_ALIGN(offset_modifiers + sizeof(int32_t), SIZEOF_VOID_P);
2138 static const off_t offset_genericInfo = MEMORY_ALIGN(offset_signature + SIZEOF_VOID_P, SIZEOF_VOID_P);
2139 static const off_t offset_annotations = MEMORY_ALIGN(offset_genericInfo + SIZEOF_VOID_P, SIZEOF_VOID_P);
2140 static const off_t offset_parameterAnnotations = MEMORY_ALIGN(offset_annotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
2141 static const off_t offset_securityCheckCache = MEMORY_ALIGN(offset_parameterAnnotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
2142 static const off_t offset_constructorAccessor = MEMORY_ALIGN(offset_securityCheckCache + SIZEOF_VOID_P, SIZEOF_VOID_P);
2143 static const off_t offset_root = MEMORY_ALIGN(offset_constructorAccessor + SIZEOF_VOID_P, SIZEOF_VOID_P);
2144 static const off_t offset_declaredAnnotations = MEMORY_ALIGN(offset_root + SIZEOF_VOID_P, SIZEOF_VOID_P);
2147 java_lang_reflect_Constructor(java_handle_t* h) : java_lang_Object(h) {}
2148 java_lang_reflect_Constructor(jobject h);
2149 java_lang_reflect_Constructor(methodinfo* m);
2151 java_handle_t* new_instance(java_handle_objectarray_t* args);
2154 inline int32_t get_override () const;
2155 inline classinfo* get_clazz () const;
2156 inline int32_t get_slot () const;
2157 inline java_handle_bytearray_t* get_annotations() const;
2160 inline void set_clazz (classinfo* value);
2161 inline void set_slot (int32_t value);
2162 inline void set_parameterTypes (java_handle_objectarray_t* value);
2163 inline void set_exceptionTypes (java_handle_objectarray_t* value);
2164 inline void set_modifiers (int32_t value);
2165 inline void set_signature (java_handle_t* value);
2166 inline void set_annotations (java_handle_bytearray_t* value);
2167 inline void set_parameterAnnotations(java_handle_bytearray_t* value);
2169 // Convenience functions.
2170 inline methodinfo* get_method();
2174 inline java_lang_reflect_Constructor::java_lang_reflect_Constructor(jobject h) : java_lang_Object(h)
2176 java_lang_reflect_Constructor((java_handle_t*) h);
2179 inline java_lang_reflect_Constructor::java_lang_reflect_Constructor(methodinfo* m)
2181 _handle = builtin_new(class_java_lang_reflect_Constructor);
2186 int slot = m - m->clazz->methods;
2187 java_handle_objectarray_t* parameterTypes = method_get_parametertypearray(m);
2188 java_handle_objectarray_t* exceptionTypes = method_get_exceptionarray(m);
2189 java_handle_bytearray_t* annotations = method_get_annotations(m);
2190 java_handle_bytearray_t* parameterAnnotations = method_get_parameterannotations(m);
2192 set_clazz(m->clazz);
2194 set_parameterTypes(parameterTypes);
2195 set_exceptionTypes(exceptionTypes);
2196 set_modifiers(m->flags & ACC_CLASS_REFLECT_MASK);
2197 set_signature(m->signature ? javastring_new(m->signature) : NULL);
2198 set_annotations(annotations);
2199 set_parameterAnnotations(parameterAnnotations);
2203 inline int32_t java_lang_reflect_Constructor::get_override() const
2205 return get<int32_t>(_handle, offset_override);
2208 inline classinfo* java_lang_reflect_Constructor::get_clazz() const
2210 return get<classinfo*>(_handle, offset_clazz);
2213 inline int32_t java_lang_reflect_Constructor::get_slot() const
2215 return get<int32_t>(_handle, offset_slot);
2218 inline java_handle_bytearray_t* java_lang_reflect_Constructor::get_annotations() const
2220 return get<java_handle_bytearray_t*>(_handle, offset_annotations);
2224 inline void java_lang_reflect_Constructor::set_clazz(classinfo* value)
2226 set(_handle, offset_clazz, value);
2229 inline void java_lang_reflect_Constructor::set_slot(int32_t value)
2231 set(_handle, offset_slot, value);
2234 inline void java_lang_reflect_Constructor::set_parameterTypes(java_handle_objectarray_t* value)
2236 set(_handle, offset_parameterTypes, value);
2239 inline void java_lang_reflect_Constructor::set_exceptionTypes(java_handle_objectarray_t* value)
2241 set(_handle, offset_exceptionTypes, value);
2244 inline void java_lang_reflect_Constructor::set_modifiers(int32_t value)
2246 set(_handle, offset_modifiers, value);
2249 inline void java_lang_reflect_Constructor::set_signature(java_handle_t* value)
2251 set(_handle, offset_signature, value);
2254 inline void java_lang_reflect_Constructor::set_annotations(java_handle_bytearray_t* value)
2256 set(_handle, offset_annotations, value);
2259 inline void java_lang_reflect_Constructor::set_parameterAnnotations(java_handle_bytearray_t* value)
2261 set(_handle, offset_parameterAnnotations, value);
2265 inline methodinfo* java_lang_reflect_Constructor::get_method()
2267 classinfo* c = get_clazz();
2268 int32_t slot = get_slot();
2269 methodinfo* m = &(c->methods[slot]);
2275 * OpenJDK java/lang/reflect/Field
2280 * 1. boolean override;
2281 * 2. java.lang.Class clazz;
2283 * 4. java.lang.String name;
2284 * 5. java.lang.Class type;
2286 * 7. java.lang.String signature;
2287 * 8. sun.reflect.generics.repository.FieldRepository genericInfo;
2288 * 9. byte[] annotations;
2289 * 10. sun.reflect.FieldAccessor fieldAccessor;
2290 * 11. sun.reflect.FieldAccessor overrideFieldAccessor;
2291 * 12. java.lang.reflect.Field root;
2292 * 13. java.lang.Class securityCheckCache;
2293 * 14. java.lang.Class securityCheckTargetClassCache;
2294 * 15. java.util.Map declaredAnnotations;
2296 class java_lang_reflect_Field : public java_lang_Object, private FieldAccess {
2298 // Static offsets of the object's instance fields.
2299 // TODO These offsets need to be checked on VM startup.
2300 static const off_t offset_override = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
2301 static const off_t offset_clazz = MEMORY_ALIGN(offset_override + sizeof(int32_t), SIZEOF_VOID_P);
2302 static const off_t offset_slot = MEMORY_ALIGN(offset_clazz + SIZEOF_VOID_P, sizeof(int32_t));
2303 static const off_t offset_name = MEMORY_ALIGN(offset_slot + sizeof(int32_t), SIZEOF_VOID_P);
2304 static const off_t offset_type = MEMORY_ALIGN(offset_name + SIZEOF_VOID_P, SIZEOF_VOID_P);
2305 static const off_t offset_modifiers = MEMORY_ALIGN(offset_type + SIZEOF_VOID_P, sizeof(int32_t));
2306 static const off_t offset_signature = MEMORY_ALIGN(offset_modifiers + sizeof(int32_t), SIZEOF_VOID_P);
2307 static const off_t offset_genericInfo = MEMORY_ALIGN(offset_signature + SIZEOF_VOID_P, SIZEOF_VOID_P);
2308 static const off_t offset_annotations = MEMORY_ALIGN(offset_genericInfo + SIZEOF_VOID_P, SIZEOF_VOID_P);
2309 static const off_t offset_fieldAccessor = MEMORY_ALIGN(offset_annotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
2310 static const off_t offset_overrideFieldAccessor = MEMORY_ALIGN(offset_fieldAccessor + SIZEOF_VOID_P, SIZEOF_VOID_P);
2311 static const off_t offset_root = MEMORY_ALIGN(offset_overrideFieldAccessor + SIZEOF_VOID_P, SIZEOF_VOID_P);
2312 static const off_t offset_securityCheckCache = MEMORY_ALIGN(offset_root + SIZEOF_VOID_P, SIZEOF_VOID_P);
2313 static const off_t offset_securityCheckTargetClassCache = MEMORY_ALIGN(offset_securityCheckCache + SIZEOF_VOID_P, SIZEOF_VOID_P);
2314 static const off_t offset_declaredAnnotations = MEMORY_ALIGN(offset_securityCheckTargetClassCache + SIZEOF_VOID_P, SIZEOF_VOID_P);
2317 java_lang_reflect_Field(java_handle_t* h) : java_lang_Object(h) {}
2318 java_lang_reflect_Field(jobject h);
2319 java_lang_reflect_Field(fieldinfo* f);
2322 inline int32_t get_override () const;
2323 inline classinfo* get_clazz () const;
2324 inline int32_t get_slot () const;
2325 inline java_handle_bytearray_t* get_annotations() const;
2328 inline void set_clazz (classinfo* value);
2329 inline void set_slot (int32_t value);
2330 inline void set_name (java_handle_t* value);
2331 inline void set_type (classinfo* value);
2332 inline void set_modifiers (int32_t value);
2333 inline void set_signature (java_handle_t* value);
2334 inline void set_annotations(java_handle_bytearray_t* value);
2336 // Convenience functions.
2337 inline fieldinfo* get_field() const;
2341 inline java_lang_reflect_Field::java_lang_reflect_Field(jobject h) : java_lang_Object(h)
2343 java_lang_reflect_Field((java_handle_t*) h);
2346 inline java_lang_reflect_Field::java_lang_reflect_Field(fieldinfo* f)
2348 _handle = builtin_new(class_java_lang_reflect_Field);
2354 set_clazz(f->clazz);
2355 set_slot(f - f->clazz->fields);
2356 set_name(javastring_intern(javastring_new(f->name)));
2357 set_type(field_get_type(f));
2358 set_modifiers(f->flags);
2359 set_signature(f->signature ? javastring_new(f->signature) : NULL);
2360 set_annotations(field_get_annotations(f));
2364 inline int32_t java_lang_reflect_Field::get_override() const
2366 return get<int32_t>(_handle, offset_override);
2369 inline classinfo* java_lang_reflect_Field::get_clazz() const
2371 return get<classinfo*>(_handle, offset_clazz);
2374 inline int32_t java_lang_reflect_Field::get_slot() const
2376 return get<int32_t>(_handle, offset_slot);
2379 inline java_handle_bytearray_t* java_lang_reflect_Field::get_annotations() const
2381 return get<java_handle_bytearray_t*>(_handle, offset_annotations);
2385 inline void java_lang_reflect_Field::set_clazz(classinfo* value)
2387 set(_handle, offset_clazz, value);
2390 inline void java_lang_reflect_Field::set_slot(int32_t value)
2392 set(_handle, offset_slot, value);
2395 inline void java_lang_reflect_Field::set_name(java_handle_t* value)
2397 set(_handle, offset_name, value);
2400 inline void java_lang_reflect_Field::set_type(classinfo* value)
2402 set(_handle, offset_type, value);
2405 inline void java_lang_reflect_Field::set_modifiers(int32_t value)
2407 set(_handle, offset_modifiers, value);
2410 inline void java_lang_reflect_Field::set_signature(java_handle_t* value)
2412 set(_handle, offset_signature, value);
2415 inline void java_lang_reflect_Field::set_annotations(java_handle_bytearray_t* value)
2417 set(_handle, offset_annotations, value);
2421 inline fieldinfo* java_lang_reflect_Field::get_field() const
2423 classinfo* c = get_clazz();
2424 int32_t slot = get_slot();
2425 fieldinfo* f = &(c->fields[slot]);
2431 * OpenJDK java/lang/reflect/Method
2436 * 1. boolean override;
2437 * 2. java.lang.Class clazz;
2439 * 4. java.lang.String name;
2440 * 5. java.lang.Class returnType;
2441 * 6. java.lang.Class[] parameterTypes;
2442 * 7. java.lang.Class[] exceptionTypes;
2444 * 9. java.lang.String signature;
2445 * 10 sun.reflect.generics.repository.ConstructorRepository genericInfo;
2446 * 11. byte[] annotations;
2447 * 12. byte[] parameterAnnotations;
2448 * 13. byte[] annotationDefault;
2449 * 14. sun.reflect.MethodAccessor methodAccessor;
2450 * 15. java.lang.reflect.Method root;
2451 * 16. java.lang.Class securityCheckCache;
2452 * 17. java.lang.Class securityCheckTargetClassCache;
2453 * 18. java.util.Map declaredAnnotations;
2455 class java_lang_reflect_Method : public java_lang_Object, private FieldAccess {
2457 // Static offsets of the object's instance fields.
2458 // TODO These offsets need to be checked on VM startup.
2459 static const off_t offset_override = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
2460 static const off_t offset_clazz = MEMORY_ALIGN(offset_override + sizeof(int32_t), SIZEOF_VOID_P);
2461 static const off_t offset_slot = MEMORY_ALIGN(offset_clazz + SIZEOF_VOID_P, sizeof(int32_t));
2462 static const off_t offset_name = MEMORY_ALIGN(offset_slot + sizeof(int32_t), SIZEOF_VOID_P);
2463 static const off_t offset_returnType = MEMORY_ALIGN(offset_name + SIZEOF_VOID_P, SIZEOF_VOID_P);
2464 static const off_t offset_parameterTypes = MEMORY_ALIGN(offset_returnType + SIZEOF_VOID_P, SIZEOF_VOID_P);
2465 static const off_t offset_exceptionTypes = MEMORY_ALIGN(offset_parameterTypes + SIZEOF_VOID_P, SIZEOF_VOID_P);
2466 static const off_t offset_modifiers = MEMORY_ALIGN(offset_exceptionTypes + SIZEOF_VOID_P, sizeof(int32_t));
2467 static const off_t offset_signature = MEMORY_ALIGN(offset_modifiers + sizeof(int32_t), SIZEOF_VOID_P);
2468 static const off_t offset_genericInfo = MEMORY_ALIGN(offset_signature + SIZEOF_VOID_P, SIZEOF_VOID_P);
2469 static const off_t offset_annotations = MEMORY_ALIGN(offset_genericInfo + SIZEOF_VOID_P, SIZEOF_VOID_P);
2470 static const off_t offset_parameterAnnotations = MEMORY_ALIGN(offset_annotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
2471 static const off_t offset_annotationDefault = MEMORY_ALIGN(offset_parameterAnnotations + SIZEOF_VOID_P, SIZEOF_VOID_P);
2472 static const off_t offset_methodAccessor = MEMORY_ALIGN(offset_annotationDefault + SIZEOF_VOID_P, SIZEOF_VOID_P);
2473 static const off_t offset_root = MEMORY_ALIGN(offset_methodAccessor + SIZEOF_VOID_P, SIZEOF_VOID_P);
2474 static const off_t offset_securityCheckCache = MEMORY_ALIGN(offset_root + SIZEOF_VOID_P, SIZEOF_VOID_P);
2475 static const off_t offset_securityCheckTargetClassCache = MEMORY_ALIGN(offset_securityCheckCache + SIZEOF_VOID_P, SIZEOF_VOID_P);
2476 static const off_t offset_declaredAnnotations = MEMORY_ALIGN(offset_securityCheckTargetClassCache + SIZEOF_VOID_P, SIZEOF_VOID_P);
2479 java_lang_reflect_Method(java_handle_t* h) : java_lang_Object(h) {}
2480 java_lang_reflect_Method(jobject h);
2481 java_lang_reflect_Method(methodinfo* m);
2483 java_handle_t* invoke(java_handle_t* o, java_handle_objectarray_t* args);
2486 inline int32_t get_override () const;
2487 inline classinfo* get_clazz () const;
2488 inline int32_t get_slot () const;
2489 inline java_handle_bytearray_t* get_annotations () const;
2490 inline java_handle_bytearray_t* get_parameterAnnotations() const;
2491 inline java_handle_bytearray_t* get_annotationDefault () const;
2495 // Convenience functions.
2496 inline methodinfo* get_method() const;
2500 inline java_lang_reflect_Method::java_lang_reflect_Method(jobject h) : java_lang_Object(h)
2502 java_lang_reflect_Method((java_handle_t*) h);
2505 inline java_lang_reflect_Method::java_lang_reflect_Method(methodinfo* m)
2507 _handle = builtin_new(class_java_lang_reflect_Method);
2512 set(_handle, offset_clazz, m->clazz);
2513 set(_handle, offset_slot, (int32_t) (m - m->clazz->methods)); // This cast is important (see PR100).
2514 set(_handle, offset_name, javastring_intern(javastring_new(m->name)));
2515 set(_handle, offset_returnType, method_returntype_get(m));
2516 set(_handle, offset_parameterTypes, method_get_parametertypearray(m));
2517 set(_handle, offset_exceptionTypes, method_get_exceptionarray(m));
2518 set(_handle, offset_modifiers, (int32_t) (m->flags & ACC_CLASS_REFLECT_MASK));
2519 set(_handle, offset_signature, m->signature ? javastring_new(m->signature) : NULL);
2520 set(_handle, offset_annotations, method_get_annotations(m));
2521 set(_handle, offset_parameterAnnotations, method_get_parameterannotations(m));
2522 set(_handle, offset_annotationDefault, method_get_annotationdefault(m));
2526 inline int32_t java_lang_reflect_Method::get_override() const
2528 return get<int32_t>(_handle, offset_override);
2531 inline classinfo* java_lang_reflect_Method::get_clazz() const
2533 return get<classinfo*>(_handle, offset_clazz);
2536 inline int32_t java_lang_reflect_Method::get_slot() const
2538 return get<int32_t>(_handle, offset_slot);
2541 inline java_handle_bytearray_t* java_lang_reflect_Method::get_annotations() const
2543 return get<java_handle_bytearray_t*>(_handle, offset_annotations);
2546 inline java_handle_bytearray_t* java_lang_reflect_Method::get_parameterAnnotations() const
2548 return get<java_handle_bytearray_t*>(_handle, offset_parameterAnnotations);
2551 inline java_handle_bytearray_t* java_lang_reflect_Method::get_annotationDefault() const
2553 return get<java_handle_bytearray_t*>(_handle, offset_annotationDefault);
2557 inline methodinfo* java_lang_reflect_Method::get_method() const
2559 classinfo* c = get_clazz();
2560 int32_t slot = get_slot();
2561 methodinfo* m = &(c->methods[slot]);
2567 * OpenJDK java/nio/Buffer
2578 class java_nio_Buffer : public java_lang_Object, private FieldAccess {
2580 // Static offsets of the object's instance fields.
2581 // TODO These offsets need to be checked on VM startup.
2582 static const off_t offset_mark = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
2583 static const off_t offset_position = MEMORY_ALIGN(offset_mark + sizeof(int32_t), sizeof(int32_t));
2584 static const off_t offset_limit = MEMORY_ALIGN(offset_position + sizeof(int32_t), sizeof(int32_t));
2585 static const off_t offset_capacity = MEMORY_ALIGN(offset_limit + sizeof(int32_t), sizeof(int32_t));
2586 static const off_t offset_address = MEMORY_ALIGN(offset_capacity + sizeof(int32_t), sizeof(int64_t));
2589 java_nio_Buffer(java_handle_t* h) : java_lang_Object(h) {}
2590 java_nio_Buffer(jobject h) : java_lang_Object(h) {}
2593 inline void* get_address() const;
2597 inline void* java_nio_Buffer::get_address() const
2599 return get<void*>(_handle, offset_address);
2602 #endif // WITH_JAVA_RUNTIME_LIBRARY_OPENJDK
2605 #if defined(WITH_JAVA_RUNTIME_LIBRARY_CLDC1_1)
2608 * CLDC 1.1 com/sun/cldchi/jvm/FileDescriptor
2617 class com_sun_cldchi_jvm_FileDescriptor : public java_lang_Object, private FieldAccess {
2619 // Static offsets of the object's instance fields.
2620 // TODO These offsets need to be checked on VM startup.
2621 static const off_t offset_pointer = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int64_t));
2622 static const off_t offset_position = MEMORY_ALIGN(offset_pointer + sizeof(int64_t), sizeof(int32_t));
2623 static const off_t offset_length = MEMORY_ALIGN(offset_position + sizeof(int32_t), sizeof(int32_t));
2626 com_sun_cldchi_jvm_FileDescriptor(java_handle_t* h) : java_lang_Object(h) {}
2627 com_sun_cldchi_jvm_FileDescriptor(jobject h);
2628 com_sun_cldchi_jvm_FileDescriptor(java_handle_t* h, int64_t pointer, int32_t position, int32_t length);
2629 com_sun_cldchi_jvm_FileDescriptor(java_handle_t* h, com_sun_cldchi_jvm_FileDescriptor& fd);
2632 inline int64_t get_pointer () const;
2633 inline int32_t get_position() const;
2634 inline int32_t get_length () const;
2637 inline void set_pointer (int64_t value);
2638 inline void set_position(int32_t value);
2639 inline void set_length (int32_t value);
2643 inline com_sun_cldchi_jvm_FileDescriptor::com_sun_cldchi_jvm_FileDescriptor(jobject h) : java_lang_Object(h)
2645 com_sun_cldchi_jvm_FileDescriptor((java_handle_t*) h);
2648 inline com_sun_cldchi_jvm_FileDescriptor::com_sun_cldchi_jvm_FileDescriptor(java_handle_t* h, int64_t pointer, int32_t position, int32_t length) : java_lang_Object(h)
2650 set_pointer(pointer);
2651 set_position(position);
2655 inline com_sun_cldchi_jvm_FileDescriptor::com_sun_cldchi_jvm_FileDescriptor(java_handle_t* h, com_sun_cldchi_jvm_FileDescriptor& fd) : java_lang_Object(h)
2657 com_sun_cldchi_jvm_FileDescriptor(h, fd.get_pointer(), fd.get_position(), fd.get_length());
2661 inline int64_t com_sun_cldchi_jvm_FileDescriptor::get_pointer() const
2663 return get<int64_t>(_handle, offset_pointer);
2666 inline int32_t com_sun_cldchi_jvm_FileDescriptor::get_position() const
2668 return get<int32_t>(_handle, offset_position);
2671 inline int32_t com_sun_cldchi_jvm_FileDescriptor::get_length() const
2673 return get<int32_t>(_handle, offset_length);
2677 inline void com_sun_cldchi_jvm_FileDescriptor::set_pointer(int64_t value)
2679 set(_handle, offset_pointer, value);
2682 inline void com_sun_cldchi_jvm_FileDescriptor::set_position(int32_t value)
2684 set(_handle, offset_position, value);
2687 inline void com_sun_cldchi_jvm_FileDescriptor::set_length(int32_t value)
2689 set(_handle, offset_length, value);
2694 * CLDC 1.1 java/lang/String
2703 class java_lang_String : public java_lang_Object, private FieldAccess {
2705 // Static offsets of the object's instance fields.
2706 // TODO These offsets need to be checked on VM startup.
2707 static const off_t offset_value = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
2708 static const off_t offset_offset = MEMORY_ALIGN(offset_value + SIZEOF_VOID_P, sizeof(int32_t));
2709 static const off_t offset_count = MEMORY_ALIGN(offset_offset + sizeof(int32_t), sizeof(int32_t));
2712 java_lang_String(java_handle_t* h) : java_lang_Object(h) {}
2713 java_lang_String(jstring h);
2714 java_lang_String(java_handle_t* h, java_handle_chararray_t* value, int32_t count, int32_t offset = 0);
2717 inline java_handle_chararray_t* get_value () const;
2718 inline int32_t get_offset() const;
2719 inline int32_t get_count () const;
2722 inline void set_value (java_handle_chararray_t* value);
2723 inline void set_offset(int32_t value);
2724 inline void set_count (int32_t value);
2727 inline java_lang_String::java_lang_String(jstring h) : java_lang_Object(h)
2729 java_lang_String((java_handle_t*) h);
2732 inline java_lang_String::java_lang_String(java_handle_t* h, java_handle_chararray_t* value, int32_t count, int32_t offset) : java_lang_Object(h)
2739 inline java_handle_chararray_t* java_lang_String::get_value() const
2741 return get<java_handle_chararray_t*>(_handle, offset_value);
2744 inline int32_t java_lang_String::get_offset() const
2746 return get<int32_t>(_handle, offset_offset);
2749 inline int32_t java_lang_String::get_count() const
2751 return get<int32_t>(_handle, offset_count);
2754 inline void java_lang_String::set_value(java_handle_chararray_t* value)
2756 set(_handle, offset_value, value);
2759 inline void java_lang_String::set_offset(int32_t value)
2761 set(_handle, offset_offset, value);
2764 inline void java_lang_String::set_count(int32_t value)
2766 set(_handle, offset_count, value);
2771 * CLDC 1.1 java/lang/Thread
2777 * 2. java.lang.Runnable runnable;
2778 * 3. java.lang.Object vm_thread;
2779 * 4. int is_terminated;
2780 * 5. int is_stillborn;
2783 class java_lang_Thread : public java_lang_Object, private FieldAccess {
2785 // Static offsets of the object's instance fields.
2786 // TODO These offsets need to be checked on VM startup.
2787 static const off_t offset_priority = MEMORY_ALIGN(sizeof(java_object_t), sizeof(int32_t));
2788 static const off_t offset_runnable = MEMORY_ALIGN(offset_priority + sizeof(int32_t), SIZEOF_VOID_P);
2789 static const off_t offset_vm_thread = MEMORY_ALIGN(offset_runnable + SIZEOF_VOID_P, SIZEOF_VOID_P);
2790 static const off_t offset_is_terminated = MEMORY_ALIGN(offset_vm_thread + SIZEOF_VOID_P, sizeof(int32_t));
2791 static const off_t offset_is_stillborn = MEMORY_ALIGN(offset_is_terminated + sizeof(int32_t), sizeof(int32_t));
2792 static const off_t offset_name = MEMORY_ALIGN(offset_is_stillborn + sizeof(int32_t), SIZEOF_VOID_P);
2795 java_lang_Thread(java_handle_t* h) : java_lang_Object(h) {}
2796 java_lang_Thread(jobject h);
2797 // java_lang_Thread(threadobject* t);
2800 inline int32_t get_priority () const;
2801 inline threadobject* get_vm_thread() const;
2802 inline java_handle_chararray_t* get_name () const;
2805 inline void set_vm_thread(threadobject* value);
2809 inline java_lang_Thread::java_lang_Thread(jobject h) : java_lang_Object(h)
2811 java_lang_Thread((java_handle_t*) h);
2814 // inline java_lang_Thread::java_lang_Thread(threadobject* t) : java_lang_Object(h)
2816 // java_lang_Thread(thread_get_object(t));
2820 inline int32_t java_lang_Thread::get_priority() const
2822 return get<int32_t>(_handle, offset_priority);
2825 inline threadobject* java_lang_Thread::get_vm_thread() const
2827 return get<threadobject*>(_handle, offset_vm_thread);
2830 inline java_handle_chararray_t* java_lang_Thread::get_name() const
2832 return get<java_handle_chararray_t*>(_handle, offset_name);
2836 inline void java_lang_Thread::set_vm_thread(threadobject* value)
2838 set(_handle, offset_vm_thread, value);
2843 * CLDC 1.1 java/lang/Throwable
2848 * 1. java.lang.String detailMessage;
2849 * 2. java.lang.Object backtrace;
2851 class java_lang_Throwable : public java_lang_Object, private FieldAccess {
2853 // Static offsets of the object's instance fields.
2854 // TODO These offsets need to be checked on VM startup.
2855 static const off_t offset_detailMessage = MEMORY_ALIGN(sizeof(java_object_t), SIZEOF_VOID_P);
2856 static const off_t offset_backtrace = MEMORY_ALIGN(offset_detailMessage + SIZEOF_VOID_P, SIZEOF_VOID_P);
2859 java_lang_Throwable(java_handle_t* h) : java_lang_Object(h) {}
2860 java_lang_Throwable(jobject h);
2863 inline java_handle_t* get_detailMessage() const;
2864 inline java_handle_bytearray_t* get_backtrace () const;
2867 inline void set_backtrace(java_handle_bytearray_t* value);
2871 inline java_lang_Throwable::java_lang_Throwable(jobject h) : java_lang_Object(h)
2873 java_lang_Throwable((java_handle_t*) h);
2877 inline java_handle_t* java_lang_Throwable::get_detailMessage() const
2879 return get<java_handle_t*>(_handle, offset_detailMessage);
2882 inline java_handle_bytearray_t* java_lang_Throwable::get_backtrace() const
2884 return get<java_handle_bytearray_t*>(_handle, offset_backtrace);
2888 inline void java_lang_Throwable::set_backtrace(java_handle_bytearray_t* value)
2890 set(_handle, offset_backtrace, value);
2893 #endif // WITH_JAVA_RUNTIME_LIBRARY_CLDC1_1
2897 // Legacy C interface.
2898 java_handle_t* java_lang_reflect_Constructor_create(methodinfo* m);
2899 java_handle_t* java_lang_reflect_Field_create(fieldinfo* f);
2900 java_handle_t* java_lang_reflect_Method_create(methodinfo* m);
2904 #endif // _JAVAOBJECTS_HPP
2908 * These are local overrides for various environment variables in Emacs.
2909 * Please do not remove this and leave it at the end of the file, where
2910 * Emacs will automagically detect them.
2911 * ---------------------------------------------------------------------
2914 * indent-tabs-mode: t