java.lang.Object | ||
↳ | java.lang.ClassLoader | |
↳ | java.security.SecureClassLoader |
Known Direct Subclasses |
SecureClassLoader
represents a ClassLoader
which associates
the classes it loads with a code source and provide mechanisms to allow the
relevant permissions to be retrieved.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of
SecureClassLoader . | |||||||||||
Constructs a new instance of
SecureClassLoader with the specified
parent ClassLoader . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new class from an array of bytes containing a class
definition in class file format with an optional
CodeSource . | |||||||||||
Constructs a new class from an array of bytes containing a class
definition in class file format with an optional
CodeSource . | |||||||||||
Returns the
PermissionCollection for the specified CodeSource . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.ClassLoader
| |||||||||||
From class
java.lang.Object
|
Constructs a new instance of SecureClassLoader
. The default
parent ClassLoader
is used.
If a SecurityManager
is installed, code calling this constructor
needs the SecurityPermission
checkCreateClassLoader
to be
granted, otherwise a SecurityException
will be thrown.
SecurityException | if a SecurityManager is installed and the caller does
not have permission to invoke this constructor.
|
---|
Constructs a new instance of SecureClassLoader
with the specified
parent ClassLoader
.
If a SecurityManager
is installed, code calling this constructor
needs the SecurityPermission
checkCreateClassLoader
to be
granted, otherwise a SecurityException
will be thrown.
parent | the parent ClassLoader . |
---|
SecurityException | if a SecurityManager is installed and the caller does
not have permission to invoke this constructor.
|
---|
Constructs a new class from an array of bytes containing a class
definition in class file format with an optional CodeSource
.
name | the name of the new class. |
---|---|
b | a memory image of a class file. |
off | the start offset in b of the class data. |
len | the length of the class data. |
cs | the CodeSource , or null . |
IndexOutOfBoundsException | if off or len are not valid in respect to
b . |
---|---|
ClassFormatError | if the specified data is not valid class data. |
SecurityException | if the package to which this class is to be added, already contains classes which were signed by different certificates, or if the class name begins with "java." |
Constructs a new class from an array of bytes containing a class
definition in class file format with an optional CodeSource
.
name | the name of the new class. |
---|---|
b | a memory image of a class file. |
cs | the CodeSource , or null . |
ClassFormatError | if the specified data is not valid class data. |
---|---|
SecurityException | if the package to which this class is to be added, already contains classes which were signed by different certificates, or if the class name begins with "java." |
Returns the PermissionCollection
for the specified CodeSource
.
codesource | the code source. |
---|
PermissionCollection
for the specified CodeSource
.