Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Compares the specified object with this {@code CodeSigner} for equality.
Returns {@code true} if the specified object is also an instance of
{@code CodeSigner}, the two {@code CodeSigner} encapsulate the same
certificate path and the same time stamp, if present in both.
if (obj == this) {
return true;
}
if (obj instanceof CodeSigner) {
CodeSigner that = (CodeSigner) obj;
if (!signerCertPath.equals(that.signerCertPath)) {
return false;
}
return timestamp == null ? that.timestamp == null : timestamp
.equals(that.timestamp);
}
return false;
|
public java.security.cert.CertPath | getSignerCertPath()Returns the certificate path associated with this {@code CodeSigner}.
return signerCertPath;
|
public java.security.Timestamp | getTimestamp()Returns the time stamp associated with this {@code CodeSigner}.
return timestamp;
|
public int | hashCode()Returns the hash code value for this {@code CodeSigner}. Returns the same
hash code for {@code CodeSigner}s that are equal to each other as
required by the general contract of {@link Object#hashCode}.
if (hash == 0) {
hash = signerCertPath.hashCode()
^ (timestamp == null ? 0 : timestamp.hashCode());
}
return hash;
|
public java.lang.String | toString()Returns a string containing a concise, human-readable description of the
this {@code CodeSigner} including its first certificate and its time
stamp, if present.
// There is no any special reason for '256' here, it's taken abruptly
// FIXME: 1.5 StringBuffer => StringBuilder
StringBuffer buf = new StringBuffer(256);
// The javadoc says nothing, and the others implementations behavior seems as
// dumping only the first certificate. Well, let's do the same.
buf.append("CodeSigner [").append(signerCertPath.getCertificates().get(0)); //$NON-NLS-1$
if( timestamp != null ) {
buf.append("; ").append(timestamp); //$NON-NLS-1$
}
buf.append("]"); //$NON-NLS-1$
return buf.toString();
|