Define an accessor to class that do lazy evaluation.