Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.asn1.esf;
 
 
public class SPUserNotice
    extends ASN1Object
    private NoticeReference noticeRef;
    private DisplayText     explicitText;
    public static SPUserNotice getInstance(
        Object obj)
    {
        if (obj instanceof SPUserNotice)
        {
            return (SPUserNotice)obj;
        }
        else if (obj != null)
        {
            return new SPUserNotice(ASN1Sequence.getInstance(obj));
        }
        return null;
    }
    private SPUserNotice(
        ASN1Sequence seq)
    {
        Enumeration e = seq.getObjects();
        while (e.hasMoreElements())
        {
            ASN1Encodable object = (ASN1Encodable)e.nextElement();
            if (object instanceof DisplayText || object instanceof ASN1String)
            {
                 = DisplayText.getInstance(object);
            }
            else if (object instanceof NoticeReference || object instanceof ASN1Sequence)
            {
                 = NoticeReference.getInstance(object);
            }
            else
            {
                throw new IllegalArgumentException("Invalid element in 'SPUserNotice': " + object.getClass().getName());
            }
        }
    }
    public SPUserNotice(
        NoticeReference noticeRef,
        DisplayText     explicitText)
    {
        this. = noticeRef;
        this. = explicitText;
    }
    public NoticeReference getNoticeRef()
    {
        return ;
    }
    public DisplayText getExplicitText()
    {
        return ;
    }

    
 SPUserNotice ::= SEQUENCE {
     noticeRef NoticeReference OPTIONAL,
     explicitText DisplayText OPTIONAL }
 
    public ASN1Primitive toASN1Primitive()
    {
        ASN1EncodableVector  v = new ASN1EncodableVector();
        if ( != null)
        {
            v.add();
        }
        if ( != null)
        {
            v.add();
        }
        return new DERSequence(v);
    }
New to GrepCode? Check out our FAQ X