<commit_before># FieldSchema

[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Build Status](https://travis-ci.org/yatatsu/FieldSchema.svg?branch=master)](https://travis-ci.org/yatatsu/FieldSchema)
[![](https://jitpack.io/v/yatatsu/FieldSchema.svg)](https://jitpack.io/#yatatsu/FieldSchema)

Generate field name constant for Android.

## Usage

FieldSchema helps you accessing field name in static.

```java
@FieldSchemaClass(name = "myTodo") public class Todo {
  public String name;
  public String description;
  public Date createdAt;
  public String version;
}
```

Here is generated code.

```java
public final class FS {
  public static final String todo_name = "name";

  public static final String todo_description = "description";

  public static final String todo_createdAt = "createdAt";

  public static final String todo_version = "version";
}
```

You can use `FS.todo_name` instead of `"name"`.

Constants named `{class name}_{field name}` in `FS.java`. To avoid collision name, Use `name` option.

```java
@FieldSchemaClass(name = "myTodo") public class Todo {
  public String name;
}
```<commit_msg>Fix generated code example in README.md<commit_after># FieldSchema

[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Build Status](https://travis-ci.org/yatatsu/FieldSchema.svg?branch=master)](https://travis-ci.org/yatatsu/FieldSchema)
[![](https://jitpack.io/v/yatatsu/FieldSchema.svg)](https://jitpack.io/#yatatsu/FieldSchema)

Generate field name constant for Android.

## Usage

FieldSchema helps you accessing field name in static.

```java
@FieldSchemaClass(name = "myTodo") public class Todo {
  public String name;
  public String description;
  public Date createdAt;
  public String version;
}
```

Here is generated code.

```java
public final class FS {
  public static final String mytodo_name = "name";

  public static final String mytodo_description = "description";

  public static final String mytodo_createdAt = "createdAt";

  public static final String mytodo_version = "version";
}
```

You can use `FS.todo_name` instead of `"name"`.

Constants named `{class name}_{field name}` in `FS.java`. To avoid collision name, Use `name` option.

```java
@FieldSchemaClass(name = "myTodo") public class Todo {
  public String name;
}
```
{'fraction_non_alphanumeric': 0.13900414937759337, 'fraction_numerical': 0.004149377593360996, 'mean_word_length': 4.9826302729528535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7601257', 'n_tokens_mistral': 803, 'n_tokens_neox': 760, 'n_words': 209}