convert type attribute into fixed-value method