Skip to content

Instantly share code, notes, and snippets.

@ShikaSD
Created March 31, 2020 15:40
Show Gist options
  • Select an option

  • Save ShikaSD/0a1490e166a039f61e33ca1bda00a349 to your computer and use it in GitHub Desktop.

Select an option

Save ShikaSD/0a1490e166a039f61e33ca1bda00a349 to your computer and use it in GitHub Desktop.
fun ClassDescriptor.hasReadMethod() =
unsubstitutedMemberScope.getContributedFunctions(
SERIALIZABLE_READ,
NoLookupLocation.FROM_BACKEND
)
.any { it.name == SERIALIZABLE_READ && it.valueParameters.isEmpty() }
val SERIALIZABLE_READ = Name.identifier("readResolve")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment