javaDeclaration method

String javaDeclaration({
  1. bool newInstance = false,
})

Implementation

String javaDeclaration({bool newInstance = false}) {
  final sb = StringBuffer();
  sb.write(type.javaType() + keywordSpace);
  sb.write(name);

  if (newInstance) {
    sb.write('$keywordSpace=$keywordSpace${type.javaNewInstance()}');
  }

  sb.write(';');

  return sb.toString();
}