Class AbstractAnnotationMetadataWriter

    • Field Detail

      • FIELD_ANNOTATION_METADATA

        public static final java.lang.String FIELD_ANNOTATION_METADATA
        Field name for annotation metadata.
        See Also:
        Constant Field Values
      • targetClassType

        protected final org.objectweb.asm.Type targetClassType
      • annotationMetadata

        protected final io.micronaut.core.annotation.AnnotationMetadata annotationMetadata
      • loadTypeMethods

        protected final java.util.Map<java.lang.String,​org.objectweb.asm.commons.GeneratorAdapter> loadTypeMethods
      • defaults

        protected final java.util.Map<java.lang.String,​java.lang.Integer> defaults
    • Constructor Detail

      • AbstractAnnotationMetadataWriter

        protected AbstractAnnotationMetadataWriter​(java.lang.String className,
                                                   OriginatingElements originatingElements,
                                                   io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
                                                   boolean writeAnnotationDefaults)
        Parameters:
        className - The class name
        originatingElements - The originating elements
        annotationMetadata - The annotation metadata
        writeAnnotationDefaults - Whether to write annotation defaults
      • AbstractAnnotationMetadataWriter

        protected AbstractAnnotationMetadataWriter​(java.lang.String className,
                                                   Element originatingElement,
                                                   io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
                                                   boolean writeAnnotationDefaults)
        Parameters:
        className - The class name
        originatingElement - The originating element
        annotationMetadata - The annotation metadata
        writeAnnotationDefaults - Whether to write annotation defaults
    • Method Detail

      • writeGetAnnotationMetadataMethod

        protected void writeGetAnnotationMetadataMethod​(org.objectweb.asm.ClassWriter classWriter)
        Parameters:
        classWriter - The ClassWriter
      • beginAnnotationMetadataMethod

        @NonNull
        protected org.objectweb.asm.commons.GeneratorAdapter beginAnnotationMetadataMethod​(org.objectweb.asm.ClassWriter classWriter)
        Returns the generator adaptor for the method that resolves the annotation metadata.
        Parameters:
        classWriter - The class writer
        Returns:
        The generator adapter
      • writeAnnotationMetadataStaticInitializer

        protected void writeAnnotationMetadataStaticInitializer​(org.objectweb.asm.ClassWriter classWriter)
        Parameters:
        classWriter - The ClassWriter
      • writeAnnotationMetadataStaticInitializer

        protected void writeAnnotationMetadataStaticInitializer​(org.objectweb.asm.ClassWriter classWriter,
                                                                java.util.Map<java.lang.String,​java.lang.Integer> defaults)
        Parameters:
        classWriter - The ClassWriter
        defaults - The annotation defaults
      • initializeAnnotationMetadata

        protected void initializeAnnotationMetadata​(org.objectweb.asm.commons.GeneratorAdapter staticInit,
                                                    org.objectweb.asm.ClassWriter classWriter,
                                                    java.util.Map<java.lang.String,​java.lang.Integer> defaults)
        Parameters:
        staticInit - The GeneratorAdapter
        classWriter - The ClassWriter
        defaults - The annotation defaults