Comments for r767
This commit is contained in:
parent
dc283e1121
commit
52bf144859
@ -56,7 +56,13 @@ public final class FieldAttributes {
|
||||
private Collection<Annotation> annotations;
|
||||
|
||||
FieldAttributes(Class<?> declaringClazz, Field f) {
|
||||
this(declaringClazz, f, declaringClazz);
|
||||
this.declaringClazz = $Preconditions.checkNotNull(declaringClazz);
|
||||
this.name = f.getName();
|
||||
this.declaredType = f.getType();
|
||||
this.isSynthetic = f.isSynthetic();
|
||||
this.modifiers = f.getModifiers();
|
||||
this.field = f;
|
||||
this.resolvedType = getTypeInfoForField(f, declaringClazz);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,9 +77,9 @@ final class ReflectingFieldNavigator {
|
||||
if (fields == null) {
|
||||
fields = new ArrayList<FieldAttributes>();
|
||||
for (Class<?> curr : getInheritanceHierarchy(type)) {
|
||||
Field[] fields1 = curr.getDeclaredFields();
|
||||
AccessibleObject.setAccessible(fields1, true);
|
||||
Field[] classFields = fields1;
|
||||
Field[] currentClazzFields = curr.getDeclaredFields();
|
||||
AccessibleObject.setAccessible(currentClazzFields, true);
|
||||
Field[] classFields = currentClazzFields;
|
||||
for (Field f : classFields) {
|
||||
fields.add(new FieldAttributes(curr, f, declaredType));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user