directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1068124 [13/19] - in /directory/apacheds/branches/m1/kerberos-codec/src: main/java/org/apache/directory/server/kerberos/shared/crypto/checksum/ main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/ main/java/org/apache/d...
Date Mon, 07 Feb 2011 20:49:13 GMT
Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/KrbCredGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/KrbCredGrammar.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/KrbCredGrammar.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/KrbCredGrammar.java Mon Feb  7 20:49:04 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.krbCred;
 
@@ -34,14 +34,15 @@ import org.apache.directory.shared.kerbe
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * This class implements the KrbCred structure. All the actions are declared
  * in this class. As it is a singleton, these declaration are only done once. If
  * an action is to be added or modified, this is where the work is to be done !
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public final class KrbCredGrammar extends AbstractGrammar
+public final class KrbCredGrammar extends AbstractGrammar<KrbCredContainer>
 {
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( KrbCredGrammar.class );
@@ -50,12 +51,13 @@ public final class KrbCredGrammar extend
     static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
     /** The instance of grammar. KrbCredCredGrammar is a singleton */
-    private static Grammar instance = new KrbCredGrammar();
+    private static Grammar<KrbCredContainer> instance = new KrbCredGrammar();
 
 
     /**
      * Creates a new KrbCredGrammar object.
      */
+    @SuppressWarnings("unchecked")
     private KrbCredGrammar()
     {
         setName( KrbCredGrammar.class.getName() );
@@ -66,55 +68,83 @@ public final class KrbCredGrammar extend
         // ============================================================================================
         // KrbCred
         // ============================================================================================
-        
-        super.transitions[KrbCredStatesEnum.START_STATE.ordinal()][KerberosConstants.KRB_CRED_TAG] = new GrammarTransition(
-            KrbCredStatesEnum.START_STATE, KrbCredStatesEnum.KRB_CRED_TAG_STATE, KerberosConstants.KRB_CRED_TAG,
-            new KrbCredInit());
-        
-        super.transitions[KrbCredStatesEnum.KRB_CRED_TAG_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            KrbCredStatesEnum.KRB_CRED_TAG_STATE, KrbCredStatesEnum.KRB_CRED_SEQ_TAG_STATE, UniversalTag.SEQUENCE.getValue(),
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredStatesEnum.KRB_CRED_SEQ_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_PVNO_TAG] = new GrammarTransition(
-            KrbCredStatesEnum.KRB_CRED_SEQ_TAG_STATE, KrbCredStatesEnum.KRB_CRED_PVNO_TAG_STATE, KerberosConstants.KRB_CRED_PVNO_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredStatesEnum.KRB_CRED_PVNO_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            KrbCredStatesEnum.KRB_CRED_PVNO_TAG_STATE, KrbCredStatesEnum.KRB_CRED_PVNO_STATE, UniversalTag.INTEGER.getValue(),
-            new StorePvno());
-        
-        super.transitions[KrbCredStatesEnum.KRB_CRED_PVNO_STATE.ordinal()][KerberosConstants.KRB_CRED_MSGTYPE_TAG] = new GrammarTransition(
-            KrbCredStatesEnum.KRB_CRED_PVNO_STATE, KrbCredStatesEnum.KRB_CRED_MSGTYPE_TAG_STATE, KerberosConstants.KRB_CRED_MSGTYPE_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredStatesEnum.KRB_CRED_MSGTYPE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            KrbCredStatesEnum.KRB_CRED_MSGTYPE_TAG_STATE, KrbCredStatesEnum.KRB_CRED_MSGTYPE_STATE, UniversalTag.INTEGER.getValue(),
-            new CheckMsgType());
-        
-        super.transitions[KrbCredStatesEnum.KRB_CRED_MSGTYPE_STATE.ordinal()][KerberosConstants.KRB_CRED_TICKETS_TAG] = new GrammarTransition(
-            KrbCredStatesEnum.KRB_CRED_MSGTYPE_STATE, KrbCredStatesEnum.KRB_CRED_TICKETS_TAG_STATE, KerberosConstants.KRB_CRED_TICKETS_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredStatesEnum.KRB_CRED_TICKETS_TAG_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            KrbCredStatesEnum.KRB_CRED_TICKETS_TAG_STATE, KrbCredStatesEnum.KRB_CRED_TICKETS_STATE, UniversalTag.SEQUENCE.getValue(),
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredStatesEnum.KRB_CRED_TICKETS_STATE.ordinal()][KerberosConstants.TICKET_TAG] = new GrammarTransition(
-            KrbCredStatesEnum.KRB_CRED_TICKETS_STATE, KrbCredStatesEnum.KRB_CRED_TICKETS_STATE, KerberosConstants.TICKET_TAG,
-            new StoreTickets());
-        
-        super.transitions[KrbCredStatesEnum.KRB_CRED_TICKETS_STATE.ordinal()][KerberosConstants.KRB_CRED_ENCPART_TAG] = new GrammarTransition(
-            KrbCredStatesEnum.KRB_CRED_TICKETS_STATE, KrbCredStatesEnum.KRB_CRED_ENCPART_TAG_STATE, KerberosConstants.KRB_CRED_ENCPART_TAG,
-            new StoreEncPart());
+
+        super.transitions[KrbCredStatesEnum.START_STATE.ordinal()][KerberosConstants.KRB_CRED_TAG] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.START_STATE, KrbCredStatesEnum.KRB_CRED_TAG_STATE, KerberosConstants.KRB_CRED_TAG,
+                new KrbCredInit() );
+
+        super.transitions[KrbCredStatesEnum.KRB_CRED_TAG_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.KRB_CRED_TAG_STATE,
+                KrbCredStatesEnum.KRB_CRED_SEQ_TAG_STATE,
+                UniversalTag.SEQUENCE.getValue(),
+                new CheckNotNullLength<KrbCredContainer>() );
+
+        super.transitions[KrbCredStatesEnum.KRB_CRED_SEQ_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_PVNO_TAG] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.KRB_CRED_SEQ_TAG_STATE,
+                KrbCredStatesEnum.KRB_CRED_PVNO_TAG_STATE,
+                KerberosConstants.KRB_CRED_PVNO_TAG,
+                new CheckNotNullLength<KrbCredContainer>() );
+
+        super.transitions[KrbCredStatesEnum.KRB_CRED_PVNO_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.KRB_CRED_PVNO_TAG_STATE,
+                KrbCredStatesEnum.KRB_CRED_PVNO_STATE,
+                UniversalTag.INTEGER.getValue(),
+                new StorePvno() );
+
+        super.transitions[KrbCredStatesEnum.KRB_CRED_PVNO_STATE.ordinal()][KerberosConstants.KRB_CRED_MSGTYPE_TAG] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.KRB_CRED_PVNO_STATE,
+                KrbCredStatesEnum.KRB_CRED_MSGTYPE_TAG_STATE,
+                KerberosConstants.KRB_CRED_MSGTYPE_TAG,
+                new CheckNotNullLength<KrbCredContainer>() );
+
+        super.transitions[KrbCredStatesEnum.KRB_CRED_MSGTYPE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.KRB_CRED_MSGTYPE_TAG_STATE,
+                KrbCredStatesEnum.KRB_CRED_MSGTYPE_STATE,
+                UniversalTag.INTEGER.getValue(),
+                new CheckMsgType() );
+
+        super.transitions[KrbCredStatesEnum.KRB_CRED_MSGTYPE_STATE.ordinal()][KerberosConstants.KRB_CRED_TICKETS_TAG] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.KRB_CRED_MSGTYPE_STATE,
+                KrbCredStatesEnum.KRB_CRED_TICKETS_TAG_STATE,
+                KerberosConstants.KRB_CRED_TICKETS_TAG,
+                new CheckNotNullLength<KrbCredContainer>() );
+
+        super.transitions[KrbCredStatesEnum.KRB_CRED_TICKETS_TAG_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.KRB_CRED_TICKETS_TAG_STATE,
+                KrbCredStatesEnum.KRB_CRED_TICKETS_STATE,
+                UniversalTag.SEQUENCE.getValue(),
+                new CheckNotNullLength<KrbCredContainer>() );
+
+        super.transitions[KrbCredStatesEnum.KRB_CRED_TICKETS_STATE.ordinal()][KerberosConstants.TICKET_TAG] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.KRB_CRED_TICKETS_STATE,
+                KrbCredStatesEnum.KRB_CRED_TICKETS_STATE,
+                KerberosConstants.TICKET_TAG,
+                new StoreTickets() );
+
+        super.transitions[KrbCredStatesEnum.KRB_CRED_TICKETS_STATE.ordinal()][KerberosConstants.KRB_CRED_ENCPART_TAG] =
+            new GrammarTransition<KrbCredContainer>(
+                KrbCredStatesEnum.KRB_CRED_TICKETS_STATE,
+                KrbCredStatesEnum.KRB_CRED_ENCPART_TAG_STATE,
+                KerberosConstants.KRB_CRED_ENCPART_TAG,
+                new StoreEncPart() );
     }
 
 
     /**
      * Get the instance of this grammar
-     * 
+     *
      * @return An instance on the KrbCredInfo Grammar
      */
