build method
Implementation
@override
String build() {
if (keepRaw) {
return type.ocType();
}
// 比较的时候用 ocTypeWithoutGeneric,输出的时候还是用 ocType
final ocType = type.ocType(showGenerics: true);
var ocTypeWithoutGeneric = ocType;
// 脱去泛型
if (ocType.contains('<')) {
ocTypeWithoutGeneric = ocType.substring(0, ocType.indexOf('<'));
}
if (directReferenceMap.contains(ocTypeWithoutGeneric)) {
return ocType;
} else if (ocTypeWithoutGeneric.contains('^')) {
// OC Block 类型引用
return ocType;
} else {
return '$ocType*';
}
}