Class ConfigTypedFactory<T>

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
    Direct Known Subclasses:
    DefaultIoFactory

    public abstract class ConfigTypedFactory<T>
    extends Object
    implements org.springframework.context.ApplicationContextAware
    • Constructor Detail

      • ConfigTypedFactory

        protected ConfigTypedFactory​(File configFile)
      • ConfigTypedFactory

        protected ConfigTypedFactory​(InputStream is)
      • ConfigTypedFactory

        protected ConfigTypedFactory​(String defaultConfig)
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext context)
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
      • getDefaultConfigFile

        protected static InputStream getDefaultConfigFile​(String configLocation)
      • isKnown

        public boolean isKnown​(String type)
      • getKnownTypes

        public Set<String> getKnownTypes()
      • hasCacheEntry

        public boolean hasCacheEntry​(String type)
      • getCacheEntry

        public T getCacheEntry​(String type)
      • getFallbackConfigResource

        protected abstract String getFallbackConfigResource()
        Tries to load a default config file which can be found by the target type's classloader.
        Returns:
        a relative path to the config within the jar
        See Also:
        getTargetType()
      • getTargetType

        protected abstract Class<?> getTargetType()
        Returns:
        the type this factory creates
      • initInstance

        protected T initInstance​(T instance)