private static OtherInfo getInstance(Object obj) { if (obj instanceof OtherInfo) { return (OtherInfo)obj; } if (obj instanceof ASN1Encodable) { ASN1Encodable asn1Value = ((ASN1Encodable)obj).toASN1Primitive(); if (asn1Value instanceof ASN1Integer) // CMCFail info is an asn1 integer. { return new OtherInfo(CMCFailInfo.getInstance(asn1Value)); } else if (asn1Value instanceof ASN1Sequence) // PendInfo is a sequence. { return new OtherInfo(PendInfo.getInstance(asn1Value)); } } throw new IllegalArgumentException("unknown object in getInstance(): " + obj.getClass().getName()); }
public CMCStatusInfoBuilder setOtherInfo(PendInfo pendInfo) { this.otherInfo = new CMCStatusInfo.OtherInfo(pendInfo); return this; }
public CMCStatusInfoBuilder setOtherInfo(CMCFailInfo failInfo) { this.otherInfo = new CMCStatusInfo.OtherInfo(failInfo); return this; }