codec.asn1
Interface ASN1CollectionOf

All Superinterfaces:
ASN1Collection, ASN1Type, Collection
All Known Implementing Classes:
ASN1AbstractCollectionOf, ASN1SequenceOf, ASN1SetOf

public interface ASN1CollectionOf
extends ASN1Collection

The basic interface for Java objects representing a constructed ASN.1 type such as a SEQUENCE or SET as specified in ITU-T Recommendation X.680.

Version:
"$Id: ASN1CollectionOf.java,v 1.2 2000/12/06 17:47:24 vroth Exp $"
Author:
Volker Roth

Method Summary
 Class getElementType()
          Returns the Java class representing the ASN.1 type of the elements in this collection.
 ASN1Type newElement()
          Creates and returns a new instance of the class passed to the constructor of this instance.
 
Methods inherited from interface codec.asn1.ASN1Collection
getCollection
 
Methods inherited from interface codec.asn1.ASN1Type
checkConstraints, decode, encode, getConstraint, getTag, getTagClass, getValue, isExplicit, isOptional, isType, setConstraint, setExplicit, setOptional
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

getElementType

public Class getElementType()
Returns the Java class representing the ASN.1 type of the elements in this collection.
Returns:
The ASN.1 type of the elements in this collection.

newElement

public ASN1Type newElement()
Creates and returns a new instance of the class passed to the constructor of this instance. The freshly created instance is added to this instance automatically.

If no new instance can be created then an IllegalStateException is thrown.

Decoders should call this method in order to create additional elements on decoding. Subclasses may use this method to keep track on elements added to them.

Returns:
A new instance of the element type of this sequence.
Throws:
IllegalStateException - if no new instance could be created.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.