Converts a CSObj of class to corresponding type. If the object is not a class constant, then return null.
(CSObj csObj)
| 122 | * not a class constant, then return null. |
| 123 | */ |
| 124 | @Nullable |
| 125 | public static Type toType(CSObj csObj) { |
| 126 | Object alloc = csObj.getObject().getAllocation(); |
| 127 | return alloc instanceof ClassLiteral cls ? cls.getTypeValue() : null; |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Converts a CSObj of MethodType to corresponding MethodType. |
no test coverage detected