PyLucene 3.4.0-1 import
[pylucene.git] / jcc / _jcc / java / lang / reflect / Field.h
1 /*
2  *   Licensed under the Apache License, Version 2.0 (the "License");
3  *   you may not use this file except in compliance with the License.
4  *   You may obtain a copy of the License at
5  *
6  *       http://www.apache.org/licenses/LICENSE-2.0
7  *
8  *   Unless required by applicable law or agreed to in writing, software
9  *   distributed under the License is distributed on an "AS IS" BASIS,
10  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11  *   See the License for the specific language governing permissions and
12  *   limitations under the License.
13  */
14
15 #ifndef _Field_H
16 #define _Field_H
17
18 #include <Python.h>
19
20 namespace java {
21     namespace lang {
22         class Class;
23         class String;
24
25         namespace reflect {
26 #ifdef _java_generics
27             class Type;
28 #endif
29
30             class Field : public Object {
31             public:
32                 static Class *class$;
33                 static jmethodID *_mids;
34                 static jclass initializeClass();
35
36                 explicit Field(jobject obj) : Object(obj) {
37                     initializeClass();
38                 }
39                 Field(const Field& obj) : Object(obj) {}
40
41                 int getModifiers() const;
42                 Class getType() const;
43                 String getName() const;
44 #ifdef _java_generics
45                 Type getGenericType() const;
46 #endif
47             };
48
49             extern PyTypeObject PY_TYPE(Field);
50
51             class t_Field {
52             public:
53                 PyObject_HEAD
54                 Field object;
55                 static PyObject *wrap_Object(const Field& object);
56                 static PyObject *wrap_jobject(const jobject& object);
57             };
58         }
59     }
60 }
61
62 #endif /* _Field_H */