01: package jaxx.reflect;
02:
03: /** Mirrors the class <code>java.lang.ref.Member</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 abstract class MemberDescriptor {
09: private String name;
10: private int modifiers;
11: private ClassLoader classLoader;
12:
13: MemberDescriptor(String name, int modifiers, ClassLoader classLoader) {
14: this .name = name;
15: this .modifiers = modifiers;
16: this .classLoader = classLoader;
17: }
18:
19: public String getName() {
20: return name;
21: }
22:
23: public int getModifiers() {
24: return modifiers;
25: }
26:
27: protected ClassLoader getClassLoader() {
28: return classLoader;
29: }
30:
31: public String toString() {
32: return getClass().getName() + "[" + getName() + "]";
33: }
34: }
|