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 intTIMEOUTDeprecated.
-
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 InputStreamloadClassPathResourceAsStream(String name)Deprecated.InputStreamloadClassPathResourceAsStreamOrThrow(String name)Deprecated.InputStreamloadResourceAsStream(String name)Deprecated.Attempts to load the resource from file, a URL or the claspathRuleloadRuleFromClassPath(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 InputStream loadResourceAsStream(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 InputStream loadClassPathResourceAsStream(String name) throws IOException
Deprecated.- Throws:
IOException
-
loadClassPathResourceAsStreamOrThrow
public InputStream loadClassPathResourceAsStreamOrThrow(String name) throws RuleSetNotFoundException
Deprecated.- Throws:
RuleSetNotFoundException
-
loadRuleFromClassPath
public Rule loadRuleFromClassPath(String clazz) throws ClassNotFoundException, IllegalAccessException, InstantiationException
Deprecated.Load the rule from the classloader from resource loader, consistent with the ruleset- Parameters:
clazz-- Returns:
- Throws:
ClassNotFoundExceptionIllegalAccessExceptionInstantiationException
-
-