GeezerVison is showing docs.oracle.com — CodeSource (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
compact1, compact2, compact3
java.security
Class CodeSource
-
-
Constructor Summary
Constructors
| Constructor |
Description |
CodeSource(URL url,
Certificate[] certs) |
Constructs a CodeSource and associates it with the specified
location and set of certificates.
|
CodeSource(URL url,
CodeSigner[] signers) |
Constructs a CodeSource and associates it with the specified
location and set of code signers.
|
-
Method Summary
All Methods Instance Methods Concrete Methods
| Modifier and Type |
Method |
Description |
boolean |
equals(Object obj) |
Tests for equality between the specified object and this
object.
|
Certificate[] |
getCertificates() |
Returns the certificates associated with this CodeSource.
|
CodeSigner[] |
getCodeSigners() |
Returns the code signers associated with this CodeSource.
|
URL |
getLocation() |
Returns the location associated with this CodeSource.
|
int |
hashCode() |
Returns the hash code value for this object.
|
boolean |
implies(CodeSource codesource) |
Returns true if this CodeSource object "implies" the specified CodeSource.
|
String |
toString() |
Returns a string describing this CodeSource, telling its
URL and certificates.
|
-
-
Constructor Detail
-
CodeSource
public CodeSource(URL url,
Certificate[] certs)
Constructs a CodeSource and associates it with the specified
location and set of certificates.
- Parameters:
url - the location (URL).
certs - the certificate(s). It may be null. The contents of the
array are copied to protect against subsequent modification.
-
CodeSource
public CodeSource(URL url,
CodeSigner[] signers)
Constructs a CodeSource and associates it with the specified
location and set of code signers.
- Parameters:
url - the location (URL).
signers - the code signers. It may be null. The contents of the
array are copied to protect against subsequent modification.
- Since:
- 1.5
-
Method Detail
-
equals
public boolean equals(Object obj)
Tests for equality between the specified object and this
object. Two CodeSource objects are considered equal if their
locations are of identical value and if their signer certificate
chains are of identical value. It is not required that
the certificate chains be in the same order.
- Overrides:
equals in class Object
- Parameters:
obj - the object to test for equality with this object.
- Returns:
- true if the objects are considered equal, false otherwise.
- See Also:
Object.hashCode(),
HashMap
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|