Class ExtensionReader
java.lang.Object
io.smallrye.openapi.runtime.io.extension.ExtensionReader
Reading the Extension annotation
- Author:
- Phillip Kruger (phillip.kruger@redhat.com), Eric Wittmann (eric.wittmann@gmail.com)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetExtensionName(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotation) static List<org.jboss.jandex.AnnotationInstance>getExtensionsAnnotations(AnnotationScannerContext context, org.jboss.jandex.AnnotationTarget target) static voidreadExtensions(com.fasterxml.jackson.databind.JsonNode node, org.eclipse.microprofile.openapi.models.Extensible<?> model) Reads model extensions.readExtensions(AnnotationScannerContext context, List<org.jboss.jandex.AnnotationInstance> extensions) Reads a List of Extension annotations.readExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance extensible) readExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue) Reads an array of Extension annotations.static ObjectreadExtensionValue(AnnotationScannerContext context, String name, org.jboss.jandex.AnnotationInstance annotationInstance) Reads a single Extension annotation.
-
Method Details
-
readExtensions
public static Map<String,Object> readExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue) Reads an array of Extension annotations. The AnnotationValue in this case is an array of Extension annotations. These must be read and converted into a Map.- Parameters:
context- the scanning contextannotationValue- map of @Extension annotations- Returns:
- Map of Objects
-
readExtensions
public static Map<String,Object> readExtensions(AnnotationScannerContext context, List<org.jboss.jandex.AnnotationInstance> extensions) Reads a List of Extension annotations. These must be read and converted into a Map.- Parameters:
context- the scanning contextextensions- List of @Extension annotations- Returns:
- Map of Objects
-
readExtensions
public static Map<String,Object> readExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance extensible) -
readExtensionValue
public static Object readExtensionValue(AnnotationScannerContext context, String name, org.jboss.jandex.AnnotationInstance annotationInstance) Reads a single Extension annotation. If the value must be parsed (as indicated by the 'parseValue' attribute of the annotation), the parsing is delegated to the extensions currently set in the scanner. The default value will parse the string using Jackson.- Parameters:
context- the scanning contextname- the name of the extensionannotationInstance- @Extension annotation- Returns:
- a Java representation of the 'value' property, either a String or parsed value
-
readExtensions
public static void readExtensions(com.fasterxml.jackson.databind.JsonNode node, org.eclipse.microprofile.openapi.models.Extensible<?> model) Reads model extensions.- Parameters:
node- the json objectmodel- the model to read to
-
getExtensionsAnnotations
public static List<org.jboss.jandex.AnnotationInstance> getExtensionsAnnotations(AnnotationScannerContext context, org.jboss.jandex.AnnotationTarget target) -
getExtensionName
public static String getExtensionName(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotation)
-