public abstract class AbstractJavaGenerator extends java.lang.Object implements Generator
Generator.MetaData| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
VAR_PREFIX
Prefix for synthesized 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.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) |
protected static final java.lang.String VAR_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.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