# objenesis
**Repository Path**: jasonchencc/objenesis
## Basic Information
- **Project Name**: objenesis
- **Description**: Okay, it's pretty easy to instantiate objects in Java through standard reflection. However there are many cases where you need to go beyond what reflection provides. For example, if there's no public constructor, you want to bypass the constructor code, or set final fields. There are numerous clever (but fiddly) approaches to getting around this and this library provides a simple way to get at them. You will find the official site here.
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-04-15
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Objenesis
Objenesis is a library dedicated to bypass the constructor when creating an object. On any JVM there is.
You can find the website and user documentation at [objenesis.org](http://objenesis.org).
# Developer information
## Project status
[](https://travis-ci.org/easymock/objenesis)
[](https://maven-badges.herokuapp.com/maven-central/org.objenesis/objenesis)
## Environment setup
I'm using:
- Maven 3.5.3
- IntelliJ Ultimate 2018.2 (thanks to JetBrains for the license) (it should also work with Eclipse)
To configure your local workspace:
- Import the Maven parent project to Eclipse or IntelliJ
- Import the Eclipse formatting file `objenesis-formatting.xml` (usable in Eclipse or IntelliJ)
## To build with Maven
There are two different levels of build.
### Build without any active profile
It is a basic compilation of the application.
`mvn install`
### Full build
This build will create the source and javadoc jars and run spotbugs.
`mvn install -Pfull`
## To run special builds
### Run the Android TCK
- Install the Android SDK (`brew cask install android-sdk`)
- Install `platform-tools` and `build-tools` using the sdkmanager (`sdkmanager "platform-tools" "build-tools"`)
- Add an `ANDROID_HOME` to target the Android SDK (`export ANDROID_HOME=$(realpath $(echo "$(dirname $(readlink $(which sdkmanager)))/../.."))`)
- Configure a device (real or simulated) and launch it
- Activate the debug mode if it's a real device
- `mvn package -Pandroid`
### Run the benchmarks
```bash
mvn package -Pbenchmark
cd benchmark
./launch.sh
```
### Generate the website
`mvn package -Pwebsite`
## To update the versions
- `mvn versions:set -DnewVersion=X.Y -Pall`
- `mvn versions:commit -Pall` if everything is ok, `mvn versions:revert -Pall` otherwise
## Configure to deploy to the Sonatype maven repository
- You will first need to add something like this to your settings.xml
```xml