public class SchemaProcessor
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SchemaProcessor.Cache |
static class |
SchemaProcessor.InMemoryCache |
static class |
SchemaProcessor.Instance |
private static class |
SchemaProcessor.ParameterizedTypeImpl |
static class |
SchemaProcessor.ReflectionValueExtractor |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Class<?> |
persistenceCapable |
private boolean |
setClassAsTitle |
private boolean |
useReflectionForDefaults |
| Constructor and Description |
|---|
SchemaProcessor() |
SchemaProcessor(boolean setClassAsTitle,
boolean useReflectionForDefaults) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.function.BiPredicate<java.lang.reflect.Type,java.lang.String> |
createIgnorePredicate(java.lang.Class<?> from) |
private java.lang.String |
decapitalize(java.lang.String name) |
private Schema |
doMapSchemaFromClass(java.lang.reflect.Type model,
SchemaProcessor.Cache cache,
SchemaProcessor.ReflectionValueExtractor reflectionValueExtractor,
SchemaProcessor.Instance instance) |
private java.lang.reflect.Type |
extractRealType(java.lang.Class<?> root,
java.lang.reflect.Type type) |
protected void |
fillMeta(java.lang.reflect.Field f,
Schema schema) |
void |
fillSchema(java.lang.reflect.Type rawModel,
Schema schema,
SchemaProcessor.Cache cache,
SchemaProcessor.ReflectionValueExtractor reflectionValueExtractor,
SchemaProcessor.Instance instance) |
private java.util.Optional<java.lang.String> |
find(java.lang.String method,
java.lang.annotation.Annotation doc) |
protected java.util.Optional<java.lang.annotation.Annotation> |
findDocAnnotation(java.lang.reflect.Field f) |
private java.lang.String |
findFieldName(java.lang.reflect.Field f) |
private java.lang.String |
findMethodName(java.lang.reflect.Method m) |
private void |
getOrCreateReusableObjectComponent(java.lang.Class<?> from,
Schema schema,
SchemaProcessor.Cache cache,
SchemaProcessor.ReflectionValueExtractor reflectionValueExtractor,
SchemaProcessor.Instance instance) |
private void |
handleRequired(Schema schema,
java.util.function.Supplier<java.lang.String> nameSupplier) |
private boolean |
isStringable(java.lang.reflect.Type model) |
private boolean |
isVisible(java.lang.reflect.AnnotatedElement elt,
int modifiers) |
Schema |
mapSchemaFromClass(java.lang.reflect.Type model) |
Schema |
mapSchemaFromClass(java.lang.reflect.Type model,
SchemaProcessor.Cache cache) |
protected void |
onIgnored(Schema schema,
java.lang.reflect.Field f,
SchemaProcessor.Cache cache) |
private java.lang.reflect.Type |
resolveParameterizedType(java.lang.reflect.Type type,
java.lang.Class<?> declaringClass) |
private java.lang.reflect.Type |
resolveType(java.lang.reflect.Type type,
java.lang.Class<?> declaringClass) |
private java.util.Map<java.lang.reflect.Type,java.lang.reflect.Type> |
toResolvedTypes(java.lang.reflect.Type clazz,
int maxIt) |
private java.lang.reflect.Type |
unwrapType(java.lang.reflect.Type rawModel) |
private final java.lang.Class<?> persistenceCapable
private final boolean setClassAsTitle
private final boolean useReflectionForDefaults
public SchemaProcessor()
public SchemaProcessor(boolean setClassAsTitle,
boolean useReflectionForDefaults)
public Schema mapSchemaFromClass(java.lang.reflect.Type model)
public Schema mapSchemaFromClass(java.lang.reflect.Type model, SchemaProcessor.Cache cache)
private Schema doMapSchemaFromClass(java.lang.reflect.Type model, SchemaProcessor.Cache cache, SchemaProcessor.ReflectionValueExtractor reflectionValueExtractor, SchemaProcessor.Instance instance)
public void fillSchema(java.lang.reflect.Type rawModel,
Schema schema,
SchemaProcessor.Cache cache,
SchemaProcessor.ReflectionValueExtractor reflectionValueExtractor,
SchemaProcessor.Instance instance)
private void getOrCreateReusableObjectComponent(java.lang.Class<?> from,
Schema schema,
SchemaProcessor.Cache cache,
SchemaProcessor.ReflectionValueExtractor reflectionValueExtractor,
SchemaProcessor.Instance instance)
protected void fillMeta(java.lang.reflect.Field f,
Schema schema)
protected java.util.Optional<java.lang.annotation.Annotation> findDocAnnotation(java.lang.reflect.Field f)
private java.util.Optional<java.lang.String> find(java.lang.String method,
java.lang.annotation.Annotation doc)
protected void onIgnored(Schema schema, java.lang.reflect.Field f, SchemaProcessor.Cache cache)
protected java.util.function.BiPredicate<java.lang.reflect.Type,java.lang.String> createIgnorePredicate(java.lang.Class<?> from)
private boolean isVisible(java.lang.reflect.AnnotatedElement elt,
int modifiers)
private java.lang.reflect.Type unwrapType(java.lang.reflect.Type rawModel)
private boolean isStringable(java.lang.reflect.Type model)
private void handleRequired(Schema schema, java.util.function.Supplier<java.lang.String> nameSupplier)
private java.lang.String findFieldName(java.lang.reflect.Field f)
private java.lang.String findMethodName(java.lang.reflect.Method m)
private java.lang.String decapitalize(java.lang.String name)
private java.lang.reflect.Type resolveType(java.lang.reflect.Type type,
java.lang.Class<?> declaringClass)
private java.lang.reflect.Type resolveParameterizedType(java.lang.reflect.Type type,
java.lang.Class<?> declaringClass)
private java.util.Map<java.lang.reflect.Type,java.lang.reflect.Type> toResolvedTypes(java.lang.reflect.Type clazz,
int maxIt)
private java.lang.reflect.Type extractRealType(java.lang.Class<?> root,
java.lang.reflect.Type type)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.