Package com.jetbrains.rd.generator.nova

Types

Link copied to clipboard
class Aggregate(val _name: String, val pointcut: Toplevel) : BindableDeclaration, INonNullableBindable
Link copied to clipboard
data class ArrayOfBindables(val itemType: IBindable) : INonNullableBindable, IArray
Link copied to clipboard
data class ArrayOfScalars(val itemType: IScalar) : INonNullableScalar, IArray
Link copied to clipboard
abstract class BindableDeclaration(val pointcut: BindableDeclaration?) : Declaration
Link copied to clipboard
sealed class Class : BindableDeclaration, INonNullableBindable, Extensible, ITypeDeclaration
Link copied to clipboard
sealed class Context : Declaration
Link copied to clipboard
abstract class Declaration(val pointcut: BindableDeclaration?) : SettingsHolder, IDeclaration
Link copied to clipboard
open class Enum(val _name: String, val pointcut: Toplevel) : Declaration, INonNullableScalar, ITypeDeclaration
Link copied to clipboard
abstract class Ext(val pointcut: BindableDeclaration, val extName: String? = null) : Toplevel, Extensible
Link copied to clipboard
interface Extensible
Link copied to clipboard
open class ExternalGenerator(val generator: IGenerator, val root: Root) : IGeneratorAndRoot

If you extend this class with object instance it will be collected by collectSortedGeneratorsToInvoke during reflection search.

Link copied to clipboard
enum FlowKind : Enum<FlowKind>
Link copied to clipboard
enum FlowTransform : Enum<FlowTransform>
Link copied to clipboard
data class GenerationSpec(    var language: String = "",     var transform: String? = null,     var root: String = "",     var namespace: String = "",     var directory: String = "",     var generatedFileSuffix: String = ".Generated")
Link copied to clipboard
abstract class GeneratorBase(flowTransform: FlowTransform, generatedFileSuffix: String) : IGenerator

Base class for generators to deduplicate common logic

Link copied to clipboard
class GeneratorException(msg: String) : RuntimeException

This exception arises during generation. Usually thrown by GeneratorBase.fail method.

Link copied to clipboard
interface IArray : IHasItemType
Link copied to clipboard
interface IAttributedType : IHasItemType
Link copied to clipboard
interface IBindable : IType
Link copied to clipboard
interface IDeclaration : ISettingsHolder
Link copied to clipboard
interface IGenerator
Link copied to clipboard
interface IGeneratorAndRoot : Comparable<IGeneratorAndRoot>

Generator and root together

Link copied to clipboard
interface IHasItemType : IType
Link copied to clipboard
interface IImmutableList : IHasItemType
Link copied to clipboard
data class ImmutableListOfBindables(val itemType: IBindable) : INonNullableBindable, IImmutableList
Link copied to clipboard
data class ImmutableListOfScalars(val itemType: IScalar) : INonNullableScalar, IImmutableList
Link copied to clipboard
interface INonNullable : IType
Link copied to clipboard
interface INonNullableBindable : INonNullable, IBindable
Link copied to clipboard
interface INonNullableScalar : INonNullable, IScalar
Link copied to clipboard
class Interface(    val _name: String,     val pointcut: Toplevel,     val baseInterfaces: MutableList<Interface>) : Declaration
Link copied to clipboard
data class InternedScalar(val itemType: INonNullableScalar, val internKey: InternScope) : INonNullableScalar
Link copied to clipboard
class InternScope(val pointcut: BindableDeclaration?, val _name: String = "") : Declaration
Link copied to clipboard
interface INullable : IHasItemType
Link copied to clipboard
interface ISanitizer
Link copied to clipboard
interface IScalar : IType
Link copied to clipboard
interface ISetting<out T : Any, out S : ISettingsHolder>

Additional settings for rd model. Usually they are specific to IGenerator (because lead to generated code customization) and declared in generator's implementation T type of setting value S type of rd model entity to which this setting is applicable, e.g. Declaration or Member

