|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--codec.asn1.OIDRegistry
This class maps ASN.1 object identifiers onto ASN.1 types suitable for decoding the structure defined by the given OID. It is modelled along the lines of the ClassLoader and provides a hierarchy and top-level OID registries.
| Constructor Summary | |
OIDRegistry(OIDRegistry parent)
Creates an OID registry with the given parent. |
|
| Method Summary | |
static void |
addOIDRegistry(OIDRegistry r)
Adds a registry to the set of globally known ones unless it is already in the global set. |
boolean |
equals(Object o)
An OIDRegistry equals another iff both are of the same class. |
ASN1Type |
getASN1Type(ASN1ObjectIdentifier oid)
Retrieves an ASN.1 type based on the given OID. |
static OIDRegistry |
getDefaultRegistry()
This method returns the default OID registry. |
static OIDRegistry |
getGlobalOIDRegistry()
This method returns the global OIDRegistry instance that may be used for querying |
protected ASN1Type |
getLocalASN1Type(ASN1ObjectIdentifier oid)
Retrieves an ASN.1 type for the given OID or null if no
such type was found.
|
protected ASN1Type |
getLocalASN1Type(ASN1ObjectIdentifier oid,
Map map)
Retrieves an ASN.1 type for the given OID or null if no
such type was found. |
int |
hashCode()
The hash code of an instance is the hash code of its class. |
static void |
removeOIDRegistry(OIDRegistry r)
Removes the given OID registry from the set of globally known ones. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public OIDRegistry(OIDRegistry parent)
parent - The parent OID registry.| Method Detail |
public static final OIDRegistry getGlobalOIDRegistry()
public static final void addOIDRegistry(OIDRegistry r)
ASN1Permission, " OIDRegistry.add"
The reference to the parent registry of the given registry is cleared before it is added.
r - The registry to add.SecurityException - iff the caller has no right to add registries to the
global ones.public static final void removeOIDRegistry(OIDRegistry r)
ASN1Permission, " OIDRegistry.remove"
r - The registry to remove.SecurityException - iff the caller has no right to remove OID registries.public final ASN1Type getASN1Type(ASN1ObjectIdentifier oid)
null is returned. This method first calls getLocalASN1Type. If no ASN.1
type is found for the given OID then getASN1Type is called
for the parent OIDRegistry.oid - The registered OID of the desired type.null if no type with the given OID is
known.protected ASN1Type getLocalASN1Type(ASN1ObjectIdentifier oid)
null if no
such type was found.
This method should be overridden by subclasses. Subclasses should retrieve a pointer to their private synchronized Map with OID to String (or Class) mappings, and call the method with the same name but which takes an additional Map.
This implementation searches the global registries for a matching entry.
protected ASN1Type getLocalASN1Type(ASN1ObjectIdentifier oid,
Map map)
null if no
such type was found. Strings in the given Map are replaced
by the resolved classes.
This is a convenience method that can be called by subclasses with a Map that is specific to the subclass.
oid - The OID that is resolved.map - The Map that holds the OID to class (name)
mapping. The Map values consist either of
strings (class names) or of the resolved class objects.public static OIDRegistry getDefaultRegistry()
public boolean equals(Object o)
equals in class Objecttrue if both registries are of the same class.public int hashCode()
equals() method.hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||