Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: class.h 8249 2007-07-31 12:59:03Z panzi $
-
*/
runtime in vm_create. */
typedef struct {
- java_objectheader header;
+ java_object_t header;
#if defined(WITH_CLASSPATH_GNU)
intptr_t padding[4];
#elif defined(WITH_CLASSPATH_SUN)
u2 innerclasscount; /* number of inner classes */
innerclassinfo *innerclass;
-#if defined(ENABLE_JAVASE)
+ classref_or_classinfo declaringclass;
classref_or_classinfo enclosingclass; /* enclosing class */
constant_nameandtype *enclosingmethod; /* enclosing method */
-#endif
utf *packagename; /* full name of the package */
utf *sourcefile; /* SourceFile attribute */
#if defined(ENABLE_JAVASE)
utf *signature; /* Signature attribute */
#if defined(ENABLE_ANNOTATIONS)
- annotation_bytearray_t *annotations;
+ /* all the anntation attributes are NULL (and not a zero length array)
+ if there is nothing */
+ annotation_bytearray_t *annotations; /* annotations of this class */
- annotation_bytearrays_t *method_annotations;
- annotation_bytearrays_t *method_parameterannotations;
- annotation_bytearrays_t *method_annotationdefaults;
-
- annotation_bytearrays_t *field_annotations;
+ annotation_bytearrays_t *method_annotations; /* array of annotations for */
+ /* the methods */
+ annotation_bytearrays_t *method_parameterannotations; /* array of */
+ /* parameter annotations for the methods */
+ annotation_bytearrays_t *method_annotationdefaults; /* array for */
+ /* annotation default values for the */
+ /* methods */
+
+ annotation_bytearrays_t *field_annotations; /* array of annotations for */
+ /* the fields */
#endif
#endif
- java_objectheader *classloader; /* NULL for bootstrap classloader */
+ classloader *classloader; /* NULL for bootstrap classloader */
+
+#if defined(ENABLE_JAVASE)
+# if defined(WITH_CLASSPATH_SUN)
+ java_object_t *protectiondomain;
+# endif
+#endif
};
classinfo *class_create_classinfo(utf *u);
void class_postset_header_vftbl(void);
-classinfo *class_define(utf *name, java_objectheader *cl, int32_t length, const uint8_t *data);
+classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_t *data, java_handle_t *pd);
void class_set_packagename(classinfo *c);
bool class_load_attributes(classbuffer *cb);
methodinfo *class_resolveclassmethod(classinfo *c, utf *name, utf *dest, classinfo *referer, bool throwexception);
methodinfo *class_resolveinterfacemethod(classinfo *c, utf *name, utf *dest, classinfo *referer, bool throwexception);
-bool class_issubclass(classinfo *sub, classinfo *super);
-bool class_isanysubclass(classinfo *sub, classinfo *super);
-bool class_is_primitive(classinfo *c);
-bool class_is_array(classinfo *c);
-bool class_is_interface(classinfo *c);
-classinfo *class_get_superclass(classinfo *c);
-classinfo *class_get_declaringclass(classinfo *c);
+bool class_issubclass(classinfo *sub, classinfo *super);
+bool class_isanysubclass(classinfo *sub, classinfo *super);
+
+bool class_is_primitive(classinfo *c);
+bool class_is_anonymousclass(classinfo *c);
+bool class_is_array(classinfo *c);
+bool class_is_interface(classinfo *c);
+bool class_is_localclass(classinfo *c);
+bool class_is_memberclass(classinfo *c);
+
+classinfo *class_get_superclass(classinfo *c);
+classinfo *class_get_componenttype(classinfo *c);
+java_handle_objectarray_t *class_get_declaredclasses(classinfo *c, bool publicOnly);
+classinfo *class_get_declaringclass(classinfo *c);
+classinfo *class_get_enclosingclass(classinfo *c);
+java_handle_objectarray_t *class_get_interfaces(classinfo *c);
+java_handle_bytearray_t *class_get_annotations(classinfo *c);
#if defined(ENABLE_JAVASE)
-utf *class_get_signature(classinfo *c);
+utf *class_get_signature(classinfo *c);
#endif
/* some debugging functions */