SystemVerilog features which support Constraint random generation inside objects are :
1) Random Variable declaration.
2) Built in Functions for generation.
3) Constraints to control random generation.
Variables declared as rand or randc are assigned random values when randomize() function is called, where the constraint specifies the valid solution space from which the random values are picked.