public abstract class AbstractJavaGenerator extends Generator
Generator.MetaData| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
GEN_PREFIX
Prefix for synthesized methods and variables.
|
| Constructor and Description |
|---|
AbstractJavaGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
asJavadoc(java.lang.String text)
Ensure that the supplied text is cleaned for insertion into javadoc.
|
protected java.util.Map<graphql.schema.GraphQLType,java.lang.String> |
buildTypeMapping(GeneratorContext context) |
protected void |
emitEnum(GeneratorContext context,
graphql.schema.GraphQLEnumType type) |
protected java.util.Map<graphql.schema.GraphQLType,java.lang.String> |
extractGeneratedDataTypes(GeneratorContext context,
java.util.List<graphql.schema.GraphQLType> types) |
protected java.util.List<graphql.schema.GraphQLType> |
extractTypesToGenerate(graphql.schema.GraphQLSchema schema,
java.util.Map<graphql.schema.GraphQLType,java.lang.String> existing)
Return a list of types that can be generated and have not been supplied by an external tool.
|
protected java.nio.file.Path |
getPackageOutputDirectory(GeneratorContext context) |
protected boolean |
isNotIntrospectionType(graphql.schema.GraphQLType type)
Return true if type does not look like types derived from the
introspection schema |
protected void |
writeFile(java.nio.file.Path file,
byte[] bytes) |
protected void |
writeFile(java.nio.file.Path file,
java.lang.String content) |
protected void |
writeTypeMappingFile(GeneratorContext context,
java.util.Map<graphql.schema.GraphQLType,java.lang.String> typeMap) |
generate, getSupportedPropertiesprotected static final java.lang.String GEN_PREFIX
@Nonnull
protected final java.lang.String asJavadoc(@Nonnull
java.lang.String text)
text - the text.protected final boolean isNotIntrospectionType(@Nonnull
graphql.schema.GraphQLType type)
introspection schematype - the type.protected final void writeTypeMappingFile(@Nonnull
GeneratorContext context,
@Nonnull
java.util.Map<graphql.schema.GraphQLType,java.lang.String> typeMap)
throws java.io.IOException
java.io.IOException@Nonnull
protected final java.nio.file.Path getPackageOutputDirectory(@Nonnull
GeneratorContext context)
protected final void writeFile(@Nonnull
java.nio.file.Path file,
@Nonnull
java.lang.String content)
throws java.io.IOException
java.io.IOExceptionprotected final void writeFile(@Nonnull
java.nio.file.Path file,
@Nonnull
byte[] bytes)
throws java.io.IOException
java.io.IOException@Nonnull
protected final java.util.List<graphql.schema.GraphQLType> extractTypesToGenerate(@Nonnull
graphql.schema.GraphQLSchema schema,
@Nonnull
java.util.Map<graphql.schema.GraphQLType,java.lang.String> existing)
schema - the schema to process.existing - existing types.@Nonnull
protected final java.util.Map<graphql.schema.GraphQLType,java.lang.String> extractGeneratedDataTypes(@Nonnull
GeneratorContext context,
@Nonnull
java.util.List<graphql.schema.GraphQLType> types)
@Nonnull
protected final java.util.Map<graphql.schema.GraphQLType,java.lang.String> buildTypeMapping(@Nonnull
GeneratorContext context)
protected final void emitEnum(@Nonnull
GeneratorContext context,
@Nonnull
graphql.schema.GraphQLEnumType type)
throws java.io.IOException
java.io.IOException