Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
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
Link copied to clipboard
sealed class Context : Declaration
Link copied to clipboard
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
Link copied to clipboard
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", var marshallersFile: String? = null)
Link copied to clipboard
abstract class GeneratorBase(flowTransform: FlowTransform, generatedFileSuffix: String, val marhsallersFile: File? = null) : IGenerator

Base class for generators to deduplicate common logic

Link copied to clipboard

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

Link copied to clipboard
interface IArray : IHasItemType
Link copied to clipboard
Link copied to clipboard
interface IBindable : IType
Link copied to clipboard
Link copied to clipboard
interface IGenerator
Link copied to clipboard

Generator and root together

Link copied to clipboard
interface IHasItemType : IType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface INonNullable : IType
Link copied to clipboard
Link copied to clipboard
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
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
Link copied to clipboard
Link copied to clipboard
enum Lang : Enum<Lang>
Link copied to clipboard
Link copied to clipboard
sealed class Member : SettingsHolder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class NullableScalar(val itemType: INonNullableScalar) : IScalar, INullable
Link copied to clipboard
Link copied to clipboard
class RdGen : Kli
Link copied to clipboard
class RealMarshallersCollector(val marshallersFile: File) : MarshallersCollector
Link copied to clipboard
abstract class Root(val hardcodedGenerators: IGenerator) : Toplevel
Link copied to clipboard
Link copied to clipboard

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
Link copied to clipboard
Link copied to clipboard
abstract class Toplevel(val pointcut: BindableDeclaration?) : BindableDeclaration
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
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
Link copied to clipboard
fun Declaration.const(name: String, type: Enum, value: Int): Member.Const.Enum
fun Declaration.const(name: String, type: Enum, value: String)
fun Interface.const(name: String, type: INonNullableScalar, value: Any): Nothing
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
Link copied to clipboard

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

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun main(args: Array<String>)
Link copied to clipboard
Link copied to clipboard
fun Interface.method(name: String, resultType: IType, vararg args: Pair<String, IType>): Member.Method
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun prepareGenerationFolder(folder: File, removeIfExists: Boolean)
Link copied to clipboard

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
Link copied to clipboard
fun Declaration.sink(name: String, valueType: IType): Nothing
fun Interface.sink(name: String, valueType: IType): Nothing
Link copied to clipboard