JavaGenerator class
Class that manages all Java code generation.
- Inheritance
-
- Object
- Generator<
JavaOptions> - StructuredGenerator<
JavaOptions> - JavaGenerator
Constructors
- JavaGenerator()
-
Instantiates a Java Generator.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
generate(
JavaOptions generatorOptions, Root root, StringSink sink, {required String dartPackageName}) → void -
Generates files for specified language with specified
generatorOptions
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeApis(
JavaOptions generatorOptions, Root root, Indent indent, {required String dartPackageName}) → void -
Writes all apis to
indent
.override -
writeClassDecode(
JavaOptions generatorOptions, Root root, Indent indent, Class klass, Set< String> customClassNames, Set<String> customEnumNames, {required String dartPackageName}) → void -
Writes a single class decode method to
indent
.override -
writeClassEncode(
JavaOptions generatorOptions, Root root, Indent indent, Class klass, Set< String> customClassNames, Set<String> customEnumNames, {required String dartPackageName}) → void -
Writes a single class encode method to
indent
.override -
writeCloseNamespace(
JavaOptions generatorOptions, Root root, Indent indent, {required String dartPackageName}) → void -
Writes code to
indent
that closes file namespace if needed.override -
writeDataClass(
JavaOptions generatorOptions, Root root, Indent indent, Class klass, {required String dartPackageName}) → void -
Writes a single data class to
indent
.override -
writeDataClasses(
JavaOptions generatorOptions, Root root, Indent indent, {required String dartPackageName}) → void -
Writes all data classes to
indent
.inherited -
writeEnum(
JavaOptions generatorOptions, Root root, Indent indent, Enum anEnum, {required String dartPackageName}) → void -
Writes a single Enum to
indent
. This is needed in most generators.override -
writeEnums(
JavaOptions generatorOptions, Root root, Indent indent, {required String dartPackageName}) → void -
Writes all enums to
indent
.inherited -
writeFileImports(
JavaOptions generatorOptions, Root root, Indent indent, {required String dartPackageName}) → void -
Writes specified imports to
indent
.override -
writeFilePrologue(
JavaOptions generatorOptions, Root root, Indent indent, {required String dartPackageName}) → void -
Adds specified headers to
indent
.override -
writeFlutterApi(
JavaOptions generatorOptions, Root root, Indent indent, Api api, {required String dartPackageName}) → void -
Writes the code for a flutter Api,
api
. Example: public static final class Foo { public Foo(BinaryMessenger argBinaryMessenger) {...} public interface Replyoverride -
writeGeneralUtilities(
JavaOptions generatorOptions, Root root, Indent indent, {required String dartPackageName}) → void -
Writes any necessary helper utilities to
indent
if needed.override -
writeHostApi(
JavaOptions generatorOptions, Root root, Indent indent, Api api, {required String dartPackageName}) → void -
Write the java code that represents a host Api,
api
. Example: public interface Foo { int add(int x, int y); static void setup(BinaryMessenger binaryMessenger, Foo api) {...} }override -
writeOpenNamespace(
JavaOptions generatorOptions, Root root, Indent indent, {required String dartPackageName}) → void -
Writes code to
indent
that opens file namespace if needed.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited