Class ConfigurationPropertyJSONElementVisitor

    • Field Detail

      • ANNOTATION_CLASS_NAME

        public static final java.lang.String ANNOTATION_CLASS_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • ConfigurationPropertyJSONElementVisitor

        public ConfigurationPropertyJSONElementVisitor​(javax.annotation.processing.ProcessingEnvironment processingEnv)
    • Method Detail

      • visitVariableAsField

        public java.lang.Boolean visitVariableAsField​(javax.lang.model.element.VariableElement field,
                                                      java.lang.StringBuilder jsonBuilder)
        Processes the VariableElement annotated with ConfigurationProperty, converting its annotation values into a JSON structure within the provided StringBuilder.

        This method extracts the annotation attributes and appends them as key-value pairs in JSON format. If the "name" attribute is empty, it uses the variable's constant value as the name. Additionally, it appends metadata such as the source type and field name.

        Overrides:
        visitVariableAsField in class javax.lang.model.util.ElementKindVisitor6<java.lang.Boolean,​java.lang.StringBuilder>
        Parameters:
        field - the variable element being visited
        jsonBuilder - the string builder used to accumulate JSON content
        Returns:
        always returns null as no result needs to be propagated up the visitor chain