...
The identity is used to define a new globally unique, abstract, and untyped identity. Its only purpose is to denote its name, semantics, and existence. An identity can iether be defined from scratch or derived from a base identity. The base statement, which is optional, takes as an argument a string that is the name of an existing identity, from which the new identity is derived.
Java mapping
The leaf or leaf-list with type leafref, will copy the type of referred leaf or leaf-list, during java file generationFor a given identity one abstract class file will be generated.
Example
Golden Eye Demo
Link: https://www.youtube.com/watch?v=ipbu0x0LcDk
...