-    public static Grammar getInstance()
+    public static Grammar<KrbCredContainer> getInstance()
     {
         return instance;
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/KrbCredStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/KrbCredStatesEnum.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/KrbCredStatesEnum.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/KrbCredStatesEnum.java Mon Feb  7 20:49:04 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.krbCred;
 
@@ -27,37 +27,37 @@ import org.apache.directory.shared.asn1.
 /**
  * This class store the KrbCred grammar's constants. It is also used for debugging
  * purpose
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum KrbCredStatesEnum implements States
 {
     // Start
     START_STATE,                    // 0
-    
+
     // ----- KRB-ERROR component --------------------------------------
     KRB_CRED_TAG_STATE,             // 1
-    
+
     KRB_CRED_SEQ_TAG_STATE,         // 2
-    
+
     KRB_CRED_PVNO_TAG_STATE,        // 3
     KRB_CRED_PVNO_STATE,            // 4
-    
+
     KRB_CRED_MSGTYPE_TAG_STATE,     // 5
     KRB_CRED_MSGTYPE_STATE,         // 6
 
     KRB_CRED_TICKETS_TAG_STATE,     // 7
     KRB_CRED_TICKETS_STATE,         // 8
-    
+
     KRB_CRED_ENCPART_TAG_STATE,     // 9
 
     // End
     LAST_KRB_CRED_STATE;            // 10
 
-    
+
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar code
      * @return The grammar name
      */
@@ -69,11 +69,11 @@ public enum KrbCredStatesEnum implements
 
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar class
      * @return The grammar name
      */
-    public String getGrammarName( Grammar grammar )
+    public String getGrammarName( Grammar<KrbCredContainer> grammar )
     {
         if ( grammar instanceof KrbCredGrammar )
         {
@@ -88,7 +88,7 @@ public enum KrbCredStatesEnum implements
 
     /**
      * Get the string representing the state
-     * 
+     *
      * @param state The state number
      * @return The String representing the state
      */
@@ -97,7 +97,7 @@ public enum KrbCredStatesEnum implements
         return ( ( state == LAST_KRB_CRED_STATE.ordinal() ) ? "LAST_KRB_CRED_STATE" : name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -105,8 +105,8 @@ public enum KrbCredStatesEnum implements
     {
         return this == LAST_KRB_CRED_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/CheckMsgType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/CheckMsgType.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/CheckMsgType.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/CheckMsgType.java Mon Feb  7 20:49:04 2011
@@ -6,30 +6,31 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.krbCred.actions;
 
 
 import org.apache.directory.shared.kerberos.KerberosMessageType;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadMsgType;
+import org.apache.directory.shared.kerberos.codec.krbCred.KrbCredContainer;
 
 
 /**
  * The action used to check the KRB-CRED msg-type
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CheckMsgType extends AbstractReadMsgType
+public class CheckMsgType extends AbstractReadMsgType<KrbCredContainer>
 {
     /**
      * Instantiates a new CheckMsgType action.

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/KrbCredInit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/KrbCredInit.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/KrbCredInit.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/KrbCredInit.java Mon Feb  7 20:49:04 2011
@@ -6,22 +6,21 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.krbCred.actions;
 
 
 import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.i18n.I18n;
@@ -33,10 +32,10 @@ import org.slf4j.LoggerFactory;
 
 /**
  * The action used to initialize the KrbCred object
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class KrbCredInit extends GrammarAction
+public class KrbCredInit extends GrammarAction<KrbCredContainer>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( KrbCredInit.class );
@@ -57,10 +56,8 @@ public class KrbCredInit extends Grammar
     /**
      * {@inheritDoc}
      */
-    public void action( Asn1Container container ) throws DecoderException
+    public void action( KrbCredContainer krbCredContainer ) throws DecoderException
     {
-        KrbCredContainer krbCredContainer = ( KrbCredContainer ) container;
-
         TLV tlv = krbCredContainer.getCurrentTLV();
 
         // The Length should not be null

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreEncPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreEncPart.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreEncPart.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreEncPart.java Mon Feb  7 20:49:04 2011
@@ -6,21 +6,20 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.krbCred.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadEncryptedPart;
 import org.apache.directory.shared.kerberos.codec.krbCred.KrbCredContainer;
 import org.apache.directory.shared.kerberos.components.EncryptedData;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to read the EncryptedData
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreEncPart extends AbstractReadEncryptedPart
+public class StoreEncPart extends AbstractReadEncryptedPart<KrbCredContainer>
 {
 
     /**
@@ -47,11 +46,10 @@ public class StoreEncPart extends Abstra
      * {@inheritDoc}
      */
     @Override
-    protected void setEncryptedData( EncryptedData encryptedData, Asn1Container container )
+    protected void setEncryptedData( EncryptedData encryptedData, KrbCredContainer krbCredContainer )
     {
-        KrbCredContainer krbCredContainer = ( KrbCredContainer ) container;
         krbCredContainer.getKrbCred().setEncPart( encryptedData );
 
-        container.setGrammarEndAllowed( true );
+        krbCredContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StorePvno.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StorePvno.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StorePvno.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StorePvno.java Mon Feb  7 20:49:04 2011
@@ -6,31 +6,30 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.krbCred.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadPvno;
 import org.apache.directory.shared.kerberos.codec.krbCred.KrbCredContainer;
 
 
 /**
  * The action used to store the PVNO
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StorePvno extends AbstractReadPvno
+public class StorePvno extends AbstractReadPvno<KrbCredContainer>
 {
     /**
      * Instantiates a new StorePvno action.
@@ -45,9 +44,8 @@ public class StorePvno extends AbstractR
      * {@inheritDoc}
      */
     @Override
-    protected void setPvno( int pvno, Asn1Container container )
+    protected void setPvno( int pvno, KrbCredContainer krbCredContainer )
     {
-        KrbCredContainer krbCredContainer = ( KrbCredContainer ) container;
         krbCredContainer.getKrbCred().setProtocolVersionNumber( pvno );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreTickets.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreTickets.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreTickets.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCred/actions/StoreTickets.java Mon Feb  7 20:49:04 2011
@@ -22,7 +22,6 @@ package org.apache.directory.shared.kerb
 
 
 import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -39,7 +38,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreTickets extends GrammarAction
+public class StoreTickets extends GrammarAction<KrbCredContainer>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreTickets.class );
@@ -51,10 +50,8 @@ public class StoreTickets extends Gramma
     /**
      * {@inheritDoc}
      */
-    public void action( Asn1Container container ) throws DecoderException
+    public void action( KrbCredContainer krbCredContainer ) throws DecoderException
     {
-        KrbCredContainer krbCredContainer = ( KrbCredContainer ) container;
-
         TLV tlv = krbCredContainer.getCurrentTLV();
 
         // The Length should not be null
@@ -70,14 +67,14 @@ public class StoreTickets extends Gramma
         Asn1Decoder decoder = new Asn1Decoder();
 
         // Ticket container
-        TicketContainer ticketContainer = new TicketContainer( container.getStream() );
+        TicketContainer ticketContainer = new TicketContainer( krbCredContainer.getStream() );
+
+        krbCredContainer.rewind();
 
-        container.rewind();
-        
         try
         {
             // decode Ticket
-            decoder.decode( container.getStream(), ticketContainer );
+            decoder.decode( krbCredContainer.getStream(), ticketContainer );
         }
         catch ( DecoderException e )
         {
@@ -92,7 +89,7 @@ public class StoreTickets extends Gramma
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
 
         // Update the parent
-        container.updateParent();
+        krbCredContainer.updateParent();
 
         if ( IS_DEBUG )
         {

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java Mon Feb  7 20:49:04 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.krbCredInfo;
 
@@ -46,10 +46,10 @@ import org.slf4j.LoggerFactory;
  * This class implements the KrbCredInfo structure. All the actions are declared
  * in this class. As it is a singleton, these declaration are only done once. If
  * an action is to be added or modified, this is where the work is to be done !
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public final class KrbCredInfoGrammar extends AbstractGrammar
+public final class KrbCredInfoGrammar extends AbstractGrammar<KrbCredInfoContainer>
 {
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( KrbCredInfoGrammar.class );
@@ -58,12 +58,13 @@ public final class KrbCredInfoGrammar ex
     static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
     /** The instance of grammar. KrbCredInfoGrammar is a singleton */
-    private static Grammar instance = new KrbCredInfoGrammar();
+    private static Grammar<KrbCredInfoContainer> instance = new KrbCredInfoGrammar();
 
 
     /**
      * Creates a new KrbCredInfoGrammar object.
      */
+    @SuppressWarnings("unchecked")
     private KrbCredInfoGrammar()
     {
         setName( KrbCredInfoGrammar.class.getName() );
@@ -72,320 +73,455 @@ public final class KrbCredInfoGrammar ex
         super.transitions = new GrammarTransition[KrbCredInfoStatesEnum.LAST_KRB_CRED_INFO_STATE.ordinal()][256];
 
         // ============================================================================================
-        // KrbCredInfo 
+        // KrbCredInfo
         // ============================================================================================
-        
-        super.transitions[KrbCredInfoStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            KrbCredInfoStatesEnum.START_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SEQ_TAG_STATE, UniversalTag.SEQUENCE.getValue(),
-            new KrbCredInfoInit());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SEQ_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_KEY_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_SEQ_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KerberosConstants.KRB_CRED_INFO_KEY_TAG,
-            new StoreKey());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_PREALM_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_PREALM_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, UniversalTag.GENERAL_STRING.getValue(),
-            new StorePRealm());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_PNAME_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_PNAME_TAG,
-            new StorePName());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_FLAGS_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE , KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE .ordinal()][UniversalTag.BIT_STRING.getValue()] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE , KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, UniversalTag.BIT_STRING.getValue(),
-            new StoreFlags());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE  , UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreAuthTime());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE  .ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE  , KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE , UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreStartTime());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE .ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE , KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreEndTime());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE  , UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreRenewtill());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE  .ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE  , KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, UniversalTag.GENERAL_STRING.getValue(),
-            new StoreSRealm());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
-            new StoreSName());
-        
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-            KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-            new StoreCaddr());
+
+        super.transitions[KrbCredInfoStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.START_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SEQ_TAG_STATE,
+                UniversalTag.SEQUENCE.getValue(),
+                new KrbCredInfoInit() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SEQ_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_KEY_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SEQ_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_KEY_TAG,
+                new StoreKey() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_PREALM_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_PREALM_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING
+            .getValue()] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE,
+                UniversalTag.GENERAL_STRING.getValue(),
+                new StorePRealm() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_PNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_PNAME_TAG,
+                new StorePName() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_FLAGS_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE, KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE.ordinal()][UniversalTag.BIT_STRING
+            .getValue()] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE,
+                UniversalTag.BIT_STRING.getValue(),
+                new StoreFlags() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME
+            .getValue()] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreAuthTime() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME
+            .getValue()] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreStartTime() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME
+            .getValue()] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreEndTime() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME
+            .getValue()] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreRenewtill() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING
+            .getValue()] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE,
+                UniversalTag.GENERAL_STRING.getValue(),
+                new StoreSRealm() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+                new StoreSName() );
+
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
 
         // ---------------------------- OPTIONAL transitions ------------------------
