5 #include "java/lang/reflect/GenericDeclaration.h"
6 #include "java/lang/Class.h"
7 #include "java/lang/reflect/TypeVariable.h"
14 java::lang::Class *GenericDeclaration::class$ = NULL;
15 jmethodID *GenericDeclaration::mids$ = NULL;
17 jclass GenericDeclaration::initializeClass()
22 jclass cls = (jclass) env->findClass("java/lang/reflect/GenericDeclaration");
24 mids$ = new jmethodID[max_mid];
25 mids$[mid_getTypeParameters_837d3468] = env->getMethodID(cls, "getTypeParameters", "()[Ljava/lang/reflect/TypeVariable;");
27 class$ = (java::lang::Class *) new JObject(cls);
29 return (jclass) class$->this$;
32 JArray<java::lang::reflect::TypeVariable> GenericDeclaration::getTypeParameters() const
34 return JArray<java::lang::reflect::TypeVariable>(env->callObjectMethod(this$, mids$[mid_getTypeParameters_837d3468]));
40 #include "structmember.h"
41 #include "functions.h"
47 static PyObject *t_GenericDeclaration_cast_(PyTypeObject *type, PyObject *arg);
48 static PyObject *t_GenericDeclaration_instance_(PyTypeObject *type, PyObject *arg);
49 static PyObject *t_GenericDeclaration_getTypeParameters(t_GenericDeclaration *self);
51 static PyMethodDef t_GenericDeclaration__methods_[] = {
52 DECLARE_METHOD(t_GenericDeclaration, cast_, METH_O | METH_CLASS),
53 DECLARE_METHOD(t_GenericDeclaration, instance_, METH_O | METH_CLASS),
54 DECLARE_METHOD(t_GenericDeclaration, getTypeParameters, METH_NOARGS),
55 { NULL, NULL, 0, NULL }
58 DECLARE_TYPE(GenericDeclaration, t_GenericDeclaration, java::lang::Object, GenericDeclaration, abstract_init, 0, 0, 0, 0, 0);
60 static PyObject *t_GenericDeclaration_cast_(PyTypeObject *type, PyObject *arg)
62 if (!(arg = castCheck(arg, GenericDeclaration::initializeClass, 1)))
64 return t_GenericDeclaration::wrap_Object(GenericDeclaration(((t_GenericDeclaration *) arg)->object.this$));
66 static PyObject *t_GenericDeclaration_instance_(PyTypeObject *type, PyObject *arg)
68 if (!castCheck(arg, GenericDeclaration::initializeClass, 0))
73 static PyObject *t_GenericDeclaration_getTypeParameters(t_GenericDeclaration *self)
75 JArray<TypeVariable> result((jobject) NULL);
76 OBJ_CALL(result = self->object.getTypeParameters());
78 return result.toSequence(t_TypeVariable::wrap_Object);
84 #endif /* _java_generics */