5 #include "java/lang/reflect/TypeVariable.h"
6 #include "java/lang/reflect/GenericDeclaration.h"
7 #include "java/lang/Class.h"
8 #include "java/lang/String.h"
15 java::lang::Class *TypeVariable::class$ = NULL;
16 jmethodID *TypeVariable::mids$ = NULL;
18 jclass TypeVariable::initializeClass()
23 jclass cls = (jclass) env->findClass("java/lang/reflect/TypeVariable");
25 mids$ = new jmethodID[max_mid];
26 mids$[mid_getBounds_6f565a00] = env->getMethodID(cls, "getBounds", "()[Ljava/lang/reflect/Type;");
27 mids$[mid_getGenericDeclaration_2dc62edd] = env->getMethodID(cls, "getGenericDeclaration", "()Ljava/lang/reflect/GenericDeclaration;");
28 mids$[mid_getName_14c7b5c5] = env->getMethodID(cls, "getName", "()Ljava/lang/String;");
30 class$ = (java::lang::Class *) new JObject(cls);
32 return (jclass) class$->this$;
35 JArray<java::lang::reflect::Type> TypeVariable::getBounds() const
37 return JArray<java::lang::reflect::Type>(env->callObjectMethod(this$, mids$[mid_getBounds_6f565a00]));
40 java::lang::reflect::GenericDeclaration TypeVariable::getGenericDeclaration() const
42 return java::lang::reflect::GenericDeclaration(env->callObjectMethod(this$, mids$[mid_getGenericDeclaration_2dc62edd]));
45 java::lang::String TypeVariable::getName() const
47 return java::lang::String(env->callObjectMethod(this$, mids$[mid_getName_14c7b5c5]));
53 #include "structmember.h"
54 #include "functions.h"
60 static PyObject *t_TypeVariable_cast_(PyTypeObject *type, PyObject *arg);
61 static PyObject *t_TypeVariable_instance_(PyTypeObject *type, PyObject *arg);
62 static PyObject *t_TypeVariable_getBounds(t_TypeVariable *self);
63 static PyObject *t_TypeVariable_getGenericDeclaration(t_TypeVariable *self);
64 static PyObject *t_TypeVariable_getName(t_TypeVariable *self);
66 static PyMethodDef t_TypeVariable__methods_[] = {
67 DECLARE_METHOD(t_TypeVariable, cast_, METH_O | METH_CLASS),
68 DECLARE_METHOD(t_TypeVariable, instance_, METH_O | METH_CLASS),
69 DECLARE_METHOD(t_TypeVariable, getBounds, METH_NOARGS),
70 DECLARE_METHOD(t_TypeVariable, getGenericDeclaration, METH_NOARGS),
71 DECLARE_METHOD(t_TypeVariable, getName, METH_NOARGS),
72 { NULL, NULL, 0, NULL }
75 DECLARE_TYPE(TypeVariable, t_TypeVariable, java::lang::reflect::Type, TypeVariable, abstract_init, 0, 0, 0, 0, 0);
77 static PyObject *t_TypeVariable_cast_(PyTypeObject *type, PyObject *arg)
79 if (!(arg = castCheck(arg, TypeVariable::initializeClass, 1)))
81 return t_TypeVariable::wrap_Object(TypeVariable(((t_TypeVariable *) arg)->object.this$));
83 static PyObject *t_TypeVariable_instance_(PyTypeObject *type, PyObject *arg)
85 if (!castCheck(arg, TypeVariable::initializeClass, 0))
90 static PyObject *t_TypeVariable_getBounds(t_TypeVariable *self)
92 JArray<java::lang::reflect::Type> result((jobject) NULL);
93 OBJ_CALL(result = self->object.getBounds());
95 return result.toSequence(t_Type::wrap_Object);
98 static PyObject *t_TypeVariable_getGenericDeclaration(t_TypeVariable *self)
100 java::lang::reflect::GenericDeclaration result((jobject) NULL);
101 OBJ_CALL(result = self->object.getGenericDeclaration());
102 return java::lang::reflect::t_GenericDeclaration::wrap_Object(result);
105 static PyObject *t_TypeVariable_getName(t_TypeVariable *self)
107 java::lang::String result((jobject) NULL);
108 OBJ_CALL(result = self->object.getName());
115 #endif /* _java_generics */