-        
+
         // transition from key to pname
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_PNAME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_PNAME_TAG,
-         new StorePName());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_PNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_PNAME_TAG,
+                new StorePName() );
 
         // transition from key to flags
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_FLAGS_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE, KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_FLAGS_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from key to authtime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from key to starttime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from key to endtime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from key to renewtill
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from key to srealm
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from key to sname
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
-         new StoreSName());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+                new StoreSName() );
 
         // transition from key to caddr
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-         new StoreCaddr());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
 
         // transition from prealm to flags
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_FLAGS_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE, KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_FLAGS_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from prealm to authtime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from prealm to starttime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from prealm to endtime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from prealm to renewtill
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from prealm to srealm
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from prealm to sname
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
-         new StoreSName());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+                new StoreSName() );
 
         // transition from prealm to caddr
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-         new StoreCaddr());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
 
         // transition from pname to authtime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from pname to starttime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from pname to endtime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from pname to renewtill
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from pname to srealm
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from pname to sname
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
-         new StoreSName());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+                new StoreSName() );
 
         // transition from pname to caddr
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-         new StoreCaddr());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
 
         // transition from flags to starttime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from flags to endtime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from flags to renewtill
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from flags to srealm
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from flags to sname
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
-         new StoreSName());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+                new StoreSName() );
 
         // transition from flags to caddr
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-         new StoreCaddr());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
 
         // transition from authtime to endtime
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from authtime to renewtill
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from authtime to srealm
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from authtime to sname
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
-         new StoreSName());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+                new StoreSName() );
 
         // transition from authtime to caddr
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-         new StoreCaddr());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
 
         // transition from starttime to renewtill
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from starttime to srealm
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from starttime to sname
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
-         new StoreSName());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+                new StoreSName() );
 
         // transition from starttime to caddr
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-         new StoreCaddr());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
 
         // transition from endtime to srealm
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
-         new CheckNotNullLength());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+                new CheckNotNullLength<KrbCredInfoContainer>() );
 
         // transition from endtime to sname
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
-         new StoreSName());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+                new StoreSName() );
 
         // transition from endtime to caddr
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-         new StoreCaddr());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
 
         // transition from renewtill to sname
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
-         new StoreSName());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+                new StoreSName() );
 
         // transition from renewtill to caddr
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-         new StoreCaddr());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE,
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
 
         // transition from srealm to caddr
