Class BeanDefinitionReferenceWriter

All Implemented Interfaces:
ClassOutputWriter, OriginatingElements, org.objectweb.asm.Opcodes

@Internal public class BeanDefinitionReferenceWriter extends AbstractAnnotationMetadataWriter
Writes the bean definition class file to disk.
Since:
1.0
Author:
Graeme Rocher, Denis Stepanov
See Also:
  • Field Details

  • Constructor Details

    • BeanDefinitionReferenceWriter

      public BeanDefinitionReferenceWriter(BeanDefinitionVisitor visitor, VisitorContext visitorContext)
      Default constructor.
      Parameters:
      visitor - The visitor
      visitorContext - The visitor context
  • Method Details

    • accept

      public void accept(ClassWriterOutputVisitor outputVisitor) throws IOException
      Accept an ClassWriterOutputVisitor to write all generated classes.
      Parameters:
      outputVisitor - The ClassWriterOutputVisitor
      Throws:
      IOException - If an error occurs
    • setContextScope

      public void setContextScope(boolean contextScope)
      Set whether the bean should be in context scope.
      Parameters:
      contextScope - The context scope
    • setRequiresMethodProcessing

      public void setRequiresMethodProcessing(boolean shouldPreProcess)
      Sets whether the BeanType.requiresMethodProcessing() returns true.
      Parameters:
      shouldPreProcess - True if they should be pre-processed
    • getBeanDefinitionQualifiedClassName

      public String getBeanDefinitionQualifiedClassName()
      Obtains the class name of the bean definition to be written. Java Annotation Processors need this information to create a JavaFileObject using a Filer.
      Returns:
      the class name of the bean definition to be written