public class SecurityActions extends Object
Constructor and Description |
---|
SecurityActions() |
Modifier and Type | Method and Description |
---|---|
static String |
getSystemProperty(String key,
String defaultValue)
Returns a system property value using the specified
key . |
static ClassLoader |
getTCCL()
Get the Thread Context ClassLoader
|
static Class<?> |
loadClass(Class<?> theClass,
String fullQualifiedName)
Loads a
Class using the fullQualifiedName supplied. |
static Class<?> |
loadClass(ClassLoader classLoader,
String fullQualifiedName)
Loads a class from the specified
ClassLoader using the fullQualifiedName supplied. |
static URL |
loadResource(Class<?> clazz,
String resourceName)
Load a resource based on the passed
Class classloader. |
static void |
setSystemProperty(String key,
String value)
Set the system property
|
static void |
setTCCL(ClassLoader paramCl)
Set the Thread Context ClassLoader
|
public static Class<?> loadClass(Class<?> theClass, String fullQualifiedName)
Loads a Class
using the fullQualifiedName
supplied. This method tries first to load from
the specified Class
, if not found it will try to load from using TCL.
theClass
- fullQualifiedName
- public static Class<?> loadClass(ClassLoader classLoader, String fullQualifiedName)
Loads a class from the specified ClassLoader
using the fullQualifiedName
supplied.
classLoader
- fullQualifiedName
- public static URL loadResource(Class<?> clazz, String resourceName)
Class
classloader. Failing which try with the Thread Context CLclazz
- resourceName
- public static void setSystemProperty(String key, String value)
key
- defaultValue
- public static String getSystemProperty(String key, String defaultValue)
Returns a system property value using the specified key
. If not found the
defaultValue
will be returned.
key
- defaultValue
- public static ClassLoader getTCCL()
public static void setTCCL(ClassLoader paramCl)
paramCl
- Copyright © 2021 JBoss by Red Hat. All rights reserved.