-
Notifications
You must be signed in to change notification settings - Fork 732
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Produce errors for accidental calls to
getClass()
on more types.
I could imagine doing this for yet more types, but I stopped here. More candidates: ``` $ grep -oP '(?<=#)get[^(]*Class([A-Z][^(]*)?(?=[(])' G-Index\ \(Java\ SE\ 18\ \&\ JDK\ 18\).html | sort -u | grep -v -e ClassPath -e ClassLoader getAncestorOfClass getArgumentClass getBeanClass getCallerClass getCapturingClass getClass getClassAnnotation getClassBody getClassContext getClassGuard getClassLoadingLock getClassLoadingMXBean getClassName getColumnClass getColumnClassName getCredentialClass getCrossPlatformLookAndFeelClassName getCustomizerClass getDataClass getDeclaringClass getDefaultRepresentationClass getDefaultRepresentationClassAsString getDefinitionClass getDefinitionClassFile getEditorKitClassNameForContentType getEnclosingClass getExceptionClassName getFactoryClassLocation getFactoryClassName getFunctionalInterfaceClass getImplClass getImplementationClass getInputClass getLineClass getLinkerForClass getLoadedClassCount getObjectClass getObjectStreamClass getOutputClass getParameterClassName getPluginClassName getProfileClass getPropertyEditorClass getProxyClass getRefClass getRefMBeanClassName getRepresentationClass getRepresentationClassName getRepresentedClass getSchemaClassDefinition getServiceClass getServiceProviderByClass getSourceClassName getSystemLookAndFeelClassName getTotalLoadedClassCount getTrafficClass getTranslatorClass getUIClass getUIClassID getUIClassNamesForRole getUnloadedClassCount getValueClass ``` PiperOrigin-RevId: 460712498
- Loading branch information
Showing
2 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters