Package net.sourceforge.pmd.util
Class ResourceLoader
- java.lang.Object
-
- net.sourceforge.pmd.util.ResourceLoader
-
@Deprecated @InternalApi public class ResourceLoader extends java.lang.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(java.lang.ClassLoader cl)
Deprecated.Constructor for ResourceLoader.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.io.InputStream
loadClassPathResourceAsStream(java.lang.String name)
Deprecated.java.io.InputStream
loadClassPathResourceAsStreamOrThrow(java.lang.String name)
Deprecated.java.io.InputStream
loadResourceAsStream(java.lang.String name)
Deprecated.Attempts to load the resource from file, a URL or the claspathRule
loadRuleFromClassPath(java.lang.String clazz)
Deprecated.Load the rule from the classloader from resource loader, consistent with the ruleset
-
-
-
Method Detail
-
loadResourceAsStream
public java.io.InputStream loadResourceAsStream(java.lang.String name) throws RuleSetNotFoundException
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:
RuleSetNotFoundException
-
loadClassPathResourceAsStream
public java.io.InputStream loadClassPathResourceAsStream(java.lang.String name) throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
loadClassPathResourceAsStreamOrThrow
public java.io.InputStream loadClassPathResourceAsStreamOrThrow(java.lang.String name) throws RuleSetNotFoundException
Deprecated.- Throws:
RuleSetNotFoundException
-
loadRuleFromClassPath
public Rule loadRuleFromClassPath(java.lang.String clazz) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
Deprecated.Load the rule from the classloader from resource loader, consistent with the ruleset- Parameters:
clazz
-- Returns:
- Throws:
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
-
-