Class ExtensionReader
- java.lang.Object
-
- io.smallrye.openapi.runtime.io.extension.ExtensionReader
-
public class ExtensionReader extends Object
Reading the Extension annotation- Author:
- Phillip Kruger ([email protected]), Eric Wittmann ([email protected])
- See Also:
- specificationExtensions
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getExtensionName(org.jboss.jandex.AnnotationInstance annotation)
static List<org.jboss.jandex.AnnotationInstance>
getExtensionsAnnotations(org.jboss.jandex.AnnotationTarget target)
static void
readExtensions(com.fasterxml.jackson.databind.JsonNode node, org.eclipse.microprofile.openapi.models.Extensible<?> model)
Reads model extensions.static Map<String,Object>
readExtensions(AnnotationScannerContext context, List<org.jboss.jandex.AnnotationInstance> extensions)
Reads a List of Extension annotations.static Map<String,Object>
readExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance extensible)
static Map<String,Object>
readExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue)
Reads an array of Extension annotations.static Object
readExtensionValue(AnnotationScannerContext context, String name, org.jboss.jandex.AnnotationInstance annotationInstance)
Reads a single Extension annotation.
-
-
-
Method Detail
-
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(org.jboss.jandex.AnnotationTarget target)
-
getExtensionName
public static String getExtensionName(org.jboss.jandex.AnnotationInstance annotation)
-
-