Class JavaWriter
- Namespace
- TypedRest.CodeGeneration.Java
- Assembly
- TypedRest.CodeGeneration.Java.dll
Renders the shared JVM type model as Java source code.
public sealed class JavaWriter
- Inheritance
-
objectJavaWriter
Constructors
JavaWriter(JvmSerializer, bool, bool)
Renders the shared JVM type model as Java source code.
public JavaWriter(JvmSerializer serializer, bool entryConstructor = true, bool nullableAnnotations = true)
Parameters
serializerJvmSerializerSupplies the annotations carrying wire names on generated DTOs.
entryConstructorboolControls whether the entry endpoint gets a generated constructor.
nullableAnnotationsboolControls whether properties are annotated with JSpecify nullability.
Fields
FileExtension
The file extension of Java source files.
public const string FileExtension = ".java"
Field Value
Methods
Expression(JvmExpression)
Writes an expression.
public string Expression(JvmExpression expression)
Parameters
expressionJvmExpression
Returns
TypeExpression(JvmIdentifier)
Writes a type reference, e.g. List<Contact>.
public string TypeExpression(JvmIdentifier identifier)
Parameters
identifierJvmIdentifier
Returns
WriteFile(TextWriter, IJvmType)
Writes a file declaring type.
public void WriteFile(TextWriter textWriter, IJvmType type)
Parameters
textWriterTextWritertypeIJvmType