Package net.sourceforge.pmd.util
Class ResourceLoader
- java.lang.Object
-
- net.sourceforge.pmd.util.ResourceLoader
-
@Deprecated @InternalApi public class ResourceLoader extends Object
Deprecated.Is internal API
-
-
Field Summary
Fields Modifier and Type Field Description static int
TIMEOUT
Deprecated.
-
Constructor Summary
Constructors Constructor Description ResourceLoader()
Deprecated.Constructor for ResourceLoader.ResourceLoader(ClassLoader cl)
Deprecated.Constructor for ResourceLoader.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description @Nullable InputStream
loadClassPathResourceAsStream(String name)
Deprecated.@NonNull InputStream
loadClassPathResourceAsStreamOrThrow(String name)
Deprecated.@NonNull InputStream
loadResourceAsStream(String name)
Deprecated.Attempts to load the resource from file, a URL or the claspathRule
loadRuleFromClassPath(String clazz)
Deprecated.Load the rule from the classloader from resource loader, consistent with the ruleset
-
-
-
Constructor Detail
-
ResourceLoader
public ResourceLoader()
Deprecated.Constructor for ResourceLoader.
-
ResourceLoader
public ResourceLoader(ClassLoader cl)
Deprecated.Constructor for ResourceLoader.
-
-
Method Detail
-
loadResourceAsStream
public @NonNull InputStream loadResourceAsStream(String name) throws IOException
Deprecated.Attempts to load the resource from file, a URL or the claspathCaller is responsible for closing the
InputStream
.- Parameters:
name
- The resource to attempt and load- Returns:
- InputStream
- Throws:
IOException
-
loadClassPathResourceAsStream
public @Nullable InputStream loadClassPathResourceAsStream(String name) throws IOException
Deprecated.- Throws:
IOException
-
loadClassPathResourceAsStreamOrThrow
public @NonNull InputStream loadClassPathResourceAsStreamOrThrow(String name) throws IOException
Deprecated.- Throws:
IOException
-
loadRuleFromClassPath
public Rule loadRuleFromClassPath(String clazz) throws ClassNotFoundException, IllegalAccessException, InstantiationException
Deprecated.Load the rule from the classloader from resource loader, consistent with the ruleset
-
-