Class SingletonExtension<E,​T extends Trait>

  • Direct Known Subclasses:
    SpringBeanExtension

    public abstract class SingletonExtension<E,​T extends Trait>
    extends java.lang.Object
    A singleton extension API implementor. The singleton extension continues to exist after the extensible has been collected. The instance of this extension is shared among Extensibles defining extension-points that this extension is bound to.The Trait it requires is set at call-time on the local thread.
    Author:
    Bogdan Horje
    • Constructor Summary

      Constructors 
      Constructor Description
      SingletonExtension​(java.lang.Class<T> traitClass)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean acceptsTrait​(java.lang.Object trait)  
      boolean acceptsTraitClass​(java.lang.Class<?> aTraitClass)  
      protected T getTrait()  
      • Methods inherited from class java.lang.Object

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

      • SingletonExtension

        public SingletonExtension​(java.lang.Class<T> traitClass)
    • Method Detail

      • acceptsTrait

        public boolean acceptsTrait​(java.lang.Object trait)
      • acceptsTraitClass

        public boolean acceptsTraitClass​(java.lang.Class<?> aTraitClass)
      • getTrait

        protected T getTrait()
        Returns:
        the Trait instance of the current execution extension call.