Exemple #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);
  }