directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [2/2] directory-kerby git commit: DIRKRB-516 Rename enum type in kerby-pkix/x509/type. Contributed by Yan.
Date Wed, 30 Dec 2015 03:29:52 GMT
DIRKRB-516 Rename enum type in kerby-pkix/x509/type. Contributed by Yan.


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/c00bbc71
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/c00bbc71
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/c00bbc71

Branch: refs/heads/trunk
Commit: c00bbc71fce4589a46f6ca90f4db5b24f85e8ac2
Parents: 2fdd50d
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Wed Dec 30 11:36:39 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Wed Dec 30 11:36:39 2015 +0800

----------------------------------------------------------------------
 .../kerby/x509/type/AccessDescription.java      | 16 +++--
 .../kerby/x509/type/AlgorithmIdentifier.java    | 16 +++--
 .../apache/kerby/x509/type/AttCertIssuer.java   | 16 +++--
 .../kerby/x509/type/AttCertValidityPeriod.java  | 16 +++--
 .../org/apache/kerby/x509/type/Attribute.java   | 16 +++--
 .../kerby/x509/type/AttributeCertificate.java   | 22 +++----
 .../x509/type/AttributeCertificateInfo.java     | 58 +++++++++---------
 .../kerby/x509/type/AuthorityKeyIdentifier.java | 22 +++----
 .../kerby/x509/type/BasicConstraints.java       | 16 +++--
 .../org/apache/kerby/x509/type/Certificate.java | 22 +++----
 .../apache/kerby/x509/type/CertificateList.java | 22 +++----
 .../apache/kerby/x509/type/CertificatePair.java | 16 +++--
 .../apache/kerby/x509/type/DSAParameter.java    | 22 +++----
 .../org/apache/kerby/x509/type/DhParameter.java | 22 +++----
 .../org/apache/kerby/x509/type/DigestInfo.java  | 16 +++--
 .../apache/kerby/x509/type/DirectoryString.java | 34 +++++------
 .../org/apache/kerby/x509/type/DisplayText.java | 28 ++++-----
 .../kerby/x509/type/DistributionPoint.java      | 22 +++----
 .../kerby/x509/type/DistributionPointName.java  | 16 +++--
 .../apache/kerby/x509/type/EDIPartyName.java    | 16 +++--
 .../org/apache/kerby/x509/type/Extension.java   | 22 +++----
 .../org/apache/kerby/x509/type/GeneralName.java | 58 +++++++++---------
 .../apache/kerby/x509/type/GeneralSubtree.java  | 22 +++----
 .../java/org/apache/kerby/x509/type/Holder.java | 22 +++----
 .../apache/kerby/x509/type/IetfAttrSyntax.java  | 16 +++--
 .../kerby/x509/type/IetfAttrSyntaxChoice.java   | 22 +++----
 .../apache/kerby/x509/type/IssuerSerial.java    | 22 +++----
 .../x509/type/IssuingDistributionPoint.java     | 40 ++++++------
 .../apache/kerby/x509/type/NameConstraints.java | 16 +++--
 .../apache/kerby/x509/type/NoticeReference.java | 16 +++--
 .../kerby/x509/type/ObjectDigestInfo.java       | 28 ++++-----
 .../org/apache/kerby/x509/type/OtherName.java   | 16 +++--
 .../kerby/x509/type/PolicyConstraints.java      | 16 +++--
 .../kerby/x509/type/PolicyInformation.java      | 16 +++--
 .../apache/kerby/x509/type/PolicyMapping.java   | 16 +++--
 .../kerby/x509/type/PolicyQualifierInfo.java    | 16 +++--
 .../kerby/x509/type/PrivateKeyUsagePeriod.java  | 16 +++--
 .../kerby/x509/type/RevokedCertificate.java     | 22 +++----
 .../org/apache/kerby/x509/type/RoleSyntax.java  | 16 +++--
 .../kerby/x509/type/SubjectPublicKeyInfo.java   | 16 +++--
 .../org/apache/kerby/x509/type/TBSCertList.java | 46 +++++++-------
 .../apache/kerby/x509/type/TBSCertificate.java  | 64 ++++++++++----------
 .../java/org/apache/kerby/x509/type/Target.java | 22 +++----
 .../org/apache/kerby/x509/type/TargetCert.java  | 22 +++----
 .../java/org/apache/kerby/x509/type/Time.java   | 16 +++--
 .../org/apache/kerby/x509/type/UserNotice.java  | 16 +++--
 .../java/org/apache/kerby/x509/type/V2Form.java | 22 +++----
 47 files changed, 491 insertions(+), 585 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AccessDescription.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AccessDescription.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AccessDescription.java
