package org.bouncycastle.asn1.cmp;

import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.DERObject;

public class GenRepContent
    extends ASN1Encodable
{
    private ASN1Sequence content;

    private GenRepContent(ASN1Sequence seq)
    {
        content = seq;
    }

    public static GenRepContent getInstance(Object o)
    {
        if (o instanceof GenRepContent)
        {
            return (GenRepContent)o;
        }

        if (o instanceof ASN1Sequence)
        {
            return new GenRepContent((ASN1Sequence)o);
        }

        throw new IllegalArgumentException("Invalid object: " + o.getClass().getName());
    }

    public InfoTypeAndValue[] toInfoTypeAndValueArray()
    {
        InfoTypeAndValue[] result = new InfoTypeAndValue[content.size()];

        for (int i = 0; i != result.length; i++)
        {
            result[i] = InfoTypeAndValue.getInstance(content.getObjectAt(i));
        }

        return result;
    }

    /**
     * <pre>
     * GenRepContent ::= SEQUENCE OF InfoTypeAndValue
     * </pre>
     * @return a basic ASN.1 object representation.
     */
    public DERObject toASN1Object()
    {
        return content;
    }
}

@@ -73,16 +73,66 @@
 odable;%0A
+import org.bouncycastle.asn1.ASN1EncodableVector;%0A
 import o
@@ -205,16 +205,58 @@
 RObject;
+%0Aimport org.bouncycastle.asn1.DERSequence;
 %0A%0Apublic
@@ -780,32 +780,383 @@
 Name());%0A    %7D%0A%0A
+    public GenRepContent(InfoTypeAndValue itv)%0A    %7B%0A        content = new DERSequence(itv);%0A    %7D%0A%0A    public GenRepContent(InfoTypeAndValue%5B%5D itv)%0A    %7B%0A        ASN1EncodableVector v = new ASN1EncodableVector();%0A        for (int i = 0; i %3C itv.length; i++)%0A        %7B%0A            v.add(itv%5Bi%5D);%0A        %7D%0A        content = new DERSequence(v);%0A    %7D%0A%0A
     public InfoT

Add missing constructors