Beispiel #1
0
  /**
   * Creates new field descriptor and resolve all additional field data. Also, forces access to a
   * field.
   */
  public FieldDescriptor(ClassDescriptor classDescriptor, Field field) {
    super(classDescriptor, ReflectUtil.isPublic(field));
    this.field = field;
    this.type = field.getGenericType();
    this.rawType = ReflectUtil.getRawType(type, classDescriptor.getType());
    this.rawComponentType = ReflectUtil.getComponentType(type, classDescriptor.getType());
    this.rawKeyComponentType = ReflectUtil.getComponentType(type, classDescriptor.getType(), 0);

    ReflectUtil.forceAccess(field);
  }
Beispiel #2
0
 /** Resolves raw component type for given index. This value is NOT cached. */
 public Class resolveRawComponentType(int index) {
   return ReflectUtil.getComponentType(type, classDescriptor.getType(), index);
 }