# Interface AdhocObjectFactory

All Known Implementing Classes:
  `DefaultAdhocObjectFactory`

public interface AdhocObjectFactory
Creates objects for user-provided String class names, injecting dependencies into them.

Since:
  3.1

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T> Class<? extends T>`
  `getJavaClass(String className)`
  Returns a Java class loaded using ClassLoader returned from `ClassLoaderManager.getClassLoader(String)` for a given class name.
  `<T> T`
  `newInstance(Class<? super T> superType, Class<? extends T> type, boolean skipInjection)`
  Returns an instance of "type" that implements "superType", injecting dependencies from the registry into it if requested
  `default <T> T`
  `newInstance(Class<? super T> superType, String className)`
  Returns an instance of "className" that implements "superType", injecting dependencies from the registry into it.
  `<T> T`
  `newInstance(Class<? super T> superType, String className, boolean skipInjection)`
  Returns an instance of "className" that implements "superType", injecting dependencies from the registry into it if requested

- ## Method Details

  - ### newInstance

    default <T> T newInstance(Class<? super T> superType, String className)
    Returns an instance of "className" that implements "superType", injecting dependencies from the registry into it.

  - ### newInstance

    <T> T newInstance(Class<? super T> superType, String className, boolean skipInjection)
    Returns an instance of "className" that implements "superType", injecting dependencies from the registry into it if requested
    Since:
      5.0

  - ### newInstance

    <T> T newInstance(Class<? super T> superType, Class<? extends T> type, boolean skipInjection)
    Returns an instance of "type" that implements "superType", injecting dependencies from the registry into it if requested
    Since:
      5.0

  - ### getJavaClass

    <T> Class<? extends T> getJavaClass(String className)
    Returns a Java class loaded using ClassLoader returned from `ClassLoaderManager.getClassLoader(String)` for a given class name.
    Since:
      4.0