de.grogra.reflect
public abstract class MemberBase extends java.lang.Object implements Member
| Modifier and Type | Field and Description |
|---|---|
protected ObjectList<Annotation> |
annots |
protected Type |
declaringType |
protected java.lang.String |
descriptor |
protected int |
modifiers |
protected java.lang.String |
name |
ABSTRACT, ACCESS_MODIFIERS, ARRAY, BRIDGE, CONSTANT, FINAL, INTERFACE, JAVA_MODIFIERS, LOCAL_CLASS, MIN_UNUSED_MODIFIER, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE| Constructor and Description |
|---|
MemberBase() |
MemberBase(java.lang.String name,
java.lang.String descriptor,
int modifiers,
Type declaringType) |
| Modifier and Type | Method and Description |
|---|---|
Annotation |
getDeclaredAnnotation(int index) |
int |
getDeclaredAnnotationCount() |
Type |
getDeclaringType()
Returns the declaring type of which this is a member.
|
java.lang.String |
getDescriptor()
Returns a descriptor for this member.
|
int |
getModifiers()
Returns the modifiers of this member as a combination of
the bit masks which are defined in this interface.
|
java.lang.String |
getName()
Returns the name of this member.
|
java.lang.String |
getSimpleName()
Returns the simple name of this member.
|
java.lang.String |
toString() |
protected ObjectList<Annotation> annots
protected Type declaringType
protected java.lang.String descriptor
protected int modifiers
protected java.lang.String name
public MemberBase()
public MemberBase(java.lang.String name,
java.lang.String descriptor,
int modifiers,
Type declaringType)
public Annotation getDeclaredAnnotation(int index)
getDeclaredAnnotation in interface Memberpublic int getDeclaredAnnotationCount()
getDeclaredAnnotationCount in interface Memberpublic final Type getDeclaringType()
Membernull if such a type does not exist.getDeclaringType in interface Memberpublic java.lang.String getDescriptor()
Memberboolean, byte, short,
char, int, long,
float, double, void.
For array types, the descriptor is the character '[' plus
the descriptor of its component type, e.g.,
[[I for int[][]. For non-array
reference types, the
descriptor is the character 'L', followed by the binary name
(see Type.getBinaryName()) of the type, where '.'
has to be replaced by '/', followed by ';',
e.g., Ljava/lang/Object;.
fout;Ljava/io/PrintStream;
for the field System.out.
<init> for
constructors), followed by the characters ';' and '(', followed
by the descriptors of the method's parameter types, followed by
')', followed by the descriptor of the return type. E.g.
mprintln;(Ljava/lang/String;)V for the method
PrintStream.println(String).
getDescriptor in interface Memberpublic final int getModifiers()
MembergetModifiers in interface Memberpublic java.lang.String getName()
Memberjava.lang.Object,
java.util.Map.Entry.
Otherwise, it equals Member.getSimpleName().public java.lang.String getSimpleName()
MemberObject, out, println.getSimpleName in interface Memberpublic java.lang.String toString()
toString in class java.lang.Object