Class InstanceRegistry

java.lang.Object
io.datarouter.inject.InstanceRegistry

@Singleton
public class InstanceRegistry
extends java.lang.Object
For manually tracking instances in prototype scope or those created with 'new'
  • Constructor Summary

    Constructors 
    Constructor Description
    InstanceRegistry()  
  • Method Summary

    Modifier and Type Method Description
    <T> java.util.Collection<T> getAllInstancesOfType​(java.lang.Class<T> type)  
    void register​(java.lang.Object obj)  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • register

      public void register​(java.lang.Object obj)
    • getAllInstancesOfType

      public <T> java.util.Collection<T> getAllInstancesOfType​(java.lang.Class<T> type)