newFieldDeclaration

fun MetadataProvider.newFieldDeclaration(name: CharSequence?, type: Type? = UnknownType.getUnknownType(), modifiers: List<String>? = listOf(), code: String? = null, location: PhysicalLocation? = null, initializer: Expression? = null, implicitInitializerAllowed: Boolean = false, rawNode: Any? = null): FieldDeclaration

Creates a new FieldDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.