diff options
author | Adam Young <ayoung@redhat.com> | 2011-11-18 13:56:30 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2012-01-04 11:24:40 -0500 |
commit | 04de68d946118b7c56691da707a01334799f17e8 (patch) | |
tree | d3ab1ebfe2363a2e96d32afa69c63b1a07b50263 /pki/base/common/src/com/netscape/certsrv/base | |
parent | 6373ddf8fdb15ecd841735910da728e55ad9582a (diff) | |
download | pki-04de68d946118b7c56691da707a01334799f17e8.tar.gz pki-04de68d946118b7c56691da707a01334799f17e8.tar.xz pki-04de68d946118b7c56691da707a01334799f17e8.zip |
typesafety certserv and cmscore
Using interface instead of implementing class
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/base')
-rw-r--r-- | pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java b/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java index e01d40f88..93dd25025 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java +++ b/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java @@ -34,9 +34,9 @@ public class MetaAttributeDef { private String mName; private ObjectIdentifier mOid; - private Class mValueClass; - private static Hashtable mNameToAttrDef = new Hashtable(); - private static Hashtable mOidToAttrDef = new Hashtable(); + private Class<?> mValueClass; + private static Hashtable<String, MetaAttributeDef> mNameToAttrDef = new Hashtable<String, MetaAttributeDef>(); + private static Hashtable<ObjectIdentifier, MetaAttributeDef> mOidToAttrDef = new Hashtable<ObjectIdentifier, MetaAttributeDef>(); private MetaAttributeDef() { } @@ -49,7 +49,7 @@ public class MetaAttributeDef { * @param valueClass attribute value class * @param oid attribute object identifier */ - private MetaAttributeDef(String name, Class valueClass, + private MetaAttributeDef(String name, Class<?> valueClass, ObjectIdentifier oid) { mName = name; mValueClass = valueClass; @@ -72,7 +72,7 @@ public class MetaAttributeDef { * * @return returns Java class for the attribute values */ - public Class getValueClass() { + public Class<?> getValueClass() { return mValueClass; } @@ -98,7 +98,7 @@ public class MetaAttributeDef { * @exception IllegalArgumentException if name or valueClass are null, or * conflicting attribute definition already exists */ - public static MetaAttributeDef register(String name, Class valueClass, + public static MetaAttributeDef register(String name, Class<?> valueClass, ObjectIdentifier oid) { if (name == null) { throw new IllegalArgumentException( @@ -183,7 +183,7 @@ public class MetaAttributeDef { * * @return returns enumeration of the registered attribute names */ - public static Enumeration getAttributeNames() { + public static Enumeration<String> getAttributeNames() { return mNameToAttrDef.keys(); } @@ -193,7 +193,7 @@ public class MetaAttributeDef { * * @return returns enumeration of the attribute object identifiers */ - public static Enumeration getAttributeNameOids() { + public static Enumeration<ObjectIdentifier> getAttributeNameOids() { return mOidToAttrDef.keys(); } } |