01: package jaxx.reflect;
02:
03: /** Mirrors the class <code>java.lang.ref.Field</code>. JAXX uses <code>ClassDescriptor</code> instead of <code>Class</code>
04: * almost everywhere so that it can handle circular dependencies (there can't be a <code>Class</code> object for an uncompiled
05: * JAXX or Java source file, and a compiler must be allow references to symbols in uncompiled source files in order to handle
06: * circular dependencies).
07: */
08: public class FieldDescriptor extends MemberDescriptor {
09: private String type;
10:
11: public FieldDescriptor(String name, int modifiers, String type,
12: ClassLoader classLoader) {
13: super (name, modifiers, classLoader);
14: this .type = type;
15: }
16:
17: public ClassDescriptor getType() {
18: try {
19: return ClassDescriptorLoader.getClassDescriptor(type,
20: getClassLoader());
21: } catch (ClassNotFoundException e) {
22: throw new RuntimeException(e);
23: }
24: }
25: }
|