Class PMDASMClassLoader

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.java.typeresolution.internal.NullableClassLoader

    @InternalApi
    @Deprecated
    public final class PMDASMClassLoader
    extends ClassLoader
    implements net.sourceforge.pmd.lang.java.typeresolution.internal.NullableClassLoader
    Deprecated.
    • Method Detail

      • getInstance

        public static PMDASMClassLoader getInstance​(ClassLoader parent)
        Deprecated.
        A new PMDASMClassLoader is created for each compilation unit, this method allows to reuse the same PMDASMClassLoader across all the compilation units.
      • loadClassOrNull

        public Class<?> loadClassOrNull​(String name)
        Deprecated.
        Not throwing CNFEs to represent failure makes a huge performance difference. Typeres as a whole is 2x faster.
        Specified by:
        loadClassOrNull in interface net.sourceforge.pmd.lang.java.typeresolution.internal.NullableClassLoader
      • couldResolve

        public boolean couldResolve​(String name)
        Deprecated.
        Checks if the class loader could resolve a given class name (ie: it doesn't know for sure it will fail). Notice, that the ability to resolve a class does not imply that the class will actually be found and resolved.
        Parameters:
        name - the name of the class
        Returns:
        whether the class can be resolved