Makding component definition based on klass mechanism