<commit_before>---
layout: default
title: Transfuse
---


### About

Transfuse is a Java Dependency Injection (DI) and integration library geared specifically for the Google Android API.  Transfuse gives users the ability to develop Android components in a Point of Java Object (POJO) method, allowing the Android code to be more testable, decoupled and flexible.  

There are several key features that differentiate Transfuse from other DI and integration libraries:


<ul class="square">
<li>The code supporting a Transfuse application is generated at compile time, rather than at runtime.  This allows the library to avoid overhead associated with runtime reflection and bytecode generation.  In addition, using this compile time code generation technique Transfuse puts a variety of AOP features within reach. </li>
<li>Transfuse is also extremely easy to use.  All that is needed is the Transfuse API and core library on the classpath during compilation.  The Java Annotation Processor handles the rest. </li>
<li> The Java DI and integration library allows the user more freedom with coding and with the framework. It removes much of the boiler plate code, and streamlines the coding. 
</li> </ul>

### Example
An example of an Activity built using another Java DI normally looks like this:



Using Transfuse, that same Activity now looks like the following:


{% highlight java %}
// Example Transfuse Activity
@Activity(label = "@string/app_name")
@Layout(R.layout.main)
public class HelloTransfuse {

    @Inject @View(R.id.textview)
    private TextView textView;

    @Inject @Resource(R.string.hello)
    private String helloText;

    @OnCreate
    public void hello() {
        textView.setText(helloText);
    }<commit_msg>wording fixes<commit_after>---
layout: default
title: Transfuse
---


### About

Transfuse is a Java Dependency Injection (DI) and integration library geared specifically for the Google Android API.  Transfuse gives users the ability to develop Android components in a Plain old Java Object (POJO) style, allowing the Android code to be more testable, decoupled and flexible.  

There are several key features that make Transfuse a great framework to use with Android:


<ul class="square">
<li>The code supporting a Transfuse application is generated at compile time, rather than at runtime.  This allows the library to avoid overhead associated with runtime reflection and bytecode generation.  In addition, using this compile time code generation technique Transfuse puts a variety of AOP features within reach. </li>
<li>Transfuse is also extremely easy to use.  All that is needed is the Transfuse API and core library on the classpath during compilation.  The Java Annotation Processor handles the rest. </li>
<li> The Java DI and integration library allows the user more freedom with coding and with the framework. It removes much of the boiler plate code, and streamlines the coding. 
</li> </ul>

### Example

Using Transfuse, an Android Activity looks like the following:


{% highlight java %}
// Example Transfuse Activity
@Activity(label = "@string/app_name")
@Layout(R.layout.main)
public class HelloTransfuse {

    @Inject @View(R.id.textview)
    private TextView textView;

    @Inject @Resource(R.string.hello)
    private String helloText;

    @OnCreate
    public void hello() {
        textView.setText(helloText);
    }
{'fraction_non_alphanumeric': 0.062389118864577174, 'fraction_numerical': 0.0, 'mean_word_length': 4.2859375, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1099179', 'n_tokens_mistral': 874, 'n_tokens_neox': 841, 'n_words': 445}