Link copied to clipboard
interface ISettingsHolder
Link copied to clipboard
interface IType
Link copied to clipboard
interface ITypeDeclaration : IType, IDeclaration
Link copied to clipboard
enum KnownAttrs : Enum<KnownAttrs>
Link copied to clipboard
enum Lang : Enum<Lang>
Link copied to clipboard
sealed class Member : SettingsHolder
Link copied to clipboard
enum Modifier : Enum<Modifier>
Link copied to clipboard
data class NullableBindable(val itemType: INonNullableBindable) : IBindable, INullable
Link copied to clipboard
data class NullableScalar(val itemType: INonNullableScalar) : IScalar, INullable
Link copied to clipboard
sealed class PredefinedType : INonNullableScalar
Link copied to clipboard
class RdGen : Kli
Link copied to clipboard
abstract class Root(val hardcodedGenerators: IGenerator) : Toplevel
Link copied to clipboard
data class ScalarAttributedType<out T : IScalar> : IAttributedType, IScalar
Link copied to clipboard
open class SettingsHolder : ISettingsHolder

Base class for any rd model entity (e.g. Declaration or Member) that can be customized

Link copied to clipboard
abstract class SettingWithDefault<out T : Any, out S : ISettingsHolder>(val default: T) : ISetting<T, S>

ISetting that has default value

Link copied to clipboard
object SharedGeneratorSettings
Link copied to clipboard
sealed class Struct : Declaration, INonNullableScalar, ITypeDeclaration
Link copied to clipboard
abstract class Toplevel(val pointcut: BindableDeclaration?) : BindableDeclaration
Link copied to clipboard
class TypeWithValue

Functions

Link copied to clipboard
fun array(type: IBindable): ArrayOfBindables
fun array(type: IScalar): ArrayOfScalars
Link copied to clipboard
fun <T : IScalar> T.attrs(vararg attributes: KnownAttrs): ScalarAttributedType<T>
Link copied to clipboard
fun BindableDeclaration.call(    name: String,     paramType: IScalar,     resultType: IType): Member.Reactive.Task
Link copied to clipboard
fun BindableDeclaration.callback(    name: String,     paramType: IScalar,     resultType: IType): Member.Reactive.Task
Link copied to clipboard
fun Declaration.const(    name: String,     type: Enum,     value: Member.EnumConst): Member.Const.Enum
fun Declaration.const(    name: String,     type: Enum,     value: Int): Member.Const.Enum
fun Declaration.const(    name: String,     type: Enum,     value: String)
fun Declaration.const(    name: String,     type: PredefinedType,     value: String): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.bool,     value: Boolean): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.byte,     value: Byte): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.char,     value: Char): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.double,     value: Double): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.float,     value: Float): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.int,     value: Int): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.long,     value: Long): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.short,     value: Short): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.string,     value: String): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.ubyte,     value: UByte): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.uint,     value: UInt): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.ulong,     value: ULong): Member.Const.Integral
fun Declaration.const(    name: String,     type: PredefinedType.ushort,     value: UShort): Member.Const.Integral
fun Declaration.const(    name: String,     type: ScalarAttributedType<PredefinedType>,     value: String): Member.Const.Integral
fun Interface.const(    name: String,     type: INonNullableScalar,     value: Any): Nothing
Link copied to clipboard
fun Member.Field.default(value: Boolean): Member.Field
fun Member.Field.default(value: Long): Member.Field
fun Member.Field.default(value: String): Member.Field
Link copied to clipboard
fun <T : Declaration> T.doc(value: String): T
fun Member.doc(value: String): Member
Link copied to clipboard
fun fail(msg: String): Nothing
Link copied to clipboard
fun Aggregate.field(name: String, type: Aggregate): Member.Field
fun Class.field(name: String, type: IType): Member.Field
fun Interface.field(name: String, type: Aggregate): Nothing
fun Struct.field(name: String, type: IBindable): Nothing
fun Struct.field(name: String, type: IScalar): Member.Field
fun Struct.field(name: String, type: ScalarAttributedType<IScalar>): Member.Field
fun Toplevel.field(name: String, type: Aggregate): Member.Field
Link copied to clipboard
fun <T : Any, S : ISettingsHolder> ISetting<T, S>.forGenerator(generator: IGenerator): ISetting<T, S>