-        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
-         KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
-         new StoreCaddr());
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] =
+            new GrammarTransition<KrbCredInfoContainer>(
+                KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE,
+                KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+                new StoreCaddr() );
     }
 
 
     /**
      * Get the instance of this grammar
-     * 
+     *
      * @return An instance on the KrbCredInfo Grammar
      */
-    public static Grammar getInstance()
+    public static Grammar<KrbCredInfoContainer> getInstance()
     {
         return instance;
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoStatesEnum.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoStatesEnum.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoStatesEnum.java Mon Feb  7 20:49:04 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.krbCredInfo;
 
@@ -27,19 +27,19 @@ import org.apache.directory.shared.asn1.
 /**
  * This class store the KrbCredInfo grammar's constants. It is also used for debugging
  * purpose
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum KrbCredInfoStatesEnum implements States
 {
     // Start
     START_STATE,                           // 0
-    
+
     // ----- KRB-ERROR component --------------------------------------
     KRB_CRED_INFO_SEQ_TAG_STATE,           // 1
-    
+
     KRB_CRED_INFO_KEY_TAG_STATE,           // 2
-    
+
     KRB_CRED_INFO_PREALM_TAG_STATE,        // 3
     KRB_CRED_INFO_PREALM_STATE,            // 4
 
@@ -62,7 +62,7 @@ public enum KrbCredInfoStatesEnum implem
 
     KRB_CRED_INFO_SREALM_TAG_STATE,        // 16
     KRB_CRED_INFO_SREALM_STATE,
-    
+
     KRB_CRED_INFO_SNAME_TAG_STATE,         // 17
 
     KRB_CRED_INFO_CADDR_TAG_STATE,         // 18
@@ -70,10 +70,10 @@ public enum KrbCredInfoStatesEnum implem
     // End
     LAST_KRB_CRED_INFO_STATE;              // 19
 
-    
+
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar code
      * @return The grammar name
      */
@@ -85,11 +85,11 @@ public enum KrbCredInfoStatesEnum implem
 
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar class
      * @return The grammar name
      */
-    public String getGrammarName( Grammar grammar )
+    public String getGrammarName( Grammar<KrbCredInfoContainer> grammar )
     {
         if ( grammar instanceof KrbCredInfoGrammar )
         {
@@ -104,7 +104,7 @@ public enum KrbCredInfoStatesEnum implem
 
     /**
      * Get the string representing the state
-     * 
+     *
      * @param state The state number
      * @return The String representing the state
      */
@@ -113,7 +113,7 @@ public enum KrbCredInfoStatesEnum implem
         return ( ( state == LAST_KRB_CRED_INFO_STATE.ordinal() ) ? "LAST_KRB_CRED_INFO_STATE" : name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -121,8 +121,8 @@ public enum KrbCredInfoStatesEnum implem
     {
         return this == LAST_KRB_CRED_INFO_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/KrbCredInfoInit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/KrbCredInfoInit.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/KrbCredInfoInit.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/KrbCredInfoInit.java Mon Feb  7 20:49:04 2011
@@ -6,22 +6,21 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.krbCredInfo.actions;
 
 
 import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.i18n.I18n;
@@ -33,10 +32,10 @@ import org.slf4j.LoggerFactory;
 
 /**
  * The action used to initialize the KrbCredInfo object
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class KrbCredInfoInit extends GrammarAction
+public class KrbCredInfoInit extends GrammarAction<KrbCredInfoContainer>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( KrbCredInfoInit.class );
@@ -57,10 +56,8 @@ public class KrbCredInfoInit extends Gra
     /**
      * {@inheritDoc}
      */
-    public void action( Asn1Container container ) throws DecoderException
+    public void action( KrbCredInfoContainer krbCredInfoContainer ) throws DecoderException
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
-
         TLV tlv = krbCredInfoContainer.getCurrentTLV();
 
         // The Length should not be null



Mime
View raw message