jp.bitmeister.asn1.type.builtin
Class SEQUENCE_OF<T extends ASN1Type>
java.lang.Object
jp.bitmeister.asn1.type.ASN1Type
jp.bitmeister.asn1.type.CollectionType<T>
jp.bitmeister.asn1.type.builtin.SEQUENCE_OF<T>
- All Implemented Interfaces:
- java.lang.Cloneable, SizeCountable
public abstract class SEQUENCE_OF<T extends ASN1Type>
- extends CollectionType<T>
Represents ASN.1 'SEQUENCE OF' type.
This is the class used for defining 'SEQUENCE OF' types. Generic type
parameter T
indicates component type of the 'SEQUENCE OF' type.
Constructors of a sub-class of SEQUENCE_OF
must call parent
constructor with componentType
parameter that is the class object of
T
in them.
- Author:
- WATANABE, Jun.
Constructor Summary |
SEQUENCE_OF(java.lang.Class<T> componentType)
Instantiate an empty SEQUENCE_OF . |
SEQUENCE_OF(java.lang.Class<T> componentType,
T... components)
Instantiate a SEQUENCE_OF and initialize it with the components. |
Method Summary |
<R,E extends java.lang.Throwable>
R |
|
accept(ASN1Visitor<R,E> visitor)
Accepts the ASN1Visitor and calls a visit method of the
visitor. |
protected java.util.Collection<T> |
newCollection()
Instantiates a new collection of the component type. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
SEQUENCE_OF
public SEQUENCE_OF(java.lang.Class<T> componentType)
- Instantiate an empty
SEQUENCE_OF
.
- Parameters:
componentType
- The class instance of component type.
SEQUENCE_OF
public SEQUENCE_OF(java.lang.Class<T> componentType,
T... components)
- Instantiate a
SEQUENCE_OF
and initialize it with the components.
- Parameters:
componentType
- The class instance of component type.components
- Components to be set this instance.
newCollection
protected java.util.Collection<T> newCollection()
- Description copied from class:
CollectionType
- Instantiates a new collection of the component type.
- Specified by:
newCollection
in class CollectionType<T extends ASN1Type>
- Returns:
- A new collection.
accept
public <R,E extends java.lang.Throwable> R accept(ASN1Visitor<R,E> visitor)
throws E extends java.lang.Throwable
- Description copied from class:
ASN1Type
- Accepts the
ASN1Visitor
and calls a visit
method of the
visitor.
- Specified by:
accept
in class ASN1Type
- Parameters:
visitor
- The visitor.
- Returns:
- Result.
- Throws:
E
- When an error occured in the visit
method of the
visitor.
E extends java.lang.Throwable