use of org.jboss.jandex.ClassType in project wildfly-swarm by wildfly-swarm.
the class OpenApiAnnotationScanner method readClassSchema.
/**
* Introspect into the given Class to generate a Schema model.
* @param value
*/
private Schema readClassSchema(AnnotationValue value, boolean schemaReferenceSupported) {
if (value == null) {
return null;
}
ClassType ctype = (ClassType) value.asClass();
Schema schema = introspectClassToSchema(ctype, schemaReferenceSupported);
return schema;
}
use of org.jboss.jandex.ClassType in project wildfly-swarm by wildfly-swarm.
the class OpenApiAnnotationScanner method readClassSchemas.
/**
* Reads an array of Class annotations to produce a list of {@link Schema} models.
* @param value
*/
private List<Schema> readClassSchemas(AnnotationValue value) {
if (value == null) {
return null;
}
LOG.debug("Processing a list of schema Class annotations.");
Type[] classArray = value.asClassArray();
List<Schema> schemas = new ArrayList<>(classArray.length);
for (Type type : classArray) {
ClassType ctype = (ClassType) type;
Schema schema = introspectClassToSchema(ctype, true);
schemas.add(schema);
}
return schemas;
}
use of org.jboss.jandex.ClassType in project wildfly-swarm by wildfly-swarm.
the class SchemaFactory method readClassSchemas.
private static List<Schema> readClassSchemas(IndexView index, AnnotationValue value) {
if (value == null) {
return null;
}
Type[] classArray = value.asClassArray();
List<Schema> schemas = new ArrayList<>(classArray.length);
for (Type type : classArray) {
ClassType ctype = (ClassType) type;
Schema schema = introspectClassToSchema(index, ctype);
schemas.add(schema);
}
return schemas;
}
Aggregations