index e7060d2..9bc9bd1 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AccessDescription.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AccessDescription.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.type.Asn1ObjectIdentifier;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.AccessDescription.MyEnum.*;
-
 /**
  *
  * <pre>
@@ -36,7 +34,7 @@ import static org.apache.kerby.x509.type.AccessDescription.MyEnum.*;
  * </pre>
  */
 public class AccessDescription extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum AccessDescriptionField implements EnumType {
         ACCESS_METHOD,
         ACCESS_LOCATION;
 
@@ -52,8 +50,8 @@ public class AccessDescription extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(ACCESS_METHOD, Asn1ObjectIdentifier.class),
-        new Asn1FieldInfo(ACCESS_LOCATION, GeneralName.class)
+        new Asn1FieldInfo(AccessDescriptionField.ACCESS_METHOD, Asn1ObjectIdentifier.class),
+        new Asn1FieldInfo(AccessDescriptionField.ACCESS_LOCATION, GeneralName.class)
     };
 
     public AccessDescription() {
@@ -61,18 +59,18 @@ public class AccessDescription extends Asn1SequenceType {
     }
 
     public Asn1ObjectIdentifier getAccessMethod() {
-        return getFieldAs(ACCESS_METHOD, Asn1ObjectIdentifier.class);
+        return getFieldAs(AccessDescriptionField.ACCESS_METHOD, Asn1ObjectIdentifier.class);
     }
 
     public void setAccessMethod(Asn1ObjectIdentifier accessMethod) {
-        setFieldAs(ACCESS_METHOD, accessMethod);
+        setFieldAs(AccessDescriptionField.ACCESS_METHOD, accessMethod);
     }
 
     public GeneralName getAccessLocation() {
-        return getFieldAs(ACCESS_LOCATION, GeneralName.class);
+        return getFieldAs(AccessDescriptionField.ACCESS_LOCATION, GeneralName.class);
     }
 
     public void setAccessLocation(GeneralName accessLocation) {
-        setFieldAs(ACCESS_LOCATION, accessLocation);
+        setFieldAs(AccessDescriptionField.ACCESS_LOCATION, accessLocation);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AlgorithmIdentifier.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AlgorithmIdentifier.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AlgorithmIdentifier.java
index 97623a2..9cf9ada 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AlgorithmIdentifier.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AlgorithmIdentifier.java
@@ -26,8 +26,6 @@ import org.apache.kerby.asn1.type.Asn1ObjectIdentifier;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 import org.apache.kerby.asn1.type.Asn1Type;
 
-import static org.apache.kerby.x509.type.AlgorithmIdentifier.MyEnum.*;
-
 /**
  * AlgorithmIdentifier  ::=  SEQUENCE  {
  *    algorithm               OBJECT IDENTIFIER,
@@ -36,7 +34,7 @@ import static org.apache.kerby.x509.type.AlgorithmIdentifier.MyEnum.*;
  */
 
 public class AlgorithmIdentifier extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum AlgorithmIdentifierField implements EnumType {
         ALGORITHM,
         PARAMETERS;
 
@@ -52,8 +50,8 @@ public class AlgorithmIdentifier extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{
-            new Asn1FieldInfo(ALGORITHM, Asn1ObjectIdentifier.class),
-            new Asn1FieldInfo(PARAMETERS, Asn1Any.class)
+            new Asn1FieldInfo(AlgorithmIdentifierField.ALGORITHM, Asn1ObjectIdentifier.class),
+            new Asn1FieldInfo(AlgorithmIdentifierField.PARAMETERS, Asn1Any.class)
     };
 
     public AlgorithmIdentifier() {
@@ -61,18 +59,18 @@ public class AlgorithmIdentifier extends Asn1SequenceType {
     }
 
     public String getAlgorithm() {
-        return getFieldAsObjId(ALGORITHM);
+        return getFieldAsObjId(AlgorithmIdentifierField.ALGORITHM);
     }
 
     public void setAlgorithm(String algorithm) {
-        setFieldAsObjId(ALGORITHM, algorithm);
+        setFieldAsObjId(AlgorithmIdentifierField.ALGORITHM, algorithm);
     }
 
     public <T extends Asn1Type> T getParametersAs(Class<T> t) {
-        return getFieldAsAny(PARAMETERS, t);
+        return getFieldAsAny(AlgorithmIdentifierField.PARAMETERS, t);
     }
 
     public void setParameters(Asn1Type parameters) {
-        setFieldAsAny(PARAMETERS, parameters);
+        setFieldAsAny(AlgorithmIdentifierField.PARAMETERS, parameters);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertIssuer.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertIssuer.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertIssuer.java
index bb961ec..1a8ed54 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertIssuer.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertIssuer.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.ExplicitField;
 import org.apache.kerby.asn1.type.Asn1Choice;
 
-import static org.apache.kerby.x509.type.AttCertIssuer.MyEnum.*;
-
 /**
  *
  * <pre>
@@ -36,7 +34,7 @@ import static org.apache.kerby.x509.type.AttCertIssuer.MyEnum.*;
  * </pre>
  */
 public class AttCertIssuer extends Asn1Choice {
-    protected enum MyEnum implements EnumType {
+    protected enum AttCertIssuerField implements EnumType {
         V1_FORM,
         V2_FORM;
 
@@ -52,8 +50,8 @@ public class AttCertIssuer extends Asn1Choice {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(V1_FORM, GeneralNames.class),
-        new ExplicitField(V2_FORM, 0, V2Form.class)
+        new Asn1FieldInfo(AttCertIssuerField.V1_FORM, GeneralNames.class),
+        new ExplicitField(AttCertIssuerField.V2_FORM, 0, V2Form.class)
     };
 
     public AttCertIssuer() {
@@ -61,18 +59,18 @@ public class AttCertIssuer extends Asn1Choice {
     }
 
     public GeneralNames getV1Form() {
-        return getChoiceValueAs(V1_FORM, GeneralNames.class);
+        return getChoiceValueAs(AttCertIssuerField.V1_FORM, GeneralNames.class);
     }
 
     public void setV1Form(GeneralNames v1Form) {
-        setChoiceValue(V1_FORM, v1Form);
+        setChoiceValue(AttCertIssuerField.V1_FORM, v1Form);
     }
 
     public V2Form getV2Form() {
-        return getChoiceValueAs(V2_FORM, V2Form.class);
+        return getChoiceValueAs(AttCertIssuerField.V2_FORM, V2Form.class);
     }
 
     public void setV2Form(V2Form v2Form) {
-        setChoiceValue(V2_FORM, v2Form);
+        setChoiceValue(AttCertIssuerField.V2_FORM, v2Form);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertValidityPeriod.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertValidityPeriod.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertValidityPeriod.java
index a281aea..408d286 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertValidityPeriod.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttCertValidityPeriod.java
@@ -25,8 +25,6 @@ import org.apache.kerby.asn1.type.Asn1GeneralizedTime;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 import org.apache.kerby.asn1.type.Asn1UtcTime;
 
-import static org.apache.kerby.x509.type.AttCertValidityPeriod.MyEnum.*;
-
 /**
  * <pre>
  *  AttCertValidityPeriod  ::= SEQUENCE {
@@ -36,7 +34,7 @@ import static org.apache.kerby.x509.type.AttCertValidityPeriod.MyEnum.*;
  * </pre>
  */
 public class AttCertValidityPeriod extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum AttCertValidityPeriodField implements EnumType {
         NOT_BEFORE,
         NOT_AFTER;
 
@@ -52,8 +50,8 @@ public class AttCertValidityPeriod extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(NOT_BEFORE, Asn1UtcTime.class),
-        new Asn1FieldInfo(NOT_AFTER, Asn1UtcTime.class)
+        new Asn1FieldInfo(AttCertValidityPeriodField.NOT_BEFORE, Asn1UtcTime.class),
+        new Asn1FieldInfo(AttCertValidityPeriodField.NOT_AFTER, Asn1UtcTime.class)
     };
 
     public AttCertValidityPeriod() {
@@ -61,18 +59,18 @@ public class AttCertValidityPeriod extends Asn1SequenceType {
     }
 
     public Asn1GeneralizedTime getNotBeforeTime() {
-        return getFieldAs(NOT_BEFORE, Asn1GeneralizedTime.class);
+        return getFieldAs(AttCertValidityPeriodField.NOT_BEFORE, Asn1GeneralizedTime.class);
     }
 
     public void setNotBeforeTime(Asn1GeneralizedTime notBeforeTime) {
-        setFieldAs(NOT_BEFORE, notBeforeTime);
+        setFieldAs(AttCertValidityPeriodField.NOT_BEFORE, notBeforeTime);
     }
 
     public Asn1GeneralizedTime getNotAfterTime() {
-        return getFieldAs(NOT_AFTER, Asn1GeneralizedTime.class);
+        return getFieldAs(AttCertValidityPeriodField.NOT_AFTER, Asn1GeneralizedTime.class);
     }
 
     public void setNotAfterTime(Asn1GeneralizedTime notAfterTime) {
-        setFieldAs(NOT_AFTER, notAfterTime);
+        setFieldAs(AttCertValidityPeriodField.NOT_AFTER, notAfterTime);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Attribute.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Attribute.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Attribute.java
index d9ca88f..da9cc0c 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Attribute.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Attribute.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.type.Asn1ObjectIdentifier;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.Attribute.MyEnum.*;
-
 /**
  * <pre>
  * Attribute ::= SEQUENCE {
@@ -38,7 +36,7 @@ import static org.apache.kerby.x509.type.Attribute.MyEnum.*;
  * </pre>
  */
 public class Attribute extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum AttributeField implements EnumType {
         ATTR_TYPE,
         ATTR_VALUES;
 
@@ -54,8 +52,8 @@ public class Attribute extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(ATTR_TYPE, Asn1ObjectIdentifier.class),
-        new Asn1FieldInfo(ATTR_VALUES, AttributeValues.class)
+        new Asn1FieldInfo(AttributeField.ATTR_TYPE, Asn1ObjectIdentifier.class),
+        new Asn1FieldInfo(AttributeField.ATTR_VALUES, AttributeValues.class)
     };
 
     public Attribute() {
@@ -63,18 +61,18 @@ public class Attribute extends Asn1SequenceType {
     }
 
     public Asn1ObjectIdentifier getAttrType() {
-        return getFieldAs(ATTR_TYPE, Asn1ObjectIdentifier.class);
+        return getFieldAs(AttributeField.ATTR_TYPE, Asn1ObjectIdentifier.class);
     }
 
     public void setAttrType(Asn1ObjectIdentifier attrType) {
-        setFieldAs(ATTR_TYPE, attrType);
+        setFieldAs(AttributeField.ATTR_TYPE, attrType);
     }
 
     public AttributeValues getAttrValues() {
-        return getFieldAs(ATTR_VALUES, AttributeValues.class);
+        return getFieldAs(AttributeField.ATTR_VALUES, AttributeValues.class);
     }
 
     public void setAttrValues(AttributeValues attrValues) {
-        setFieldAs(ATTR_VALUES, attrValues);
+        setFieldAs(AttributeField.ATTR_VALUES, attrValues);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificate.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificate.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificate.java
index cc26ab4..f57836d 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificate.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificate.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.type.Asn1BitString;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.AttributeCertificate.MyEnum.*;
-
 /**
  * <pre>
  *  AttributeCertificate ::= SEQUENCE {
@@ -36,7 +34,7 @@ import static org.apache.kerby.x509.type.AttributeCertificate.MyEnum.*;
  * </pre>
  */
 public class AttributeCertificate extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum AttributeCertificateField implements EnumType {
         ACI_INFO,
         SIGNATURE_ALGORITHM,
         SIGNATURE_VALUE;
@@ -53,9 +51,9 @@ public class AttributeCertificate extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(ACI_INFO, AttributeCertificateInfo.class),
-        new Asn1FieldInfo(SIGNATURE_ALGORITHM, AlgorithmIdentifier.class),
-        new Asn1FieldInfo(SIGNATURE_VALUE, Asn1BitString.class)
+        new Asn1FieldInfo(AttributeCertificateField.ACI_INFO, AttributeCertificateInfo.class),
+        new Asn1FieldInfo(AttributeCertificateField.SIGNATURE_ALGORITHM, AlgorithmIdentifier.class),
+        new Asn1FieldInfo(AttributeCertificateField.SIGNATURE_VALUE, Asn1BitString.class)
     };
 
     public AttributeCertificate() {
@@ -63,26 +61,26 @@ public class AttributeCertificate extends Asn1SequenceType {
     }
 
     public AttributeCertificateInfo getAcinfo() {
-        return getFieldAs(ACI_INFO, AttributeCertificateInfo.class);
+        return getFieldAs(AttributeCertificateField.ACI_INFO, AttributeCertificateInfo.class);
     }
 
     public void setAciInfo(AttributeCertificateInfo aciInfo) {
-        setFieldAs(ACI_INFO, aciInfo);
+        setFieldAs(AttributeCertificateField.ACI_INFO, aciInfo);
     }
 
     public AlgorithmIdentifier getSignatureAlgorithm() {
-        return getFieldAs(SIGNATURE_ALGORITHM, AlgorithmIdentifier.class);
+        return getFieldAs(AttributeCertificateField.SIGNATURE_ALGORITHM, AlgorithmIdentifier.class);
     }
 
     public void setSignatureAlgorithm(AlgorithmIdentifier signatureAlgorithm) {
-        setFieldAs(SIGNATURE_ALGORITHM, signatureAlgorithm);
+        setFieldAs(AttributeCertificateField.SIGNATURE_ALGORITHM, signatureAlgorithm);
     }
 
     public Asn1BitString getSignatureValue() {
-        return getFieldAs(SIGNATURE_VALUE, Asn1BitString.class);
+        return getFieldAs(AttributeCertificateField.SIGNATURE_VALUE, Asn1BitString.class);
     }
 
     public void setSignatureValue(Asn1BitString signatureValue) {
-        setFieldAs(SIGNATURE_VALUE, signatureValue);
+        setFieldAs(AttributeCertificateField.SIGNATURE_VALUE, signatureValue);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificateInfo.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificateInfo.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificateInfo.java
index eea4d54..d466c12 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificateInfo.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AttributeCertificateInfo.java
@@ -25,8 +25,6 @@ import org.apache.kerby.asn1.type.Asn1BitString;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.AttributeCertificateInfo.MyEnum.*;
-
 /**
  *
  * <pre>
@@ -48,7 +46,7 @@ import static org.apache.kerby.x509.type.AttributeCertificateInfo.MyEnum.*;
  * </pre>
  */
 public class AttributeCertificateInfo extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum ACInfoField implements EnumType {
         VERSION,
         HOLDER,
         ISSUER,
@@ -71,15 +69,15 @@ public class AttributeCertificateInfo extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(VERSION, Asn1Integer.class),
-        new Asn1FieldInfo(HOLDER, Holder.class),
-        new Asn1FieldInfo(ISSUER, AttCertIssuer.class),
-        new Asn1FieldInfo(SIGNATURE, AlgorithmIdentifier.class),
-        new Asn1FieldInfo(SERIAL_NUMBER, CertificateSerialNumber.class),
-        new Asn1FieldInfo(ATTR_CERT_VALIDITY_PERIOD, AttCertValidityPeriod.class),
-        new Asn1FieldInfo(ATTRIBUTES, Attributes.class),
-        new Asn1FieldInfo(ISSUER_UNIQUE_ID, Asn1BitString.class),
-        new Asn1FieldInfo(EXTENSIONS, Extensions.class)
+        new Asn1FieldInfo(ACInfoField.VERSION, Asn1Integer.class),
+        new Asn1FieldInfo(ACInfoField.HOLDER, Holder.class),
+        new Asn1FieldInfo(ACInfoField.ISSUER, AttCertIssuer.class),
+        new Asn1FieldInfo(ACInfoField.SIGNATURE, AlgorithmIdentifier.class),
+        new Asn1FieldInfo(ACInfoField.SERIAL_NUMBER, CertificateSerialNumber.class),
+        new Asn1FieldInfo(ACInfoField.ATTR_CERT_VALIDITY_PERIOD, AttCertValidityPeriod.class),
+        new Asn1FieldInfo(ACInfoField.ATTRIBUTES, Attributes.class),
+        new Asn1FieldInfo(ACInfoField.ISSUER_UNIQUE_ID, Asn1BitString.class),
+        new Asn1FieldInfo(ACInfoField.EXTENSIONS, Extensions.class)
     };
 
     public AttributeCertificateInfo() {
@@ -87,74 +85,74 @@ public class AttributeCertificateInfo extends Asn1SequenceType {
     }
 
     public int getVersion() {
-        return getFieldAsInteger(VERSION);
+        return getFieldAsInteger(ACInfoField.VERSION);
     }
 
     public void setVersion(int version) {
-        setFieldAsInt(VERSION, version);
+        setFieldAsInt(ACInfoField.VERSION, version);
     }
 
     public Holder getHolder() {
-        return getFieldAs(HOLDER, Holder.class);
+        return getFieldAs(ACInfoField.HOLDER, Holder.class);
     }
 
     public void setHolder(Holder holder) {
-        setFieldAs(HOLDER, holder);
+        setFieldAs(ACInfoField.HOLDER, holder);
     }
 
     public AttCertIssuer getIssuer() {
-        return getFieldAs(ISSUER, AttCertIssuer.class);
+        return getFieldAs(ACInfoField.ISSUER, AttCertIssuer.class);
     }
 
     public void setIssuer(AttCertIssuer attCertIssuer) {
-        setFieldAs(ISSUER, attCertIssuer);
+        setFieldAs(ACInfoField.ISSUER, attCertIssuer);
     }
 
     public AlgorithmIdentifier getSignature() {
-        return getFieldAs(SIGNATURE, AlgorithmIdentifier.class);
+        return getFieldAs(ACInfoField.SIGNATURE, AlgorithmIdentifier.class);
     }
 
     public void setSignature(AlgorithmIdentifier signature) {
-        setFieldAs(SIGNATURE, signature);
+        setFieldAs(ACInfoField.SIGNATURE, signature);
     }
 
     public CertificateSerialNumber getSerialNumber() {
-        return getFieldAs(SERIAL_NUMBER, CertificateSerialNumber.class);
+        return getFieldAs(ACInfoField.SERIAL_NUMBER, CertificateSerialNumber.class);
     }
 
     public void setSerialNumber(CertificateSerialNumber certificateSerialNumber) {
-        setFieldAs(SERIAL_NUMBER, certificateSerialNumber);
+        setFieldAs(ACInfoField.SERIAL_NUMBER, certificateSerialNumber);
     }
 
     public AttCertValidityPeriod getAttrCertValidityPeriod() {
-        return getFieldAs(ATTR_CERT_VALIDITY_PERIOD, AttCertValidityPeriod.class);
+        return getFieldAs(ACInfoField.ATTR_CERT_VALIDITY_PERIOD, AttCertValidityPeriod.class);
     }
 
     public void setAttrCertValidityPeriod(AttCertValidityPeriod attrCertValidityPeriod) {
-        setFieldAs(ATTR_CERT_VALIDITY_PERIOD, attrCertValidityPeriod);
+        setFieldAs(ACInfoField.ATTR_CERT_VALIDITY_PERIOD, attrCertValidityPeriod);
     }
 
     public Attributes getAttributes() {
-        return getFieldAs(ATTRIBUTES, Attributes.class);
+        return getFieldAs(ACInfoField.ATTRIBUTES, Attributes.class);
     }
 
     public void setAttributes(Attributes attributes) {
-        setFieldAs(ATTRIBUTES, attributes);
+        setFieldAs(ACInfoField.ATTRIBUTES, attributes);
     }
 
     public byte[] getIssuerUniqueID() {
-        return getFieldAs(ISSUER_UNIQUE_ID, Asn1BitString.class).getValue();
+        return getFieldAs(ACInfoField.ISSUER_UNIQUE_ID, Asn1BitString.class).getValue();
     }
 
     public void setIssuerUniqueId(byte[] issuerUniqueId) {
-        setFieldAs(ISSUER_UNIQUE_ID, new Asn1BitString(issuerUniqueId));
+        setFieldAs(ACInfoField.ISSUER_UNIQUE_ID, new Asn1BitString(issuerUniqueId));
     }
 
     public Extensions getExtensions() {
-        return getFieldAs(EXTENSIONS, Extensions.class);
+        return getFieldAs(ACInfoField.EXTENSIONS, Extensions.class);
     }
 
     public void setExtensions(Extensions extensions) {
-        setFieldAs(EXTENSIONS, extensions);
+        setFieldAs(ACInfoField.EXTENSIONS, extensions);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AuthorityKeyIdentifier.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AuthorityKeyIdentifier.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AuthorityKeyIdentifier.java
index 6ab1200..dd36511 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AuthorityKeyIdentifier.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/AuthorityKeyIdentifier.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.ImplicitField;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.AuthorityKeyIdentifier.MyEnum.*;
-
 /**
  *
  * <pre>
@@ -42,7 +40,7 @@ import static org.apache.kerby.x509.type.AuthorityKeyIdentifier.MyEnum.*;
  *
  */
 public class AuthorityKeyIdentifier extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum AKIdentifierField implements EnumType {
         KEY_IDENTIFIER,
         AUTHORITY_CERT_ISSUER,
         AUTHORITY_CERT_SERIAL_NUMBER;
@@ -59,9 +57,9 @@ public class AuthorityKeyIdentifier extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new ImplicitField(KEY_IDENTIFIER, KeyIdentifier.class),
-        new ImplicitField(AUTHORITY_CERT_ISSUER, GeneralNames.class),
-        new ImplicitField(AUTHORITY_CERT_SERIAL_NUMBER, CertificateSerialNumber.class)
+        new ImplicitField(AKIdentifierField.KEY_IDENTIFIER, KeyIdentifier.class),
+        new ImplicitField(AKIdentifierField.AUTHORITY_CERT_ISSUER, GeneralNames.class),
+        new ImplicitField(AKIdentifierField.AUTHORITY_CERT_SERIAL_NUMBER, CertificateSerialNumber.class)
     };
 
     public AuthorityKeyIdentifier() {
@@ -69,26 +67,26 @@ public class AuthorityKeyIdentifier extends Asn1SequenceType {
     }
 
     public KeyIdentifier getKeyIdentifier() {
-        return getFieldAs(KEY_IDENTIFIER, KeyIdentifier.class);
+        return getFieldAs(AKIdentifierField.KEY_IDENTIFIER, KeyIdentifier.class);
     }
 
     public void setKeyIdentifier(KeyIdentifier keyIdentifier) {
-        setFieldAs(KEY_IDENTIFIER, keyIdentifier);
+        setFieldAs(AKIdentifierField.KEY_IDENTIFIER, keyIdentifier);
     }
 
     public GeneralNames getAuthorityCertIssuer() {
-        return getFieldAs(AUTHORITY_CERT_ISSUER, GeneralNames.class);
+        return getFieldAs(AKIdentifierField.AUTHORITY_CERT_ISSUER, GeneralNames.class);
     }
 
     public void setAuthorityCertIssuer(GeneralNames authorityCertIssuer) {
-        setFieldAs(AUTHORITY_CERT_ISSUER, authorityCertIssuer);
+        setFieldAs(AKIdentifierField.AUTHORITY_CERT_ISSUER, authorityCertIssuer);
     }
     
     public CertificateSerialNumber getAuthorityCertSerialNumber() {
-        return getFieldAs(AUTHORITY_CERT_SERIAL_NUMBER, CertificateSerialNumber.class);
+        return getFieldAs(AKIdentifierField.AUTHORITY_CERT_SERIAL_NUMBER, CertificateSerialNumber.class);
     }
 
     public void setAuthorityCertSerialNumber(CertificateSerialNumber authorityCertSerialNumber) {
-        setFieldAs(AUTHORITY_CERT_SERIAL_NUMBER, authorityCertSerialNumber);
+        setFieldAs(AKIdentifierField.AUTHORITY_CERT_SERIAL_NUMBER, authorityCertSerialNumber);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/BasicConstraints.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/BasicConstraints.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/BasicConstraints.java
index e24339e..d28e4e1 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/BasicConstraints.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/BasicConstraints.java
@@ -27,8 +27,6 @@ import org.apache.kerby.asn1.type.Asn1SequenceType;
 
 import java.math.BigInteger;
 
-import static org.apache.kerby.x509.type.BasicConstraints.MyEnum.*;
-
 /**
  * <pre>
  * BasicConstraints := SEQUENCE {
@@ -38,7 +36,7 @@ import static org.apache.kerby.x509.type.BasicConstraints.MyEnum.*;
  * </pre>
  */
 public class BasicConstraints extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum BasicConstraintsField implements EnumType {
         CA,
         PATH_LEN_CONSTRAINT;
 
@@ -54,8 +52,8 @@ public class BasicConstraints extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(CA, Asn1Boolean.class),
-        new Asn1FieldInfo(PATH_LEN_CONSTRAINT, Asn1Integer.class)
+        new Asn1FieldInfo(BasicConstraintsField.CA, Asn1Boolean.class),
+        new Asn1FieldInfo(BasicConstraintsField.PATH_LEN_CONSTRAINT, Asn1Integer.class)
     };
 
     public BasicConstraints() {
@@ -67,18 +65,18 @@ public class BasicConstraints extends Asn1SequenceType {
     }
 
     public boolean getCA() {
-        return getFieldAs(CA, Asn1Boolean.class).getValue();
+        return getFieldAs(BasicConstraintsField.CA, Asn1Boolean.class).getValue();
     }
 
     public void setCA(Asn1Boolean isCA) {
-        setFieldAs(CA, isCA);
+        setFieldAs(BasicConstraintsField.CA, isCA);
     }
 
     public BigInteger getPathLenConstraint() {
-        return getFieldAs(PATH_LEN_CONSTRAINT, Asn1Integer.class).getValue();
+        return getFieldAs(BasicConstraintsField.PATH_LEN_CONSTRAINT, Asn1Integer.class).getValue();
     }
 
     public void setPathLenConstraint(Asn1Integer pathLenConstraint) {
-        setFieldAs(PATH_LEN_CONSTRAINT, pathLenConstraint);
+        setFieldAs(BasicConstraintsField.PATH_LEN_CONSTRAINT, pathLenConstraint);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Certificate.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Certificate.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Certificate.java
index 8f652d7..8862d33 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Certificate.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Certificate.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.type.Asn1BitString;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.Certificate.MyEnum.*;
-
 /**
  * <pre>
  *  Certificate ::= SEQUENCE {
@@ -36,7 +34,7 @@ import static org.apache.kerby.x509.type.Certificate.MyEnum.*;
  * </pre>
  */
 public class Certificate extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum CertificateField implements EnumType {
         TBS_CERTIFICATE,
         SIGNATURE_ALGORITHM,
         SIGNATURE;
@@ -53,9 +51,9 @@ public class Certificate extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(TBS_CERTIFICATE, TBSCertificate.class),
-        new Asn1FieldInfo(SIGNATURE_ALGORITHM, AlgorithmIdentifier.class),
-        new Asn1FieldInfo(SIGNATURE, Asn1BitString.class)
+        new Asn1FieldInfo(CertificateField.TBS_CERTIFICATE, TBSCertificate.class),
+        new Asn1FieldInfo(CertificateField.SIGNATURE_ALGORITHM, AlgorithmIdentifier.class),
+        new Asn1FieldInfo(CertificateField.SIGNATURE, Asn1BitString.class)
     };
 
     public Certificate() {
@@ -63,26 +61,26 @@ public class Certificate extends Asn1SequenceType {
     }
 
     public TBSCertificate getTBSCertificate() {
-        return getFieldAs(TBS_CERTIFICATE, TBSCertificate.class);
+        return getFieldAs(CertificateField.TBS_CERTIFICATE, TBSCertificate.class);
     }
 
     public void setTbsCertificate(TBSCertificate tbsCertificate) {
-        setFieldAs(TBS_CERTIFICATE, tbsCertificate);
+        setFieldAs(CertificateField.TBS_CERTIFICATE, tbsCertificate);
     }
 
     public AlgorithmIdentifier getSignatureAlgorithm() {
-        return getFieldAs(SIGNATURE_ALGORITHM, AlgorithmIdentifier.class);
+        return getFieldAs(CertificateField.SIGNATURE_ALGORITHM, AlgorithmIdentifier.class);
     }
 
     public void setSignatureAlgorithm(AlgorithmIdentifier signatureAlgorithm) {
-        setFieldAs(SIGNATURE_ALGORITHM, signatureAlgorithm);
+        setFieldAs(CertificateField.SIGNATURE_ALGORITHM, signatureAlgorithm);
     }
 
     public Asn1BitString getSignature() {
-        return getFieldAs(SIGNATURE, Asn1BitString.class);
+        return getFieldAs(CertificateField.SIGNATURE, Asn1BitString.class);
     }
 
     public void setSignature(Asn1BitString signature) {
-        setFieldAs(SIGNATURE, signature);
+        setFieldAs(CertificateField.SIGNATURE, signature);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificateList.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificateList.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificateList.java
index e355610..5023db3 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificateList.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificateList.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.type.Asn1BitString;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.CertificateList.MyEnum.*;
-
 /**
  *
  * RFC-2459:
@@ -38,7 +36,7 @@ import static org.apache.kerby.x509.type.CertificateList.MyEnum.*;
  * </pre>
  */
 public class CertificateList extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum CertificateListField implements EnumType {
         TBS_CERT_LIST,
         SIGNATURE_ALGORITHMS,
         SIGNATURE_VALUE;
@@ -55,9 +53,9 @@ public class CertificateList extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(TBS_CERT_LIST, TBSCertList.class),
-        new Asn1FieldInfo(SIGNATURE_ALGORITHMS, AlgorithmIdentifier.class),
-        new Asn1FieldInfo(SIGNATURE_VALUE, Asn1BitString.class)
+        new Asn1FieldInfo(CertificateListField.TBS_CERT_LIST, TBSCertList.class),
+        new Asn1FieldInfo(CertificateListField.SIGNATURE_ALGORITHMS, AlgorithmIdentifier.class),
+        new Asn1FieldInfo(CertificateListField.SIGNATURE_VALUE, Asn1BitString.class)
     };
 
     public CertificateList() {
@@ -65,26 +63,26 @@ public class CertificateList extends Asn1SequenceType {
     }
 
     public TBSCertList getTBSCertList() {
-        return getFieldAs(TBS_CERT_LIST, TBSCertList.class);
+        return getFieldAs(CertificateListField.TBS_CERT_LIST, TBSCertList.class);
     }
 
     public void setTBSCertList(TBSCertList tbsCertList) {
-        setFieldAs(TBS_CERT_LIST, tbsCertList);
+        setFieldAs(CertificateListField.TBS_CERT_LIST, tbsCertList);
     }
 
     public AlgorithmIdentifier getSignatureAlgorithm() {
-        return getFieldAs(SIGNATURE_ALGORITHMS, AlgorithmIdentifier.class);
+        return getFieldAs(CertificateListField.SIGNATURE_ALGORITHMS, AlgorithmIdentifier.class);
     }
 
     public void setSignatureAlgorithms(AlgorithmIdentifier signatureAlgorithms) {
-        setFieldAs(SIGNATURE_ALGORITHMS, signatureAlgorithms);
+        setFieldAs(CertificateListField.SIGNATURE_ALGORITHMS, signatureAlgorithms);
     }
 
     public Asn1BitString getSignature() {
-        return getFieldAs(SIGNATURE_VALUE, Asn1BitString.class);
+        return getFieldAs(CertificateListField.SIGNATURE_VALUE, Asn1BitString.class);
     }
 
     public void setSignatureValue(Asn1BitString signatureValue) {
-        setFieldAs(SIGNATURE_VALUE, signatureValue);
+        setFieldAs(CertificateListField.SIGNATURE_VALUE, signatureValue);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificatePair.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificatePair.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificatePair.java
index 749fa61..ae2edd6 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificatePair.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/CertificatePair.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.ExplicitField;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.CertificatePair.MyEnum.*;
-
 /**
  *
  * <pre>
@@ -37,7 +35,7 @@ import static org.apache.kerby.x509.type.CertificatePair.MyEnum.*;
  * </pre>
  */
 public class CertificatePair extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum CertificatePairField implements EnumType {
         FORWARD,
         REVERSE;
 
@@ -53,8 +51,8 @@ public class CertificatePair extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new ExplicitField(FORWARD, Certificate.class),
-        new ExplicitField(REVERSE, Certificate.class)
+        new ExplicitField(CertificatePairField.FORWARD, Certificate.class),
+        new ExplicitField(CertificatePairField.REVERSE, Certificate.class)
     };
 
     public CertificatePair() {
@@ -62,18 +60,18 @@ public class CertificatePair extends Asn1SequenceType {
     }
 
     public Certificate getForward() {
-        return getFieldAs(FORWARD, Certificate.class);
+        return getFieldAs(CertificatePairField.FORWARD, Certificate.class);
     }
 
     public void setForward(Certificate forward) {
-        setFieldAs(FORWARD, forward);
+        setFieldAs(CertificatePairField.FORWARD, forward);
     }
 
     public Certificate getReverse() {
-        return getFieldAs(REVERSE, Certificate.class);
+        return getFieldAs(CertificatePairField.REVERSE, Certificate.class);
     }
 
     public void setReverse(Certificate reverse) {
-        setFieldAs(REVERSE, reverse);
+        setFieldAs(CertificatePairField.REVERSE, reverse);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DSAParameter.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DSAParameter.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DSAParameter.java
index fd85108..76e1e9c 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DSAParameter.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DSAParameter.java
@@ -26,10 +26,8 @@ import org.apache.kerby.asn1.type.Asn1SequenceType;
 
 import java.math.BigInteger;
 
-import static org.apache.kerby.x509.type.DSAParameter.MyEnum.*;
-
 public class DSAParameter extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum DSAParameterField implements EnumType {
         P,
         Q,
         G;
@@ -46,9 +44,9 @@ public class DSAParameter extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(P, Asn1Integer.class),
-        new Asn1FieldInfo(Q, Asn1Integer.class),
-        new Asn1FieldInfo(G, Asn1Integer.class)
+        new Asn1FieldInfo(DSAParameterField.P, Asn1Integer.class),
+        new Asn1FieldInfo(DSAParameterField.Q, Asn1Integer.class),
+        new Asn1FieldInfo(DSAParameterField.G, Asn1Integer.class)
     };
 
     public DSAParameter() {
@@ -56,26 +54,26 @@ public class DSAParameter extends Asn1SequenceType {
     }
 
     public BigInteger getP() {
-        return getFieldAs(P, Asn1Integer.class).getValue();
+        return getFieldAs(DSAParameterField.P, Asn1Integer.class).getValue();
     }
 
     public void setP(BigInteger p) {
-        setFieldAs(P, new Asn1Integer(p));
+        setFieldAs(DSAParameterField.P, new Asn1Integer(p));
     }
 
     public BigInteger getQ() {
-        return getFieldAs(Q, Asn1Integer.class).getValue();
+        return getFieldAs(DSAParameterField.Q, Asn1Integer.class).getValue();
     }
 
     public void setQ(BigInteger q) {
-        setFieldAs(Q, new Asn1Integer(q));
+        setFieldAs(DSAParameterField.Q, new Asn1Integer(q));
     }
 
     public BigInteger getG() {
-        return getFieldAs(G, Asn1Integer.class).getValue();
+        return getFieldAs(DSAParameterField.G, Asn1Integer.class).getValue();
     }
 
     public void setG(BigInteger g) {
-        setFieldAs(G, new Asn1Integer(g));
+        setFieldAs(DSAParameterField.G, new Asn1Integer(g));
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DhParameter.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DhParameter.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DhParameter.java
index af319ce..68f823f 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DhParameter.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DhParameter.java
@@ -7,10 +7,8 @@ import org.apache.kerby.asn1.type.Asn1SequenceType;
 
 import java.math.BigInteger;
 
-import static org.apache.kerby.x509.type.DhParameter.MyEnum.*;
-
 public class DhParameter extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum DhParameterField implements EnumType {
         P,
         G,
         Q;
@@ -27,9 +25,9 @@ public class DhParameter extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-            new Asn1FieldInfo(P, Asn1Integer.class),
-            new Asn1FieldInfo(G, Asn1Integer.class),
-            new Asn1FieldInfo(Q, Asn1Integer.class),
+            new Asn1FieldInfo(DhParameterField.P, Asn1Integer.class),
+            new Asn1FieldInfo(DhParameterField.G, Asn1Integer.class),
+            new Asn1FieldInfo(DhParameterField.Q, Asn1Integer.class),
     };
 
     public DhParameter() {
@@ -37,29 +35,29 @@ public class DhParameter extends Asn1SequenceType {
     }
 
     public void setP(BigInteger p) {
-        setFieldAsInt(P, p);
+        setFieldAsInt(DhParameterField.P, p);
     }
 
     public BigInteger getP() {
-        Asn1Integer p = getFieldAs(P, Asn1Integer.class);
+        Asn1Integer p = getFieldAs(DhParameterField.P, Asn1Integer.class);
         return p.getValue();
     }
 
     public void setG(BigInteger g) {
-        setFieldAsInt(G, g);
+        setFieldAsInt(DhParameterField.G, g);
     }
 
     public BigInteger getG() {
-        Asn1Integer g = getFieldAs(G, Asn1Integer.class);
+        Asn1Integer g = getFieldAs(DhParameterField.G, Asn1Integer.class);
         return g.getValue();
     }
 
     public void setQ(BigInteger q) {
-        setFieldAsInt(Q, q);
+        setFieldAsInt(DhParameterField.Q, q);
     }
 
     public BigInteger getQ() {
-        Asn1Integer q = getFieldAs(Q, Asn1Integer.class);
+        Asn1Integer q = getFieldAs(DhParameterField.Q, Asn1Integer.class);
         return q.getValue();
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DigestInfo.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DigestInfo.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DigestInfo.java
index 809043f..6e845ad 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DigestInfo.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DigestInfo.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.type.Asn1OctetString;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.DigestInfo.MyEnum.*;
-
 /**
  * <pre>
  * DigestInfo::=SEQUENCE{
@@ -35,7 +33,7 @@ import static org.apache.kerby.x509.type.DigestInfo.MyEnum.*;
  * </pre>
  */
 public class DigestInfo extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum DigestInfoField implements EnumType {
         DIGEST_ALGORITHM,
         DIGEST;
 
@@ -51,8 +49,8 @@ public class DigestInfo extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(DIGEST_ALGORITHM, AlgorithmIdentifier.class),
-        new Asn1FieldInfo(DIGEST, Asn1OctetString.class)
+        new Asn1FieldInfo(DigestInfoField.DIGEST_ALGORITHM, AlgorithmIdentifier.class),
+        new Asn1FieldInfo(DigestInfoField.DIGEST, Asn1OctetString.class)
     };
 
     public DigestInfo() {
@@ -60,18 +58,18 @@ public class DigestInfo extends Asn1SequenceType {
     }
 
     public AlgorithmIdentifier getAlgorithmId() {
-        return getFieldAs(DIGEST_ALGORITHM, AlgorithmIdentifier.class);
+        return getFieldAs(DigestInfoField.DIGEST_ALGORITHM, AlgorithmIdentifier.class);
     }
 
     public void setDigestAlgorithm(AlgorithmIdentifier digestAlgorithm) {
-        setFieldAs(DIGEST_ALGORITHM, digestAlgorithm);
+        setFieldAs(DigestInfoField.DIGEST_ALGORITHM, digestAlgorithm);
     }
 
     public byte[] getDigest() {
-        return getFieldAsOctets(DIGEST);
+        return getFieldAsOctets(DigestInfoField.DIGEST);
     }
 
     public void setDigest(byte[] digest) {
-        setFieldAsOctets(DIGEST, digest);
+        setFieldAsOctets(DigestInfoField.DIGEST, digest);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DirectoryString.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DirectoryString.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DirectoryString.java
index 3689c17..3d654c5 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DirectoryString.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DirectoryString.java
@@ -28,8 +28,6 @@ import org.apache.kerby.asn1.type.Asn1T61String;
 import org.apache.kerby.asn1.type.Asn1UniversalString;
 import org.apache.kerby.asn1.type.Asn1Utf8String;
 
-import static org.apache.kerby.x509.type.DirectoryString.MyEnum.*;
-
 /**
  * <pre>
  *  DirectoryString ::= CHOICE {
@@ -42,7 +40,7 @@ import static org.apache.kerby.x509.type.DirectoryString.MyEnum.*;
  * </pre>
  */
 public class DirectoryString extends Asn1Choice {
-    protected enum MyEnum implements EnumType {
+    protected enum DirectoryStringField implements EnumType {
         TELETEX_STRING,
         PRINTABLE_STRING,
         UNIVERSAL_STRING,
@@ -61,11 +59,11 @@ public class DirectoryString extends Asn1Choice {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{
-            new Asn1FieldInfo(TELETEX_STRING, Asn1T61String.class),
-            new Asn1FieldInfo(PRINTABLE_STRING, Asn1PrintableString.class),
-            new Asn1FieldInfo(UNIVERSAL_STRING, Asn1UniversalString.class),
-            new Asn1FieldInfo(UTF8_STRING, Asn1Utf8String.class),
-            new Asn1FieldInfo(BMP_STRING, Asn1BmpString.class)
+            new Asn1FieldInfo(DirectoryStringField.TELETEX_STRING, Asn1T61String.class),
+            new Asn1FieldInfo(DirectoryStringField.PRINTABLE_STRING, Asn1PrintableString.class),
+            new Asn1FieldInfo(DirectoryStringField.UNIVERSAL_STRING, Asn1UniversalString.class),
+            new Asn1FieldInfo(DirectoryStringField.UTF8_STRING, Asn1Utf8String.class),
+            new Asn1FieldInfo(DirectoryStringField.BMP_STRING, Asn1BmpString.class)
     };
 
     public DirectoryString() {
@@ -73,42 +71,42 @@ public class DirectoryString extends Asn1Choice {
     }
 
     public Asn1T61String getTeletexString() {
-        return getChoiceValueAs(TELETEX_STRING, Asn1T61String.class);
+        return getChoiceValueAs(DirectoryStringField.TELETEX_STRING, Asn1T61String.class);
     }
 
     public void setTeletexString(Asn1T61String teletexString) {
-        setChoiceValue(TELETEX_STRING, teletexString);
+        setChoiceValue(DirectoryStringField.TELETEX_STRING, teletexString);
     }
 
     public Asn1PrintableString getPrintableString() {
-        return getChoiceValueAs(PRINTABLE_STRING, Asn1PrintableString.class);
+        return getChoiceValueAs(DirectoryStringField.PRINTABLE_STRING, Asn1PrintableString.class);
     }
 
     public void setPrintableString(Asn1PrintableString printableString) {
-        setChoiceValue(PRINTABLE_STRING, printableString);
+        setChoiceValue(DirectoryStringField.PRINTABLE_STRING, printableString);
     }
 
     public Asn1UniversalString getUniversalString() {
-        return getChoiceValueAs(UNIVERSAL_STRING, Asn1UniversalString.class);
+        return getChoiceValueAs(DirectoryStringField.UNIVERSAL_STRING, Asn1UniversalString.class);
     }
 
     public void setUniversalString(Asn1UniversalString universalString) {
-        setChoiceValue(UNIVERSAL_STRING, universalString);
+        setChoiceValue(DirectoryStringField.UNIVERSAL_STRING, universalString);
     }
 
     public Asn1Utf8String getUtf8String() {
-        return getChoiceValueAs(UTF8_STRING, Asn1Utf8String.class);
+        return getChoiceValueAs(DirectoryStringField.UTF8_STRING, Asn1Utf8String.class);
     }
 
     public void setUtf8String(Asn1Utf8String utf8String) {
-        setChoiceValue(UTF8_STRING, utf8String);
+        setChoiceValue(DirectoryStringField.UTF8_STRING, utf8String);
     }
 
     public Asn1BmpString getBmpString() {
-        return getChoiceValueAs(BMP_STRING, Asn1BmpString.class);
+        return getChoiceValueAs(DirectoryStringField.BMP_STRING, Asn1BmpString.class);
     }
 
     public void setBmpString(Asn1BmpString bmpString) {
-        setChoiceValue(BMP_STRING, bmpString);
+        setChoiceValue(DirectoryStringField.BMP_STRING, bmpString);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DisplayText.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DisplayText.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DisplayText.java
index 091a28b..427748e 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DisplayText.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DisplayText.java
@@ -27,8 +27,6 @@ import org.apache.kerby.asn1.type.Asn1IA5String;
 import org.apache.kerby.asn1.type.Asn1Utf8String;
 import org.apache.kerby.asn1.type.Asn1VisibleString;
 
-import static org.apache.kerby.x509.type.DisplayText.MyEnum.*;
-
 /**
  * <pre>
  * DisplayText ::= CHOICE {
@@ -40,7 +38,7 @@ import static org.apache.kerby.x509.type.DisplayText.MyEnum.*;
  * </pre>
  */
 public class DisplayText extends Asn1Choice {
-   protected enum MyEnum implements EnumType {
+   protected enum DisplayTextField implements EnumType {
       IA5_STRING,
       VISIBLE_STRING,
       BMP_STRING,
@@ -58,10 +56,10 @@ public class DisplayText extends Asn1Choice {
    }
 
    static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{
-           new Asn1FieldInfo(IA5_STRING, Asn1IA5String.class),
-           new Asn1FieldInfo(VISIBLE_STRING, Asn1VisibleString.class),
-           new Asn1FieldInfo(BMP_STRING, Asn1BmpString.class),
-           new Asn1FieldInfo(UTF8_STRING, Asn1BmpString.class)
+           new Asn1FieldInfo(DisplayTextField.IA5_STRING, Asn1IA5String.class),
+           new Asn1FieldInfo(DisplayTextField.VISIBLE_STRING, Asn1VisibleString.class),
+           new Asn1FieldInfo(DisplayTextField.BMP_STRING, Asn1BmpString.class),
+           new Asn1FieldInfo(DisplayTextField.UTF8_STRING, Asn1BmpString.class)
    };
 
    public DisplayText() {
@@ -69,34 +67,34 @@ public class DisplayText extends Asn1Choice {
    }
 
    public Asn1IA5String getIA5String() {
-      return getChoiceValueAs(IA5_STRING, Asn1IA5String.class);
+      return getChoiceValueAs(DisplayTextField.IA5_STRING, Asn1IA5String.class);
    }
 
    public void setIA5String(Asn1IA5String ia5String) {
-      setChoiceValue(IA5_STRING, ia5String);
+      setChoiceValue(DisplayTextField.IA5_STRING, ia5String);
    }
 
    public Asn1VisibleString getVisibleString() {
-      return getChoiceValueAs(VISIBLE_STRING, Asn1VisibleString.class);
+      return getChoiceValueAs(DisplayTextField.VISIBLE_STRING, Asn1VisibleString.class);
    }
 
    public void setVisibleString(Asn1VisibleString visibleString) {
-      setChoiceValue(VISIBLE_STRING, visibleString);
+      setChoiceValue(DisplayTextField.VISIBLE_STRING, visibleString);
    }
 
    public Asn1BmpString getBmpString() {
-      return getChoiceValueAs(BMP_STRING, Asn1BmpString.class);
+      return getChoiceValueAs(DisplayTextField.BMP_STRING, Asn1BmpString.class);
    }
 
    public void setBmpString(Asn1BmpString bmpString) {
-      setChoiceValue(BMP_STRING, bmpString);
+      setChoiceValue(DisplayTextField.BMP_STRING, bmpString);
    }
 
    public Asn1Utf8String getUtf8String() {
-      return getChoiceValueAs(UTF8_STRING, Asn1Utf8String.class);
+      return getChoiceValueAs(DisplayTextField.UTF8_STRING, Asn1Utf8String.class);
    }
 
    public void setUtf8String(Asn1Utf8String utf8String) {
-      setChoiceValue(UTF8_STRING, utf8String);
+      setChoiceValue(DisplayTextField.UTF8_STRING, utf8String);
    }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPoint.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPoint.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPoint.java
index d971381..acc7c4c 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPoint.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPoint.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.ExplicitField;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.DistributionPoint.MyEnum.*;
-
 /**
  *
  * <pre>
@@ -37,7 +35,7 @@ import static org.apache.kerby.x509.type.DistributionPoint.MyEnum.*;
  * </pre>
  */
 public class DistributionPoint extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum DistributionPointField implements EnumType {
         DISTRIBUTION_POINT,
         REASONS,
         CRL_ISSUER;
@@ -54,9 +52,9 @@ public class DistributionPoint extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new ExplicitField(DISTRIBUTION_POINT, DistributionPointName.class),
-        new ExplicitField(REASONS, ReasonFlags.class),
-        new ExplicitField(CRL_ISSUER, GeneralNames.class)
+        new ExplicitField(DistributionPointField.DISTRIBUTION_POINT, DistributionPointName.class),
+        new ExplicitField(DistributionPointField.REASONS, ReasonFlags.class),
+        new ExplicitField(DistributionPointField.CRL_ISSUER, GeneralNames.class)
     };
 
     public DistributionPoint() {
@@ -64,26 +62,26 @@ public class DistributionPoint extends Asn1SequenceType {
     }
 
     public DistributionPointName getDistributionPoint() {
-        return getFieldAs(DISTRIBUTION_POINT, DistributionPointName.class);
+        return getFieldAs(DistributionPointField.DISTRIBUTION_POINT, DistributionPointName.class);
     }
 
     public void setDistributionPoint(DistributionPointName distributionPoint) {
-        setFieldAs(DISTRIBUTION_POINT, distributionPoint);
+        setFieldAs(DistributionPointField.DISTRIBUTION_POINT, distributionPoint);
     }
 
     public ReasonFlags getReasons() {
-        return getFieldAs(REASONS, ReasonFlags.class);
+        return getFieldAs(DistributionPointField.REASONS, ReasonFlags.class);
     }
 
     public void setReasons(ReasonFlags reasons) {
-        setFieldAs(REASONS, reasons);
+        setFieldAs(DistributionPointField.REASONS, reasons);
     }
 
     public GeneralNames getCRLIssuer() {
-        return getFieldAs(CRL_ISSUER, GeneralNames.class);
+        return getFieldAs(DistributionPointField.CRL_ISSUER, GeneralNames.class);
     }
 
     public void setCRLIssuer(GeneralNames crlIssuer) {
-        setFieldAs(CRL_ISSUER, crlIssuer);
+        setFieldAs(DistributionPointField.CRL_ISSUER, crlIssuer);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPointName.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPointName.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPointName.java
index 2fd050c..c7994ef 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPointName.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/DistributionPointName.java
@@ -25,8 +25,6 @@ import org.apache.kerby.asn1.ExplicitField;
 import org.apache.kerby.asn1.type.Asn1Choice;
 import org.apache.kerby.x500.type.RelativeDistinguishedName;
 
-import static org.apache.kerby.x509.type.DistributionPointName.MyEnum.*;
-
 /**
  *
  * <pre>
@@ -37,7 +35,7 @@ import static org.apache.kerby.x509.type.DistributionPointName.MyEnum.*;
  * </pre>
  */
 public class DistributionPointName extends Asn1Choice {
-    protected enum MyEnum implements EnumType {
+    protected enum DPNameField implements EnumType {
         FULL_NAME,
         NAME_RELATIVE_TO_CRL_ISSUER;
 
@@ -53,8 +51,8 @@ public class DistributionPointName extends Asn1Choice {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new ExplicitField(FULL_NAME, GeneralNames.class),
-        new ExplicitField(NAME_RELATIVE_TO_CRL_ISSUER, RelativeDistinguishedName.class)
+        new ExplicitField(DPNameField.FULL_NAME, GeneralNames.class),
+        new ExplicitField(DPNameField.NAME_RELATIVE_TO_CRL_ISSUER, RelativeDistinguishedName.class)
     };
 
     public DistributionPointName() {
@@ -62,18 +60,18 @@ public class DistributionPointName extends Asn1Choice {
     }
 
     public GeneralNames getFullName() {
-        return getChoiceValueAs(FULL_NAME, GeneralNames.class);
+        return getChoiceValueAs(DPNameField.FULL_NAME, GeneralNames.class);
     }
 
     public void setFullName(GeneralNames fullName) {
-        setChoiceValue(FULL_NAME, fullName);
+        setChoiceValue(DPNameField.FULL_NAME, fullName);
     }
 
     public RelativeDistinguishedName getNameRelativeToCRLIssuer() {
-        return getChoiceValueAs(NAME_RELATIVE_TO_CRL_ISSUER, RelativeDistinguishedName.class);
+        return getChoiceValueAs(DPNameField.NAME_RELATIVE_TO_CRL_ISSUER, RelativeDistinguishedName.class);
     }
 
     public void setNameRelativeToCrlIssuer(RelativeDistinguishedName nameRelativeToCrlIssuer) {
-        setChoiceValue(NAME_RELATIVE_TO_CRL_ISSUER, nameRelativeToCrlIssuer);
+        setChoiceValue(DPNameField.NAME_RELATIVE_TO_CRL_ISSUER, nameRelativeToCrlIssuer);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/EDIPartyName.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/EDIPartyName.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/EDIPartyName.java
index bca0e6d..b064757 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/EDIPartyName.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/EDIPartyName.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.ExplicitField;
 import org.apache.kerby.asn1.type.Asn1Choice;
 
-import static org.apache.kerby.x509.type.EDIPartyName.MyEnum.*;
-
 /**
  * <pre>
  * EDIPartyName ::= SEQUENCE {
@@ -35,7 +33,7 @@ import static org.apache.kerby.x509.type.EDIPartyName.MyEnum.*;
  * </pre>
  */
 public class EDIPartyName extends Asn1Choice {
-    protected enum MyEnum implements EnumType {
+    protected enum EDIPartyNameField implements EnumType {
         NAME_ASSIGNER,
         PARTY_NAME;
 
@@ -51,8 +49,8 @@ public class EDIPartyName extends Asn1Choice {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[]{
-            new ExplicitField(NAME_ASSIGNER, DirectoryString.class),
-            new ExplicitField(PARTY_NAME, DirectoryString.class)
+            new ExplicitField(EDIPartyNameField.NAME_ASSIGNER, DirectoryString.class),
+            new ExplicitField(EDIPartyNameField.PARTY_NAME, DirectoryString.class)
     };
 
     public EDIPartyName() {
@@ -60,18 +58,18 @@ public class EDIPartyName extends Asn1Choice {
     }
 
     public DirectoryString getNameAssigner() {
-        return getChoiceValueAs(NAME_ASSIGNER, DirectoryString.class);
+        return getChoiceValueAs(EDIPartyNameField.NAME_ASSIGNER, DirectoryString.class);
     }
 
     public void setNameAssigner(DirectoryString nameAssigner) {
-        setChoiceValue(NAME_ASSIGNER, nameAssigner);
+        setChoiceValue(EDIPartyNameField.NAME_ASSIGNER, nameAssigner);
     }
 
     public DirectoryString getPartyName() {
-        return getChoiceValueAs(PARTY_NAME, DirectoryString.class);
+        return getChoiceValueAs(EDIPartyNameField.PARTY_NAME, DirectoryString.class);
     }
 
     public void setPartyName(DirectoryString partyName) {
-        setChoiceValue(PARTY_NAME, partyName);
+        setChoiceValue(EDIPartyNameField.PARTY_NAME, partyName);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Extension.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Extension.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Extension.java
index 5637f50..449e92c 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Extension.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Extension.java
@@ -26,8 +26,6 @@ import org.apache.kerby.asn1.type.Asn1ObjectIdentifier;
 import org.apache.kerby.asn1.type.Asn1OctetString;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.Extension.MyEnum.*;
-
 /**
  * Ref. X.509 V3 extension
  * <pre>
@@ -40,7 +38,7 @@ import static org.apache.kerby.x509.type.Extension.MyEnum.*;
  * </pre>
  */
 public class Extension extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum ExtensionField implements EnumType {
         EXTN_ID,
         CRITICAL,
         EXTN_VALUE;
@@ -59,9 +57,9 @@ public class Extension extends Asn1SequenceType {
     private final boolean critical = false;
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(EXTN_ID, Asn1ObjectIdentifier.class),
-        new Asn1FieldInfo(CRITICAL, Asn1Boolean.class),
-        new Asn1FieldInfo(EXTN_VALUE, Asn1OctetString.class)
+        new Asn1FieldInfo(ExtensionField.EXTN_ID, Asn1ObjectIdentifier.class),
+        new Asn1FieldInfo(ExtensionField.CRITICAL, Asn1Boolean.class),
+        new Asn1FieldInfo(ExtensionField.EXTN_VALUE, Asn1OctetString.class)
     };
 
     public Extension() {
@@ -70,26 +68,26 @@ public class Extension extends Asn1SequenceType {
     }
 
     public Asn1ObjectIdentifier getExtnId() {
-        return getFieldAs(EXTN_ID, Asn1ObjectIdentifier.class);
+        return getFieldAs(ExtensionField.EXTN_ID, Asn1ObjectIdentifier.class);
     }
 
     public void setExtnId(Asn1ObjectIdentifier extnId) {
-        setFieldAs(EXTN_ID, extnId);
+        setFieldAs(ExtensionField.EXTN_ID, extnId);
     }
 
     public boolean getCritical() {
-        return getFieldAs(CRITICAL, Asn1Boolean.class).getValue();
+        return getFieldAs(ExtensionField.CRITICAL, Asn1Boolean.class).getValue();
     }
 
     public void setCritical(boolean critical) {
-        setFieldAs(CRITICAL, new Asn1Boolean(critical));
+        setFieldAs(ExtensionField.CRITICAL, new Asn1Boolean(critical));
     }
 
     public byte[] getExtnValue() {
-        return getFieldAsOctets(EXTN_VALUE);
+        return getFieldAsOctets(ExtensionField.EXTN_VALUE);
     }
 
     public void setExtnValue(byte[] value) {
-        setFieldAsOctets(EXTN_VALUE, value);
+        setFieldAsOctets(ExtensionField.EXTN_VALUE, value);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralName.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralName.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralName.java
index 7f9217a..262897a 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralName.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralName.java
@@ -30,8 +30,6 @@ import org.apache.kerby.asn1.type.Asn1ObjectIdentifier;
 import org.apache.kerby.asn1.type.Asn1OctetString;
 import org.apache.kerby.x500.type.Name;
 
-import static org.apache.kerby.x509.type.GeneralName.MyEnum.*;
-
 /**
  *
  * <pre>
@@ -49,7 +47,7 @@ import static org.apache.kerby.x509.type.GeneralName.MyEnum.*;
  * </pre>
  */
 public class GeneralName extends Asn1Choice {
-    protected enum MyEnum implements EnumType {
+    protected enum GeneralNameField implements EnumType {
         OTHER_NAME,
         RFC822_NAME,
         DNS_NAME,
@@ -72,16 +70,16 @@ public class GeneralName extends Asn1Choice {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new ImplicitField(OTHER_NAME, OtherName.class),
-        new ImplicitField(RFC822_NAME, Asn1IA5String.class),
-        new ImplicitField(DNS_NAME, Asn1IA5String.class),
+        new ImplicitField(GeneralNameField.OTHER_NAME, OtherName.class),
+        new ImplicitField(GeneralNameField.RFC822_NAME, Asn1IA5String.class),
+        new ImplicitField(GeneralNameField.DNS_NAME, Asn1IA5String.class),
         // ORAddress is to be defined.
-        new ImplicitField(X400_ADDRESS, Asn1Any.class),
-        new ExplicitField(DIRECTORY_NAME, Name.class),
-        new ImplicitField(EDI_PARTY_NAME, EDIPartyName.class),
-        new ImplicitField(UNIFORM_RESOURCE_IDENTIFIER, Asn1IA5String.class),
-        new ImplicitField(IP_ADDRESS, Asn1OctetString.class),
-        new ImplicitField(REGISTERED_ID, Asn1ObjectIdentifier.class)
+        new ImplicitField(GeneralNameField.X400_ADDRESS, Asn1Any.class),
+        new ExplicitField(GeneralNameField.DIRECTORY_NAME, Name.class),
+        new ImplicitField(GeneralNameField.EDI_PARTY_NAME, EDIPartyName.class),
+        new ImplicitField(GeneralNameField.UNIFORM_RESOURCE_IDENTIFIER, Asn1IA5String.class),
+        new ImplicitField(GeneralNameField.IP_ADDRESS, Asn1OctetString.class),
+        new ImplicitField(GeneralNameField.REGISTERED_ID, Asn1ObjectIdentifier.class)
     };
 
     public GeneralName() {
@@ -89,74 +87,74 @@ public class GeneralName extends Asn1Choice {
     }
 
     public OtherName getOtherName() {
-        return getChoiceValueAs(OTHER_NAME, OtherName.class);
+        return getChoiceValueAs(GeneralNameField.OTHER_NAME, OtherName.class);
     }
 
     public void setOtherName(OtherName otherName) {
-        setChoiceValue(OTHER_NAME, otherName);
+        setChoiceValue(GeneralNameField.OTHER_NAME, otherName);
     }
 
     public Asn1IA5String getRfc822Name() {
-        return getChoiceValueAs(RFC822_NAME, Asn1IA5String.class);
+        return getChoiceValueAs(GeneralNameField.RFC822_NAME, Asn1IA5String.class);
     }
 
     public void setRfc822Name(Asn1IA5String rfc822Name) {
-        setChoiceValue(RFC822_NAME, rfc822Name);
+        setChoiceValue(GeneralNameField.RFC822_NAME, rfc822Name);
     }
 
     public Asn1IA5String getDNSName() {
-        return getChoiceValueAs(DNS_NAME, Asn1IA5String.class);
+        return getChoiceValueAs(GeneralNameField.DNS_NAME, Asn1IA5String.class);
     }
 
     public void setDNSName(Asn1IA5String dnsName) {
-        setChoiceValue(DNS_NAME, dnsName);
+        setChoiceValue(GeneralNameField.DNS_NAME, dnsName);
     }
 
     public Asn1Any getX400Address() {
-        return getChoiceValueAs(X400_ADDRESS, Asn1Any.class);
+        return getChoiceValueAs(GeneralNameField.X400_ADDRESS, Asn1Any.class);
     }
 
     public void setX400Address(Asn1Any x400Address) {
-        setChoiceValue(X400_ADDRESS, x400Address);
+        setChoiceValue(GeneralNameField.X400_ADDRESS, x400Address);
     }
 
     public Name getDirectoryName() {
-        return getChoiceValueAs(DIRECTORY_NAME, Name.class);
+        return getChoiceValueAs(GeneralNameField.DIRECTORY_NAME, Name.class);
     }
 
     public void setDirectoryName(Name directoryName) {
-        setChoiceValue(DIRECTORY_NAME, directoryName);
+        setChoiceValue(GeneralNameField.DIRECTORY_NAME, directoryName);
     }
 
     public EDIPartyName getEdiPartyName() {
-        return getChoiceValueAs(EDI_PARTY_NAME, EDIPartyName.class);
+        return getChoiceValueAs(GeneralNameField.EDI_PARTY_NAME, EDIPartyName.class);
     }
 
     public void setEdiPartyName(EDIPartyName ediPartyName) {
-        setChoiceValue(EDI_PARTY_NAME, ediPartyName);
+        setChoiceValue(GeneralNameField.EDI_PARTY_NAME, ediPartyName);
     }
 
     public Asn1IA5String getUniformResourceIdentifier() {
-        return getChoiceValueAs(UNIFORM_RESOURCE_IDENTIFIER, Asn1IA5String.class);
+        return getChoiceValueAs(GeneralNameField.UNIFORM_RESOURCE_IDENTIFIER, Asn1IA5String.class);
     }
 
     public void setUniformResourceIdentifier(Asn1IA5String uniformResourceIdentifier) {
-        setChoiceValue(UNIFORM_RESOURCE_IDENTIFIER, uniformResourceIdentifier);
+        setChoiceValue(GeneralNameField.UNIFORM_RESOURCE_IDENTIFIER, uniformResourceIdentifier);
     }
 
     public byte[] getIPAddress() {
-        return getChoiceValueAsOctets(IP_ADDRESS);
+        return getChoiceValueAsOctets(GeneralNameField.IP_ADDRESS);
     }
 
     public void setIpAddress(byte[] ipAddress) {
-        setChoiceValueAsOctets(IP_ADDRESS, ipAddress);
+        setChoiceValueAsOctets(GeneralNameField.IP_ADDRESS, ipAddress);
     }
 
     public Asn1ObjectIdentifier getRegisteredID() {
-        return getChoiceValueAs(REGISTERED_ID, Asn1ObjectIdentifier.class);
+        return getChoiceValueAs(GeneralNameField.REGISTERED_ID, Asn1ObjectIdentifier.class);
     }
 
     public void setRegisteredID(Asn1ObjectIdentifier registeredID) {
-        setChoiceValue(REGISTERED_ID, registeredID);
+        setChoiceValue(GeneralNameField.REGISTERED_ID, registeredID);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralSubtree.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralSubtree.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralSubtree.java
index 4c4a211..15e72e6 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralSubtree.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/GeneralSubtree.java
@@ -25,8 +25,6 @@ import org.apache.kerby.asn1.ExplicitField;
 import org.apache.kerby.asn1.type.Asn1Integer;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.GeneralSubtree.MyEnum.*;
-
 /**
  *
  * Ref. RFC 3280.
@@ -40,7 +38,7 @@ import static org.apache.kerby.x509.type.GeneralSubtree.MyEnum.*;
  * 
  */
 public class GeneralSubtree extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum GeneralSubtreeField implements EnumType {
         BASE,
         MINIMUM,
         MAXMUM;
@@ -57,9 +55,9 @@ public class GeneralSubtree extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(BASE, GeneralName.class),
-        new ExplicitField(MINIMUM, 0, Asn1Integer.class),
-        new ExplicitField(MAXMUM, 1, Asn1Integer.class)
+        new Asn1FieldInfo(GeneralSubtreeField.BASE, GeneralName.class),
+        new ExplicitField(GeneralSubtreeField.MINIMUM, 0, Asn1Integer.class),
+        new ExplicitField(GeneralSubtreeField.MAXMUM, 1, Asn1Integer.class)
     };
 
     public GeneralSubtree() {
@@ -67,26 +65,26 @@ public class GeneralSubtree extends Asn1SequenceType {
     }
 
     public GeneralName getBase() {
-        return getFieldAs(BASE, GeneralName.class);
+        return getFieldAs(GeneralSubtreeField.BASE, GeneralName.class);
     }
 
     public void setBase(GeneralName base) {
-        setFieldAs(BASE, base);
+        setFieldAs(GeneralSubtreeField.BASE, base);
     }
 
     public int getMinimum() {
-        return getFieldAsInteger(MINIMUM);
+        return getFieldAsInteger(GeneralSubtreeField.MINIMUM);
     }
 
     public void setMinimum(int minimum) {
-        setFieldAsInt(MINIMUM, minimum);
+        setFieldAsInt(GeneralSubtreeField.MINIMUM, minimum);
     }
 
     public int getMaximum() {
-        return getFieldAsInteger(MAXMUM);
+        return getFieldAsInteger(GeneralSubtreeField.MAXMUM);
     }
 
     public void setMaxmum(int maxmum) {
-        setFieldAsInt(MAXMUM, maxmum);
+        setFieldAsInt(GeneralSubtreeField.MAXMUM, maxmum);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Holder.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Holder.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Holder.java
index 9282575..f3a70ae 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Holder.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/Holder.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.ExplicitField;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.Holder.MyEnum.*;
-
 /**
  * <pre>
  *            Holder ::= SEQUENCE {
@@ -41,7 +39,7 @@ import static org.apache.kerby.x509.type.Holder.MyEnum.*;
  * </pre>
  */
 public class Holder extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum HolderField implements EnumType {
         BASE_CERTIFICATE_ID,
         ENTITY_NAME,
         OBJECT_DIGEST_INFO;
@@ -58,9 +56,9 @@ public class Holder extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new ExplicitField(BASE_CERTIFICATE_ID, IssuerSerial.class),
-        new ExplicitField(ENTITY_NAME, GeneralNames.class),
-        new ExplicitField(OBJECT_DIGEST_INFO, ObjectDigestInfo.class)
+        new ExplicitField(HolderField.BASE_CERTIFICATE_ID, IssuerSerial.class),
+        new ExplicitField(HolderField.ENTITY_NAME, GeneralNames.class),
+        new ExplicitField(HolderField.OBJECT_DIGEST_INFO, ObjectDigestInfo.class)
     };
 
     public Holder() {
@@ -68,26 +66,26 @@ public class Holder extends Asn1SequenceType {
     }
 
     public IssuerSerial getBaseCertificateID() {
-        return getFieldAs(BASE_CERTIFICATE_ID, IssuerSerial.class);
+        return getFieldAs(HolderField.BASE_CERTIFICATE_ID, IssuerSerial.class);
     }
 
     public void setBaseCertificateId(IssuerSerial baseCertificateId) {
-        setFieldAs(BASE_CERTIFICATE_ID, baseCertificateId);
+        setFieldAs(HolderField.BASE_CERTIFICATE_ID, baseCertificateId);
     }
 
     public GeneralNames getEntityName() {
-        return getFieldAs(ENTITY_NAME, GeneralNames.class);
+        return getFieldAs(HolderField.ENTITY_NAME, GeneralNames.class);
     }
 
     public void setEntityName(GeneralNames entityName) {
-        setFieldAs(ENTITY_NAME, entityName);
+        setFieldAs(HolderField.ENTITY_NAME, entityName);
     }
 
     public ObjectDigestInfo getObjectDigestInfo() {
-        return getFieldAs(OBJECT_DIGEST_INFO, ObjectDigestInfo.class);
+        return getFieldAs(HolderField.OBJECT_DIGEST_INFO, ObjectDigestInfo.class);
     }
 
     public void setObjectDigestInfo(ObjectDigestInfo objectDigestInfo) {
-        setFieldAs(OBJECT_DIGEST_INFO, objectDigestInfo);
+        setFieldAs(HolderField.OBJECT_DIGEST_INFO, objectDigestInfo);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntax.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntax.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntax.java
index 2633c8b..2dfd598 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntax.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntax.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.ExplicitField;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.IetfAttrSyntax.MyEnum.*;
-
 /**
  * Ref. RFC3281
  * <pre>
@@ -42,7 +40,7 @@ import static org.apache.kerby.x509.type.IetfAttrSyntax.MyEnum.*;
  * </pre>
  */
 public class IetfAttrSyntax extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum IetfAttrSyntaxField implements EnumType {
         POLICY_AUTHORITY,
         VALUES;
 
@@ -58,8 +56,8 @@ public class IetfAttrSyntax extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new ExplicitField(POLICY_AUTHORITY, GeneralNames.class),
-        new Asn1FieldInfo(VALUES, IetfAttrSyntaxChoices.class)
+        new ExplicitField(IetfAttrSyntaxField.POLICY_AUTHORITY, GeneralNames.class),
+        new Asn1FieldInfo(IetfAttrSyntaxField.VALUES, IetfAttrSyntaxChoices.class)
     };
 
     public IetfAttrSyntax() {
@@ -67,18 +65,18 @@ public class IetfAttrSyntax extends Asn1SequenceType {
     }
 
     public GeneralNames getPolicyAuthority() {
-        return getFieldAs(POLICY_AUTHORITY, GeneralNames.class);
+        return getFieldAs(IetfAttrSyntaxField.POLICY_AUTHORITY, GeneralNames.class);
     }
 
     public void setPolicyAuthority(GeneralNames policyAuthority) {
-        setFieldAs(POLICY_AUTHORITY, policyAuthority);
+        setFieldAs(IetfAttrSyntaxField.POLICY_AUTHORITY, policyAuthority);
     }
 
     public IetfAttrSyntaxChoices getValues() {
-        return getFieldAs(VALUES, IetfAttrSyntaxChoices.class);
+        return getFieldAs(IetfAttrSyntaxField.VALUES, IetfAttrSyntaxChoices.class);
     }
 
     public void setValues(IetfAttrSyntaxChoices values) {
-        setFieldAs(VALUES, values);
+        setFieldAs(IetfAttrSyntaxField.VALUES, values);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntaxChoice.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntaxChoice.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntaxChoice.java
index c0fdb49..c2cb9c2 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntaxChoice.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IetfAttrSyntaxChoice.java
@@ -25,8 +25,6 @@ import org.apache.kerby.asn1.type.Asn1Choice;
 import org.apache.kerby.asn1.type.Asn1ObjectIdentifier;
 import org.apache.kerby.asn1.type.Asn1OctetString;
 
-import static org.apache.kerby.x509.type.IetfAttrSyntaxChoice.MyEnum.*;
-
 /**
  * Ref. RFC3281
  * <pre>
@@ -41,7 +39,7 @@ import static org.apache.kerby.x509.type.IetfAttrSyntaxChoice.MyEnum.*;
  * </pre>
  */
 public class IetfAttrSyntaxChoice extends Asn1Choice {
-    protected enum MyEnum implements EnumType {
+    protected enum IetfAttrSyntaxChoiceField implements EnumType {
         OCTETS,
         OID,
         UTF8;
@@ -58,9 +56,9 @@ public class IetfAttrSyntaxChoice extends Asn1Choice {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(OCTETS, Asn1OctetString.class),
-        new Asn1FieldInfo(OID, Asn1ObjectIdentifier.class),
-        new Asn1FieldInfo(UTF8, Asn1ObjectIdentifier.class)
+        new Asn1FieldInfo(IetfAttrSyntaxChoiceField.OCTETS, Asn1OctetString.class),
+        new Asn1FieldInfo(IetfAttrSyntaxChoiceField.OID, Asn1ObjectIdentifier.class),
+        new Asn1FieldInfo(IetfAttrSyntaxChoiceField.UTF8, Asn1ObjectIdentifier.class)
     };
 
     public IetfAttrSyntaxChoice() {
@@ -68,26 +66,26 @@ public class IetfAttrSyntaxChoice extends Asn1Choice {
     }
 
     public Asn1OctetString getOctets() {
-        return getChoiceValueAs(OCTETS, Asn1OctetString.class);
+        return getChoiceValueAs(IetfAttrSyntaxChoiceField.OCTETS, Asn1OctetString.class);
     }
 
     public void setOctets(Asn1OctetString octets) {
-        setChoiceValue(OCTETS, octets);
+        setChoiceValue(IetfAttrSyntaxChoiceField.OCTETS, octets);
     }
 
     public Asn1ObjectIdentifier getOid() {
-        return getChoiceValueAs(OID, Asn1ObjectIdentifier.class);
+        return getChoiceValueAs(IetfAttrSyntaxChoiceField.OID, Asn1ObjectIdentifier.class);
     }
 
     public void setOid(Asn1ObjectIdentifier oid) {
-        setChoiceValue(OID, oid);
+        setChoiceValue(IetfAttrSyntaxChoiceField.OID, oid);
     }
 
     public Asn1ObjectIdentifier getUtf8() {
-        return getChoiceValueAs(UTF8, Asn1ObjectIdentifier.class);
+        return getChoiceValueAs(IetfAttrSyntaxChoiceField.UTF8, Asn1ObjectIdentifier.class);
     }
 
     public void setUtf8(Asn1ObjectIdentifier utf8) {
-        setChoiceValue(UTF8, utf8);
+        setChoiceValue(IetfAttrSyntaxChoiceField.UTF8, utf8);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c00bbc71/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IssuerSerial.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IssuerSerial.java b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IssuerSerial.java
index 96b76c8..4cb7907 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IssuerSerial.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/IssuerSerial.java
@@ -24,8 +24,6 @@ import org.apache.kerby.asn1.EnumType;
 import org.apache.kerby.asn1.type.Asn1BitString;
 import org.apache.kerby.asn1.type.Asn1SequenceType;
 
-import static org.apache.kerby.x509.type.IssuerSerial.MyEnum.*;
-
 /**
  * <pre>
  *  IssuerSerial  ::=  SEQUENCE {
@@ -36,7 +34,7 @@ import static org.apache.kerby.x509.type.IssuerSerial.MyEnum.*;
  * </pre>
  */
 public class IssuerSerial extends Asn1SequenceType {
-    protected enum MyEnum implements EnumType {
+    protected enum IssuerSerialField implements EnumType {
         ISSUER,
         SERIAL,
         ISSUER_UID;
@@ -53,9 +51,9 @@ public class IssuerSerial extends Asn1SequenceType {
     }
 
     static Asn1FieldInfo[] fieldInfos = new Asn1FieldInfo[] {
-        new Asn1FieldInfo(ISSUER, GeneralNames.class),
-        new Asn1FieldInfo(SERIAL, CertificateSerialNumber.class),
-        new Asn1FieldInfo(ISSUER_UID, Asn1BitString.class)
+        new Asn1FieldInfo(IssuerSerialField.ISSUER, GeneralNames.class),
+        new Asn1FieldInfo(IssuerSerialField.SERIAL, CertificateSerialNumber.class),
+        new Asn1FieldInfo(IssuerSerialField.ISSUER_UID, Asn1BitString.class)
     };
 
     public IssuerSerial() {
@@ -63,26 +61,26 @@ public class IssuerSerial extends Asn1SequenceType {
     }
 
     public GeneralNames getIssuer() {
-        return getFieldAs(ISSUER, GeneralNames.class);
+        return getFieldAs(IssuerSerialField.ISSUER, GeneralNames.class);
     }
 
     public void setIssuer(GeneralNames issuer) {
-        setFieldAs(ISSUER, issuer);
+        setFieldAs(IssuerSerialField.ISSUER, issuer);
     }
 
     public CertificateSerialNumber getSerial() {
-        return getFieldAs(SERIAL, CertificateSerialNumber.class);
+        return getFieldAs(IssuerSerialField.SERIAL, CertificateSerialNumber.class);
     }
 
     public void setSerial(CertificateSerialNumber serial) {
-        setFieldAs(SERIAL, serial);
+        setFieldAs(IssuerSerialField.SERIAL, serial);
     }
 
     public Asn1BitString getIssuerUID() {
-        return getFieldAs(ISSUER_UID, Asn1BitString.class);
+        return getFieldAs(IssuerSerialField.ISSUER_UID, Asn1BitString.class);
     }
 
     public void setIssuerUID(Asn1BitString issuerUID) {
-        setFieldAs(ISSUER_UID, issuerUID);
+        setFieldAs(IssuerSerialField.ISSUER_UID, issuerUID);
     }
 }


Mime
View raw message