ASN1TypeCollectionpublic abstract class ASN1TypeCollection extends ASN1Constructured This abstract class represents ASN.1 type that is a collection of ASN.1 types. |
Fields Summary |
---|
public final ASN1Type[] | type | public final boolean[] | OPTIONAL | public final Object[] | DEFAULT |
Constructors Summary |
---|
public ASN1TypeCollection(int tagNumber, ASN1Type[] type)Constructs ASN.1 collection type.
super(tagNumber);
// FIXME what about empty sequence?
// if (type.length == 0) {
// throw new ASN1Exception("ASN1 collection type: "
// + getClass().getName()
// + " MUST have at least one component");
// }
this.type = type;
this.OPTIONAL = new boolean[type.length];
this.DEFAULT = new Object[type.length];
|
Methods Summary |
---|
protected void | getValues(java.lang.Object object, java.lang.Object[] values)Provides an object's values to be encoded
Derived classes should override this method to provide
encoding for a selected class of objects.
The default implementation throws RuntimeException.
throw new RuntimeException(Messages.getString("security.101", getClass().getName())); //$NON-NLS-1$
| protected final void | setDefault(java.lang.Object object, int index)Sets a default value for a collection component.
The component also became an optional component.
OPTIONAL[index] = true;
DEFAULT[index] = object;
| protected final void | setOptional(int index)Sets a collection component as optional
OPTIONAL[index] = true;
|
|