<commit_before>![](https://raw.github.com/wiki/EsotericSoftware/reflectasm/images/logo.png)

Please use the [ReflectASM discussion group](http://groups.google.com/group/reflectasm-users) for support.

## Overview

ReflectASM is a very small Java library that provides high performance reflection by using code generation. An access class is generated to set/get fields, call methods, or create a new instance. The access class uses bytecode rather than Java's reflection, so it is much faster. It can also access primitive fields via bytecode to avoid boxing.

## Performance

![](http://chart.apis.google.com/chart?chma=100&chtt=Field%20Set/Get&chs=700x62&chd=t:1402081,11339107&chds=0,11339107&chxl=0:|Java%20Reflection|FieldAccess&cht=bhg&chbh=10&chxt=y&chco=6600FF)

![](http://chart.apis.google.com/chart?chma=100&chtt=Method%20Call&chs=700x62&chd=t:97390,208750&chds=0,208750&chxl=0:|Java%20Reflection|MethodAccess&cht=bhg&chbh=10&chxt=y&chco=6600AA)

![](http://chart.apis.google.com/chart?chma=100&chtt=Constructor&chs=700x62&chd=t:2853063,5828993&chds=0,5828993&chxl=0:|Java%20Reflection|ConstructorAccess&cht=bhg&chbh=10&chxt=y&chco=660066)

The source code for these benchmarks is included in the project. The above charts were generated on Oracle's Java 7u3, server VM.

## Installation

To use reflectasm with maven, please use the following snippet in your pom.xml

```xml
    <dependency>
        <groupId>com.esotericsoftware</groupId>
        <artifactId>reflectasm</artifactId>
        <version>1.11.1</version>
    </dependency>
```

If you already have asm in a different version (than the one pulled in by reflectasm - see pom.xml) in your classpath, you should use the shaded reflectasm (contains relocated asm classes):

```xml
<dependency>
  <groupId>com.esotericsoftware</groupId>
  <artifactId>reflectasm</artifactId>
  <version>1.11.1</version>
  <classifier>shaded</classifier>
  <exclusions>
    <exclusion>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
    </exclusion>
  </exclusions>
</dependency>
```

## Usage<commit_msg>Update README for release 1.11.2<commit_after>![](https://raw.github.com/wiki/EsotericSoftware/reflectasm/images/logo.png)

Please use the [ReflectASM discussion group](http://groups.google.com/group/reflectasm-users) for support.

## Overview

ReflectASM is a very small Java library that provides high performance reflection by using code generation. An access class is generated to set/get fields, call methods, or create a new instance. The access class uses bytecode rather than Java's reflection, so it is much faster. It can also access primitive fields via bytecode to avoid boxing.

## Performance

![](http://chart.apis.google.com/chart?chma=100&chtt=Field%20Set/Get&chs=700x62&chd=t:1402081,11339107&chds=0,11339107&chxl=0:|Java%20Reflection|FieldAccess&cht=bhg&chbh=10&chxt=y&chco=6600FF)

![](http://chart.apis.google.com/chart?chma=100&chtt=Method%20Call&chs=700x62&chd=t:97390,208750&chds=0,208750&chxl=0:|Java%20Reflection|MethodAccess&cht=bhg&chbh=10&chxt=y&chco=6600AA)

![](http://chart.apis.google.com/chart?chma=100&chtt=Constructor&chs=700x62&chd=t:2853063,5828993&chds=0,5828993&chxl=0:|Java%20Reflection|ConstructorAccess&cht=bhg&chbh=10&chxt=y&chco=660066)

The source code for these benchmarks is included in the project. The above charts were generated on Oracle's Java 7u3, server VM.

## Installation

To use reflectasm with maven, please use the following snippet in your pom.xml

```xml
    <dependency>
        <groupId>com.esotericsoftware</groupId>
        <artifactId>reflectasm</artifactId>
        <version>1.11.2</version>
    </dependency>
```

If you already have asm in a different version (than the one pulled in by reflectasm - see pom.xml) in your classpath, you should use the shaded reflectasm (contains relocated asm classes):

```xml
<dependency>
  <groupId>com.esotericsoftware</groupId>
  <artifactId>reflectasm</artifactId>
  <version>1.11.2</version>
  <classifier>shaded</classifier>
  <exclusions>
    <exclusion>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
    </exclusion>
  </exclusions>
</dependency>
```

## Usage
{'fraction_non_alphanumeric': 0.12867734991628796, 'fraction_numerical': 0.06409949772781631, 'mean_word_length': 5.6912, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '1581392', 'n_tokens_mistral': 1620, 'n_tokens_neox': 1379, 'n_words': 317}