public class AnnotationProcessingOutputVisitor extends AbstractClassWriterOutputVisitor
ClassWriterOutputVisitor
for annotation processing.Constructor and Description |
---|
AnnotationProcessingOutputVisitor(Filer filer) |
Modifier and Type | Method and Description |
---|---|
OutputStream |
visitClass(String classname,
Element... originatingElements)
Visits a new class and returns the output stream with which should be written the bytes of the class to be
generated.
|
OutputStream |
visitClass(String classname,
Element originatingElement)
Visits a new class and returns the output stream with which should be written the bytes of the class to be
generated.
|
Optional<GeneratedFile> |
visitGeneratedFile(String path)
Visit a file that will be generated within the generated sources directory.
|
Optional<GeneratedFile> |
visitMetaInfFile(String path)
Deprecated.
|
Optional<GeneratedFile> |
visitMetaInfFile(String path,
Element... originatingElements)
Visit a file within the META-INF directory of the classes directory.
|
finish, getServiceEntries, visitServiceDescriptor, writeServiceEntries
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitClass, visitServiceDescriptor
public OutputStream visitClass(String classname, @Nullable Element originatingElement) throws IOException
ClassWriterOutputVisitor
classname
- the fully qualified classnameoriginatingElement
- The originating elementIOException
- if an error occurs creating the output streampublic OutputStream visitClass(String classname, Element... originatingElements) throws IOException
ClassWriterOutputVisitor
Note that this method should only be called from a TypeElementVisitor.VisitorKind.AGGREGATING
visitor from within the TypeElementVisitor.finish(io.micronaut.inject.visitor.VisitorContext)
method. If the file
classname
- the fully qualified classnameoriginatingElements
- The originating elementsIOException
- if an error occurs creating the output stream@Deprecated public Optional<GeneratedFile> visitMetaInfFile(String path)
ClassWriterOutputVisitor
path
- The path to the filepublic Optional<GeneratedFile> visitMetaInfFile(String path, Element... originatingElements)
ClassWriterOutputVisitor
path
- The path to the fileoriginatingElements
- The originating elementspublic Optional<GeneratedFile> visitGeneratedFile(String path)
ClassWriterOutputVisitor
path
- The path