Class OciInjectionProcessorObserver

java.lang.Object
io.helidon.integrations.oci.sdk.processor.OciInjectionProcessorObserver
All Implemented Interfaces:
InjectionAnnotationProcessorObserver

public class OciInjectionProcessorObserver extends Object implements InjectionAnnotationProcessorObserver
This processor is an implementation of InjectionAnnotationProcessorObserver. When on the APT classpath, it will monitor InjectionAnnotationProcessor for all injection points that are using the OCI SDK Services and translate those injection points into code-generated Activators, ModuleComponent, etc. for those services / components. This process will therefore make the OCI SDK set of services injectable by your (non-MP-based) Helidon application, and be tailored to exactly what is actually used by your application from the SDK.

For example, if your code had this:

 
   @Inject
   com.oracle.bmc.ObjectStorage objStore;
 
 
This would result in code generating the necessary artifacts at compile time that will make ObjectStorage injectable.

All injection points using the same package name as the OCI SDK (e.g., com.oracle.bmc as shown with ObjectStorage in the case above) will be observed and processed and eventually result in code generation into your target/generated-sources directory. This is the case for any artifact that is attempted to be injected unless there is found a configuration signaling an exception to avoid the code generation for the activator.

The processor will allows exceptions in one of three ways:

  • via the code directly here - see the shouldProcess(io.helidon.common.types.TypedElementInfo, javax.annotation.processing.ProcessingEnvironment) method.
  • via resources on the classpath - the implementation looks for files named TAG_TYPENAME_EXCEPTIONS in the same package name as this class, and will read those resources during initialization. Each line of this file would be a fully qualified type name to avoid processing that type name.
  • via -A directives on the compiler command line. Using the same tag as referenced above. The line can be comma-delimited, and each token will be treated as a fully qualified type name to signal that the type should be not be processed.