Class MinijaxInjector

java.lang.Object
org.minijax.cdi.MinijaxInjector
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable

public class MinijaxInjector
extends java.lang.Object
implements java.io.Closeable
The MinijaxInjector class provides a Minijax-container-aware implementation of Java CDI (JSR 330). The implementation is heavily inspired by Feather.
  • Constructor Summary

    Constructors
    Constructor Description
    MinijaxInjector()  
  • Method Summary

    Modifier and Type Method Description
    void addFieldAnnotationProcessor​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, FieldAnnotationProcessor<?> processor)  
    void addTypeAnnotationProcessor​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, TypeAnnotationProcessor<?> processor)  
    MinijaxInjector bind​(java.lang.Class<?> component, java.lang.Class<?> contract)  
    MinijaxInjector bind​(java.lang.Class<?> component, java.lang.Class<?> contract, java.lang.Class<? extends java.lang.annotation.Annotation> qualifier)  
    MinijaxInjector bind​(java.lang.Class<?> component, java.lang.Class<?> contract, java.lang.String name)  
    MinijaxInjector bind​(java.lang.Object instance, java.lang.Class<?> contract)  
    void close()  
    <T> MinijaxProvider<T> getProvider​(java.lang.Class<T> c)  
    <T> MinijaxProvider<T> getProvider​(java.lang.Class<T> c, java.lang.annotation.Annotation[] annotations)  
    <T> T getResource​(java.lang.Class<T> c)  
    <T> T getResource​(java.lang.Class<T> c, java.lang.Object context)  
    java.util.Set<java.lang.Object> getSingletons()  
    <T> T initResource​(T resource, java.lang.Object context)  
    boolean isInjectedField​(java.lang.Class<?> annotationType)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MinijaxInjector

      public MinijaxInjector()
  • Method Details

    • addTypeAnnotationProcessor

      public void addTypeAnnotationProcessor​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, TypeAnnotationProcessor<?> processor)
    • addFieldAnnotationProcessor

      public void addFieldAnnotationProcessor​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, FieldAnnotationProcessor<?> processor)
    • isInjectedField

      public boolean isInjectedField​(java.lang.Class<?> annotationType)
    • bind

      public MinijaxInjector bind​(java.lang.Object instance, java.lang.Class<?> contract)
    • bind

      public MinijaxInjector bind​(java.lang.Class<?> component, java.lang.Class<?> contract)
    • bind

      public MinijaxInjector bind​(java.lang.Class<?> component, java.lang.Class<?> contract, java.lang.Class<? extends java.lang.annotation.Annotation> qualifier)
    • bind

      public MinijaxInjector bind​(java.lang.Class<?> component, java.lang.Class<?> contract, java.lang.String name)
    • getSingletons

      public java.util.Set<java.lang.Object> getSingletons()
    • getResource

      public <T> T getResource​(java.lang.Class<T> c)
    • getResource

      public <T> T getResource​(java.lang.Class<T> c, java.lang.Object context)
    • initResource

      public <T> T initResource​(T resource, java.lang.Object context)
    • getProvider

      public <T> MinijaxProvider<T> getProvider​(java.lang.Class<T> c)
    • getProvider

      public <T> MinijaxProvider<T> getProvider​(java.lang.Class<T> c, java.lang.annotation.Annotation[] annotations)
    • close

      public void close()
      Specified by:
      close in interface java.lang.AutoCloseable
      Specified by:
      close in interface java.io.Closeable