Class DartCoding
- java.lang.Object
-
- de.haumacher.msgbuf.generator.dart.DartCoding
-
public class DartCoding extends Object
Coding conventions for Dart libraries.
-
-
Constructor Summary
Constructors Constructor Description DartCoding()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringfieldName(Field field)Name of the member variable for the given field.static Stringinitializer(Field field)The default value of the given field.static StringjsonName(Field field)String literal denoting the field name in JSON format of the given field.static StringjsonTypeIdLiteral(MessageDef def)String literal with the JSON type name of the given class.static StringliteralName(Constant constant)Name of an enum literal.static StringreadEnumMethod(EnumDef enumDef)Name of the method for reading an enum literal.static StringstringLiteral(String value)A string literal with the given value.static StringtypeName(Definition def)Name of a class or enum.static StringtypeName(Field field)Name of the type of the given field.static StringvisitCaseMethod(MessageDef def)Visit method of the given concrete type.static StringvisitMethod(MessageDef def)Name of the visit method of the given abstract type.static StringvisitorName(MessageDef def)Name of the visitor class for the givenMessageDef.static StringwriteEnumMethod(EnumDef enumDef)Name of the method for writing an enum literal.
-
-
-
Method Detail
-
typeName
public static String typeName(Definition def)
Name of a class or enum.
-
writeEnumMethod
public static String writeEnumMethod(EnumDef enumDef)
Name of the method for writing an enum literal.
-
readEnumMethod
public static String readEnumMethod(EnumDef enumDef)
Name of the method for reading an enum literal.
-
stringLiteral
public static String stringLiteral(String value)
A string literal with the given value.
-
visitorName
public static String visitorName(MessageDef def)
Name of the visitor class for the givenMessageDef.
-
jsonTypeIdLiteral
public static String jsonTypeIdLiteral(MessageDef def)
String literal with the JSON type name of the given class.
-
visitCaseMethod
public static String visitCaseMethod(MessageDef def)
Visit method of the given concrete type.
-
fieldName
public static String fieldName(Field field)
Name of the member variable for the given field.
-
jsonName
public static String jsonName(Field field)
String literal denoting the field name in JSON format of the given field.
-
visitMethod
public static String visitMethod(MessageDef def)
Name of the visit method of the given abstract type.
-
-