Naming rules

Position qualifiers #

The code of model above is needless to see. For this injection:


In _Window_Bedroom_window

  • Window: type
  • Bedroom: owner class name
  • window: property name

__ : beginning with __ means outside. In this case, __Door tells that referenced element is outside Bedroom.


˚: Now we redesign Pillow as below. In class Cotton, tag after ˚ tells the nearest root or nodes.


In addition, ˚ always appears when the corresponding root/nodes class is abstract/open, for being distinguished in subclasses as bar and x is traced below.

Type symbols conversion #

Android forbids spaces and most original common symbols in property names, making me choose these substitutes instead.


Wildcard * would be tried converting to its bound and together with the covariance symbols if needed, like from from Array<*> to Array‹↓Any?› and List<*> to List‹Any?›. Comparable<*> is not convertible because its source code is Comparable<in T>.


class A{
    class B
}

The nested class A.B would be converted to A․B in which is not .

Generic types #

Generic types are converted to their bounds, and with covariance (out) if not redundant.

Multiple bounds #

T has two bounds which can be expressed in the first generated property. However, the second property type is limited by Super and two bounds can’t be expressed, which is told by in the name.