toFieldRenameValue method

FieldRename? toFieldRenameValue()

Returns a FieldRename corresponding to the value of the object being represented or null if this object is not of type FieldRename or the value of the object being represented is null.

Implementation

FieldRename? toFieldRenameValue() {
  if (type?.isXmlAnnotationFieldRename == true) {
    final index = getField('index')?.toIntValue();
    if (index != null) {
      return FieldRename.values[index];
    }
  }

  return null;
}