public interface NativeFunctionClassInjector
This interface is used to inject classes into the constructors of the parent classes of native methods.
The following classes are automatically injected to be used with any library:
The following classes are automatically injected to be used with any library:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddInjectableInstance(Object object) Add an instance of anything to be injected into a constructor, by knowing its superclass.voidaddScopedInjectableInstance(Object object, List<Class<?>> permittedClasses) Add an instance of anything to be injected into a constructor, by knowing its superclass.voidaddScopedInjectableInstanceByNames(Object object, List<String> permittedClassNames) Add an instance of anything to be injected into a constructor, by knowing its superclass.
-
Method Details
-
addInjectableInstance
Add an instance of anything to be injected into a constructor, by knowing its superclass.- Parameters:
object- The instance to inject
-
addScopedInjectableInstance
Add an instance of anything to be injected into a constructor, by knowing its superclass. Only classes in the permittedClasses list will be injected. If the class is not included in the list, it will act as if it does not exist and may cause an error.- Parameters:
object- The instance to injectpermittedClasses- The classes that are allowed to be injected
-
addScopedInjectableInstanceByNames
Add an instance of anything to be injected into a constructor, by knowing its superclass. Only classes with a name in the permittedClassNames list will be injected. If the class is not included in the list, it will act as if it does not exist and may cause an error.- Parameters:
object- The instance to injectpermittedClassNames- The class names that are allowed to be injected
-