> For the complete documentation index, see [llms.txt](https://failutee.gitbook.io/mineject/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://failutee.gitbook.io/mineject/core-features/component-and-injectable.md).

# @Component & @Injectable

This is enough for Mineject to initialize the <mark style="color:blue;">TestManager</mark> object and add it to the list of dependencies.

```java
import xyz.failutee.mineject.annotation.Component;

@Component
public class TestManager {

    public void test() {
        System.out.println("Its just a test!");
    }
}
```

Now if you want to inject the <mark style="color:blue;">TestManager</mark> object into the constructor you can do it like this.

Remember to use the <mark style="color:blue;">@Injectable</mark> annotation in the constructor!

```java
import xyz.failutee.mineject.annotation.Component;
import xyz.failutee.mineject.annotation.Injectable;

@Component
public class IAmDependentOnAnotherClass {
    
    private final TestManager testManager;
    
    @Injectable
    public IAmDependentOnAnotherClass(TestManager testManager) {
        this.testManager = testManager;
    }

    public TestManager getTestManager() {
        return this.testManager;
    }
}
```
