Enum TypeContextFactory
- java.lang.Object
-
- java.lang.Enum<TypeContextFactory>
-
- com.github.victools.jsonschema.generator.impl.TypeContextFactory
-
- All Implemented Interfaces:
Serializable
,Comparable<TypeContextFactory>
public enum TypeContextFactory extends Enum<TypeContextFactory>
Factory class for creatingTypeContext
instances.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TypeContext
createDefaultTypeContext()
Deprecated.usecreateDefaultTypeContext(SchemaGeneratorConfig)
insteadstatic TypeContext
createDefaultTypeContext(SchemaGeneratorConfig config)
Create the defaultTypeContext
withAnnotationInclusion.INCLUDE_AND_INHERIT_IF_INHERITED
.
This is equivalent to calling:TypeContextFactory.createTypeContext(AnnotationInclusion.INCLUDE_AND_INHERIT_IF_INHERITED)
static TypeContext
createTypeContext(com.fasterxml.classmate.AnnotationConfiguration annotationConfig)
Deprecated.static TypeContext
createTypeContext(com.fasterxml.classmate.AnnotationConfiguration annotationConfig, SchemaGeneratorConfig config)
Create the aTypeContext
with the givenAnnotationConfiguration
.static TypeContext
createTypeContext(com.fasterxml.classmate.AnnotationInclusion annotationInclusion)
Deprecated.static TypeContext
createTypeContext(com.fasterxml.classmate.AnnotationInclusion annotationInclusion, SchemaGeneratorConfig config)
Create the aTypeContext
with the givenAnnotationInclusion
.static TypeContextFactory
valueOf(String name)
Returns the enum constant of this type with the specified name.static TypeContextFactory[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static TypeContextFactory[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TypeContextFactory c : TypeContextFactory.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeContextFactory valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
createDefaultTypeContext
@Deprecated public static TypeContext createDefaultTypeContext()
Deprecated.usecreateDefaultTypeContext(SchemaGeneratorConfig)
insteadCreate the defaultTypeContext
withAnnotationInclusion.INCLUDE_AND_INHERIT_IF_INHERITED
.
This is equivalent to calling:TypeContextFactory.createTypeContext(AnnotationInclusion.INCLUDE_AND_INHERIT_IF_INHERITED)
- Returns:
- created
TypeContext
instance
-
createDefaultTypeContext
public static TypeContext createDefaultTypeContext(SchemaGeneratorConfig config)
Create the defaultTypeContext
withAnnotationInclusion.INCLUDE_AND_INHERIT_IF_INHERITED
.
This is equivalent to calling:TypeContextFactory.createTypeContext(AnnotationInclusion.INCLUDE_AND_INHERIT_IF_INHERITED)
- Parameters:
config
- configuration to consider- Returns:
- created
TypeContext
instance
-
createTypeContext
@Deprecated public static TypeContext createTypeContext(com.fasterxml.classmate.AnnotationInclusion annotationInclusion)
Deprecated.Create the aTypeContext
with the givenAnnotationInclusion
.
This is equivalent to calling:TypeContextFactory.createTypeContext(new AnnotationConfiguration.StdConfiguration(annotationInclusion))
- Parameters:
annotationInclusion
- indication which annotations to include during type resolution/introspection- Returns:
- created
TypeContext
instance
-
createTypeContext
public static TypeContext createTypeContext(com.fasterxml.classmate.AnnotationInclusion annotationInclusion, SchemaGeneratorConfig config)
Create the aTypeContext
with the givenAnnotationInclusion
.
This is equivalent to calling:TypeContextFactory.createTypeContext(new AnnotationConfiguration.StdConfiguration(annotationInclusion))
- Parameters:
annotationInclusion
- indication which annotations to include during type resolution/introspectionconfig
- configuration to consider- Returns:
- created
TypeContext
instance
-
createTypeContext
@Deprecated public static TypeContext createTypeContext(com.fasterxml.classmate.AnnotationConfiguration annotationConfig)
Deprecated.Create the aTypeContext
with the givenAnnotationConfiguration
.- Parameters:
annotationConfig
- configuration determining which annotations to include during type resolution/introspection- Returns:
- created
TypeContext
instance
-
createTypeContext
public static TypeContext createTypeContext(com.fasterxml.classmate.AnnotationConfiguration annotationConfig, SchemaGeneratorConfig config)
Create the aTypeContext
with the givenAnnotationConfiguration
.
Note: when providing an instance ofAnnotationConfiguration.StdConfiguration
as first parameter, any configured annotation inclusion overrides are applied automatically.- Parameters:
annotationConfig
- configuration determining which annotations to include during type resolution/introspectionconfig
- configuration to consider- Returns:
- created
TypeContext
instance
-
-