Creates new setting, specialized for generator. In case we have two generator instances with same type for one model (e.g. com.jetbrains.rd.generator.nova.csharp.CSharp50Generator.FlowTransformProperty which is different for client and server) you need to distinguish this settings for different generation processes (e.g. client and server).

Link copied to clipboard
fun generateRdModel(    classLoader: ClassLoader,     namespacePrefixes: Array<String>,     verbose: Boolean = false,     generatorsFilter: Regex? = null,     clearOutputFolderIfExists: Boolean = false,     generationSpecs: List<GenerationSpec> = emptyList()): Set<File>
Link copied to clipboard
fun <T : Any, S : ISettingsHolder> S.getSetting(key: ISetting<T, S>): T?

Should be called inside generation process (IGenerator.generate). Method tries to obtain following setting from SettingsHolder.settings in following order:

Link copied to clipboard
operator fun <T : Class> T.getValue(thisRef: Any?, property: KProperty<*>): T
operator fun <T : Struct> T.getValue(thisRef: Any?, property: KProperty<*>): T
Link copied to clipboard
fun <S : SettingsHolder> S.hasSetting(key: ISetting<Unit, S>): Boolean

Shortcut to get Unit setting. In most cases you should use Unit settings instead of Boolean ones.

Link copied to clipboard
fun immutableList(type: IBindable): ImmutableListOfBindables
fun immutableList(type: IScalar): ImmutableListOfScalars
Link copied to clipboard
fun INonNullableScalar.interned(key: InternScope): InternedScalar
Link copied to clipboard
fun Class.internRoot(scope: InternScope)
Link copied to clipboard
fun BindableDeclaration.list(name: String, itemType: IType): Member.Reactive.Stateful.List
fun Declaration.list(name: String, itemType: IType): Nothing
fun Interface.list(name: String, itemType: IType): Nothing
Link copied to clipboard
fun main(args: Array<String>)
Link copied to clipboard
fun BindableDeclaration.map(    name: String,     keyType: INonNullableScalar,     valueType: INonNullable): Member.Reactive.Stateful.Map
fun Declaration.map(    name: String,     keyType: INonNullableScalar,     valueType: INonNullable): Nothing
fun Interface.map(    name: String,     keyType: INonNullableScalar,     valueType: INonNullable): Nothing
Link copied to clipboard
fun Interface.method(    name: String,     resultType: IType,     vararg args: Pair<String, IType>): Member.Method
Link copied to clipboard
fun Member.Field.notUsedInEquals(): Member.Field
Link copied to clipboard
fun Member.Reactive.perContext(key: Context): Member.Reactive
Link copied to clipboard
fun prepareGenerationFolder(folder: File, removeIfExists: Boolean)
Link copied to clipboard
fun BindableDeclaration.property(name: String, valueType: IType): Member.Reactive.Stateful.Property
fun BindableDeclaration.property(name: String, defaultValue: Member.Const): Member.Reactive.Stateful.Property
fun BindableDeclaration.property(name: String, defaultValue: TypeWithValue): Member.Reactive.Stateful.Property
fun BindableDeclaration.property(name: String, defaultValue: Boolean): Member.Reactive.Stateful.Property
fun BindableDeclaration.property(name: String, defaultValue: Double): Member.Reactive.Stateful.Property
fun BindableDeclaration.property(name: String, defaultValue: Int): Member.Reactive.Stateful.Property
fun BindableDeclaration.property(name: String, defaultValue: String): Member.Reactive.Stateful.Property
fun Declaration.property(name: String, valueType: IType): Nothing
fun Interface.property(name: String, valueType: IType): Nothing
fun BindableDeclaration.property(    name: String,     defaultValue: Member.Const,     vararg attributes: KnownAttrs): Member.Reactive.Stateful.Property
fun BindableDeclaration.property(    name: String,     valueType: ScalarAttributedType<PredefinedType.string>,     defaultValue: String): Member.Reactive.Stateful.Property
Link copied to clipboard
fun BindableDeclaration.set(name: String, itemType: INonNullableScalar): Member.Reactive.Stateful.Set
fun Declaration.set(name: String, itemType: INonNullableScalar): Nothing
fun Interface.set(name: String, itemType: INonNullableScalar): Nothing
Link copied to clipboard
fun <S : SettingsHolder> S.setting(key: ISetting<Unit, S>): S

