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 intTIMEOUTDeprecated.
-
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.InputStreamloadClassPathResourceAsStream(java.lang.String name)Deprecated.java.io.InputStreamloadClassPathResourceAsStreamOrThrow(java.lang.String name)Deprecated.java.io.InputStreamloadResourceAsStream(java.lang.String name)Deprecated.Attempts to load the resource from file, a URL or the claspathRuleloadRuleFromClassPath(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 RuleSetNotFoundExceptionDeprecated.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.IOExceptionDeprecated.- Throws:
java.io.IOException
-
loadClassPathResourceAsStreamOrThrow
public java.io.InputStream loadClassPathResourceAsStreamOrThrow(java.lang.String name) throws RuleSetNotFoundExceptionDeprecated.- 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.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
-
-