Class AndroidEntryPointProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- dagger.hilt.processor.internal.BaseProcessor
-
- dagger.hilt.android.processor.internal.androidentrypoint.AndroidEntryPointProcessor
-
- All Implemented Interfaces:
javax.annotation.processing.Processor
@IncrementalAnnotationProcessor(ISOLATING) @AutoService(javax.annotation.processing.Processor.class) public final class AndroidEntryPointProcessor extends BaseProcessor
Processor that creates a module for classes marked withdagger.hilt.android.AndroidEntryPoint.
-
-
Constructor Summary
Constructors Constructor Description AndroidEntryPointProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandelayErrors()java.util.Set<java.lang.String>getSupportedAnnotationTypes()voidprocessEach(javax.lang.model.element.TypeElement annotation, javax.lang.model.element.Element element)Called for each element in a round that uses a supported annotation.-
Methods inherited from class dagger.hilt.processor.internal.BaseProcessor
additionalProcessingOptions, claimAnnotations, getElementUtils, getErrorHandler, getMessager, getProcessingEnv, getSupportedOptions, getSupportedSourceVersion, getTypeUtils, init, postRoundProcess, preRoundProcess, process
-
-
-
-
Method Detail
-
getSupportedAnnotationTypes
public java.util.Set<java.lang.String> getSupportedAnnotationTypes()
- Specified by:
getSupportedAnnotationTypesin interfacejavax.annotation.processing.Processor- Overrides:
getSupportedAnnotationTypesin classjavax.annotation.processing.AbstractProcessor
-
delayErrors
public boolean delayErrors()
- Overrides:
delayErrorsin classBaseProcessor- Returns:
- true if you want to delay errors to the last round. Useful if the processor generates code for symbols used a lot in the user code. Delaying allows as much code to compile as possible for correctly configured types and reduces error spam.
-
processEach
public void processEach(javax.lang.model.element.TypeElement annotation, javax.lang.model.element.Element element) throws java.lang.ExceptionDescription copied from class:BaseProcessorCalled for each element in a round that uses a supported annotation. Note that an exception can be thrown for each element in the round. This is usually preferred over throwing only the first exception in a round. Only throwing the first exception in the round can lead to flaky errors that are dependent on the non-deterministic ordering that the elements are processed in.- Overrides:
processEachin classBaseProcessor- Throws:
java.lang.Exception
-
-