Shortcut to set Unit setting. In most cases you should use Unit settings instead of Boolean ones.

fun <T : Any, S : ISettingsHolder> S.setting(key: ISetting<T, S>, value: T): S

Set setting

fun <T : Any, S : ISettingsHolder> S.setting(key: SettingWithDefault<T, S>, value: T = key.default): S
Link copied to clipboard
fun BindableDeclaration.signal(name: String, valueType: IScalar): Member.Reactive.Signal
fun Declaration.signal(name: String, valueType: IType): Nothing
fun Interface.signal(name: String, valueType: IType): Nothing
Link copied to clipboard
fun BindableDeclaration.sink(name: String, valueType: IScalar): Member.Reactive.Signal
fun Declaration.sink(name: String, valueType: IType): Nothing
fun Interface.sink(name: String, valueType: IType): Nothing
Link copied to clipboard
fun BindableDeclaration.source(name: String, valueType: IScalar): Member.Reactive.Signal
fun Declaration.source(name: String, valueType: IType): Nothing
fun Interface.source(name: String, valueType: IType): Nothing
Link copied to clipboard
fun BindableDeclaration.voidSignal(name: String): Member.Reactive.Signal
fun Declaration.voidSignal(name: String): Nothing
fun Interface.voidSignal(name: String): Nothing
Link copied to clipboard
fun BindableDeclaration.voidSink(name: String): Member.Reactive.Signal
fun Declaration.voidSink(name: String): Nothing
fun Interface.voidSink(name: String): Nothing
Link copied to clipboard
fun BindableDeclaration.voidSource(name: String): Member.Reactive.Signal
fun Declaration.voidSource(name: String): Nothing
fun Interface.voidSource(name: String): Nothing

Properties

Link copied to clipboard
val <T : Member.Reactive> T.async: T
Link copied to clipboard
val Member.hasEmptyConstructor: Boolean
val IType.hasEmptyConstructor: Boolean
Link copied to clipboard
val Declaration.isConcrete: Boolean
Link copied to clipboard
val Declaration.isExtension: Boolean
Link copied to clipboard
val Declaration.isToplevelExtension: Boolean
Link copied to clipboard
val Context.Generated.light: Context

Marks this key a light key. Light keys don't maintain a value set and send values un-interned.

Link copied to clipboard
Link copied to clipboard
val nlsString: ScalarAttributedType<PredefinedType.string>
Link copied to clipboard
Link copied to clipboard
val INonNullableScalar.nullable: NullableScalar
val INonNullableBindable.nullable: NullableBindable
Link copied to clipboard
val Member.Field.optional: Member.Field
Link copied to clipboard
val ProtocolInternScope: InternScope
Link copied to clipboard
val <T : Member.Reactive> T.readonly: T
Link copied to clipboard
val Member.Field.suppressEmptyCtor: Member.Field
Link copied to clipboard
val <T : Member.Reactive> T.write: T