You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ad...@apache.org on 2007/04/22 08:17:41 UTC
svn commit: r531147 [1/2] - in /directory/sandbox/adc/asn1-compiler: ./
asn1-compiler/ asn1-compiler/src/main/java/org/apache/asn1/compiler/
asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/
asn1-compiler/src/main/java/org/apache/asn1/compil...
Author: adc
Date: Sat Apr 21 23:17:39 2007
New Revision: 531147
URL: http://svn.apache.org/viewvc?view=rev&rev=531147
Log:
Reformat and removed dep on commons-lang
Added:
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/Enum.java (with props)
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/EnumUtils.java (with props)
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/ValuedEnum.java (with props)
Modified:
directory/sandbox/adc/asn1-compiler/asn1-compiler/pom.xml
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/Compiler.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/ProcessException.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/Stage.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/TokenBase.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/BooleanPrimitive.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/IntegerPrimitive.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/Primitive.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BitStringType.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BooleanType.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeList.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeLists.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ConstrainedType.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/IntegerType.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleIdentifier.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleReference.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/NamedType.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ObjectIdentifier.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/OctetStringType.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SequenceType.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SubtypeConstraintSpec.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Tag.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Type.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeAssignment.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeReference.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Value.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ValueReference.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/LowerEndpoint.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/UpperEndpoint.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/ValueRange.java
directory/sandbox/adc/asn1-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java
directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/main/java/org/apache/asn1/plugin/ASN1Mojo.java
directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/site/site.xml
directory/sandbox/adc/asn1-compiler/asn1-runtime/pom.xml
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1BitStringDecoder.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1OctetStringDecoder.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/BERInputStream.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitor.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitorAdapter.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Length.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tag.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tuple.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/TypeClass.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/package.html
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/der/package.html
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/com/acme/spnego/NegTokenTarg.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsDecoder.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsEncoder.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitDecoder.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitEncoder.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegotiationTokenDecoder.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/der/NegotiationTokenDecoder.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/test/encoding/EncodingFactoryTest.java
directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/test/runtime/ASN1ObjectIdentifierTest.java
directory/sandbox/adc/asn1-compiler/pom.xml
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/pom.xml?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/pom.xml (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/pom.xml Sat Apr 21 23:17:39 2007
@@ -58,11 +58,6 @@
</dependency>
<dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
</dependency>
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/Compiler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/Compiler.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/Compiler.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/Compiler.java Sat Apr 21 23:17:39 2007
@@ -23,6 +23,7 @@
import org.apache.asn1.compiler.stages.codegen.CodeGeneratorStage;
import org.apache.asn1.compiler.stages.parser.ParseStage;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/ProcessException.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/ProcessException.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/ProcessException.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/ProcessException.java Sat Apr 21 23:17:39 2007
@@ -19,7 +19,7 @@
/**
* A exception class that is thown by a compiler stage's proccess method.
- *
+ *
* @version $Revision$ $Date: $
*/
public class ProcessException extends Exception
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/Stage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/Stage.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/Stage.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/Stage.java Sat Apr 21 23:17:39 2007
@@ -19,9 +19,10 @@
import java.util.Map;
+
/**
* Interface for compiler stages.
- *
+ *
* @version $Revision$ $Date: $
*/
public interface Stage
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/codegen/CodeGeneratorStage.java Sat Apr 21 23:17:39 2007
@@ -28,6 +28,9 @@
import java.util.Properties;
import java.util.Vector;
import java.util.logging.Logger;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.Velocity;
+import org.apache.velocity.exception.ParseErrorException;
import org.apache.asn1.compiler.stages.ProcessException;
import org.apache.asn1.compiler.stages.Stage;
@@ -37,9 +40,6 @@
import org.apache.asn1.compiler.stages.parser.x680.Module;
import org.apache.asn1.compiler.stages.parser.x680.Reference;
import org.apache.asn1.compiler.stages.parser.x680.TypeReference;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.Velocity;
-import org.apache.velocity.exception.ParseErrorException;
/**
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/TokenBase.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/TokenBase.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/TokenBase.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/TokenBase.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import antlr.Token;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/BooleanPrimitive.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/BooleanPrimitive.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/BooleanPrimitive.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/BooleanPrimitive.java Sat Apr 21 23:17:39 2007
@@ -21,6 +21,7 @@
import org.apache.asn1.compiler.stages.parser.ParseException;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/IntegerPrimitive.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/IntegerPrimitive.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/IntegerPrimitive.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/IntegerPrimitive.java Sat Apr 21 23:17:39 2007
@@ -21,6 +21,7 @@
import org.apache.asn1.compiler.stages.parser.ParseException;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/Primitive.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/Primitive.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/Primitive.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/primitive/Primitive.java Sat Apr 21 23:17:39 2007
@@ -22,6 +22,7 @@
import org.apache.asn1.compiler.stages.parser.ParseException;
import org.apache.asn1.compiler.stages.parser.x680.Value;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BitStringType.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BitStringType.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BitStringType.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BitStringType.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import org.apache.asn1.compiler.stages.parser.TokenBase;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BooleanType.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BooleanType.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BooleanType.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/BooleanType.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import org.apache.asn1.compiler.stages.parser.TokenBase;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeList.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeList.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeList.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeList.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import java.util.ArrayList;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeLists.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeLists.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeLists.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ComponentTypeLists.java Sat Apr 21 23:17:39 2007
@@ -18,7 +18,6 @@
package org.apache.asn1.compiler.stages.parser.x680;
-
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ConstrainedType.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ConstrainedType.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ConstrainedType.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ConstrainedType.java Sat Apr 21 23:17:39 2007
@@ -18,7 +18,6 @@
package org.apache.asn1.compiler.stages.parser.x680;
-
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/IntegerType.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/IntegerType.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/IntegerType.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/IntegerType.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import org.apache.asn1.compiler.stages.parser.TokenBase;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleIdentifier.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleIdentifier.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleIdentifier.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleIdentifier.java Sat Apr 21 23:17:39 2007
@@ -18,7 +18,6 @@
package org.apache.asn1.compiler.stages.parser.x680;
-
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleReference.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleReference.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleReference.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ModuleReference.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import org.apache.asn1.compiler.stages.parser.TokenBase;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/NamedType.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/NamedType.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/NamedType.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/NamedType.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import antlr.Token;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ObjectIdentifier.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ObjectIdentifier.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ObjectIdentifier.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ObjectIdentifier.java Sat Apr 21 23:17:39 2007
@@ -22,6 +22,7 @@
import org.apache.asn1.compiler.stages.parser.primitive.IntegerPrimitive;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/OctetStringType.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/OctetStringType.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/OctetStringType.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/OctetStringType.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import org.apache.asn1.compiler.stages.parser.TokenBase;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SequenceType.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SequenceType.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SequenceType.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SequenceType.java Sat Apr 21 23:17:39 2007
@@ -18,8 +18,6 @@
package org.apache.asn1.compiler.stages.parser.x680;
-
-
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SubtypeConstraintSpec.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SubtypeConstraintSpec.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SubtypeConstraintSpec.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/SubtypeConstraintSpec.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import org.apache.asn1.compiler.stages.parser.x680.element.ElementSetSpec;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Tag.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Tag.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Tag.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Tag.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import org.apache.asn1.compiler.stages.parser.primitive.IntegerPrimitive;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Type.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Type.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Type.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Type.java Sat Apr 21 23:17:39 2007
@@ -18,8 +18,6 @@
package org.apache.asn1.compiler.stages.parser.x680;
-
-
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeAssignment.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeAssignment.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeAssignment.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeAssignment.java Sat Apr 21 23:17:39 2007
@@ -18,7 +18,6 @@
package org.apache.asn1.compiler.stages.parser.x680;
-
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeReference.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeReference.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeReference.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/TypeReference.java Sat Apr 21 23:17:39 2007
@@ -21,6 +21,7 @@
import org.apache.asn1.compiler.stages.parser.TokenBase;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Value.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Value.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Value.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/Value.java Sat Apr 21 23:17:39 2007
@@ -21,6 +21,7 @@
import org.apache.asn1.compiler.stages.parser.TokenBase;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ValueReference.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ValueReference.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ValueReference.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/ValueReference.java Sat Apr 21 23:17:39 2007
@@ -21,6 +21,7 @@
import org.apache.asn1.compiler.stages.parser.TokenBase;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/LowerEndpoint.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/LowerEndpoint.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/LowerEndpoint.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/LowerEndpoint.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import org.apache.asn1.compiler.stages.parser.x680.Value;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/UpperEndpoint.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/UpperEndpoint.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/UpperEndpoint.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/UpperEndpoint.java Sat Apr 21 23:17:39 2007
@@ -19,6 +19,7 @@
import org.apache.asn1.compiler.stages.parser.x680.Value;
+
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/ValueRange.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/ValueRange.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/ValueRange.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/main/java/org/apache/asn1/compiler/stages/parser/x680/element/ValueRange.java Sat Apr 21 23:17:39 2007
@@ -18,8 +18,6 @@
package org.apache.asn1.compiler.stages.parser.x680.element;
-
-
/**
* @version $Revision$ $Date: $
*/
Modified: directory/sandbox/adc/asn1-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-compiler/src/test/java/org/apache/asn1/compiler/CompilerTest.java Sat Apr 21 23:17:39 2007
@@ -20,7 +20,6 @@
import java.io.File;
import java.util.HashMap;
import java.util.Map;
-
import junit.framework.TestCase;
import org.apache.asn1.compiler.stages.codegen.CodeGeneratorStage;
@@ -36,7 +35,7 @@
public void testLDAP() throws Exception
{
- Compiler compiler = new Compiler();
+ Compiler compiler = new Compiler();
Map environment = new HashMap();
System.err.println( basedir );
Modified: directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/main/java/org/apache/asn1/plugin/ASN1Mojo.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/main/java/org/apache/asn1/plugin/ASN1Mojo.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/main/java/org/apache/asn1/plugin/ASN1Mojo.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/main/java/org/apache/asn1/plugin/ASN1Mojo.java Sat Apr 21 23:17:39 2007
@@ -18,24 +18,22 @@
package org.apache.asn1.plugin;
import java.io.File;
-import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.Set;
import java.util.Map;
-import java.util.HashMap;
-
+import java.util.Set;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectHelper;
import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner;
import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
import org.codehaus.plexus.util.FileUtils;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.MavenProjectHelper;
import org.apache.asn1.compiler.stages.codegen.CodeGeneratorStage;
import org.apache.asn1.compiler.stages.parser.ParseStage;
Modified: directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/site/site.xml?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/site/site.xml (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-maven-plugin/src/site/site.xml Sat Apr 21 23:17:39 2007
@@ -1,19 +1,19 @@
<project name="ASN1 Compiler Plug-In">
- <bannerLeft>
- <name>Mojo</name>
- <src>/images/mojo_logo.png</src>
- <href>http://mojo.codehaus.org</href>
- </bannerLeft>
- <bannerRight>
- <name>Codehaus</name>
- <src>http://mojo.codehaus.org/images/codehaus-small.png</src>
- <href>http://www.codehaus.org</href>
- </bannerRight>
- <body>
- <links>
- <item name="Mojo" href="http://mojo.codehaus.org"/>
- <item name="Maven" href="http://maven.apache.org/maven2"/>
- </links>
- ${reports}
- </body>
+ <bannerLeft>
+ <name>Mojo</name>
+ <src>/images/mojo_logo.png</src>
+ <href>http://mojo.codehaus.org</href>
+ </bannerLeft>
+ <bannerRight>
+ <name>Codehaus</name>
+ <src>http://mojo.codehaus.org/images/codehaus-small.png</src>
+ <href>http://www.codehaus.org</href>
+ </bannerRight>
+ <body>
+ <links>
+ <item name="Mojo" href="http://mojo.codehaus.org"/>
+ <item name="Maven" href="http://maven.apache.org/maven2"/>
+ </links>
+ ${reports}
+ </body>
</project>
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/pom.xml?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/pom.xml (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/pom.xml Sat Apr 21 23:17:39 2007
@@ -31,11 +31,6 @@
<dependencies>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
-
</dependencies>
<reporting>
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1BitStringDecoder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1BitStringDecoder.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1BitStringDecoder.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1BitStringDecoder.java Sat Apr 21 23:17:39 2007
@@ -20,7 +20,6 @@
import java.io.InputStream;
import org.apache.asn1.encoding.DecoderException;
-import org.apache.asn1.runtime.ASN1BitString;
import org.apache.asn1.runtime.ASN1Type;
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1OctetStringDecoder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1OctetStringDecoder.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1OctetStringDecoder.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/ASN1OctetStringDecoder.java Sat Apr 21 23:17:39 2007
@@ -19,14 +19,14 @@
import java.io.InputStream;
-import org.apache.asn1.runtime.ASN1Type;
import org.apache.asn1.encoding.DecoderException;
+import org.apache.asn1.runtime.ASN1Type;
/**
* @version $Revision: $ $Date: $
*/
-public class ASN1OctetStringDecoder implements BERDecoder
+public class ASN1OctetStringDecoder implements BERDecoder
{
public ASN1Type decode( BERInputStream stream ) throws DecoderException
{
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/BERInputStream.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/BERInputStream.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/BERInputStream.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/BERInputStream.java Sat Apr 21 23:17:39 2007
@@ -126,8 +126,8 @@
}
}
}
- this.lengthStack.push( new Integer(length));
-
+ this.lengthStack.push( new Integer( length ) );
+
length = l;
}
@@ -146,7 +146,7 @@
return tag;
}
- public void readBitString(ASN1BitString bitString) throws IOException
+ public void readBitString( ASN1BitString bitString ) throws IOException
{
byte emptyBits = readByte();
}
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitor.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitor.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitor.java Sat Apr 21 23:17:39 2007
@@ -18,8 +18,6 @@
package org.apache.asn1.encoding.ber;
-
-
/**
* Monitors decoder activity. This class borrowed some from the <code>
* org.xml.sax.ErrorHandler</code> interface and its documentation. A monitor
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitorAdapter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitorAdapter.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitorAdapter.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/DecoderMonitorAdapter.java Sat Apr 21 23:17:39 2007
@@ -18,8 +18,6 @@
package org.apache.asn1.encoding.ber;
-
-
/**
* A do nothing decoder monitor adapter. At a bare minimum warning, error and
* fatal exceptions are reported to the console when using this adapter to
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Length.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Length.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Length.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Length.java Sat Apr 21 23:17:39 2007
@@ -144,14 +144,14 @@
}
else
{
- fixate();
+ fixate();
}
}
-
+
/*
- * if we have collected all the octets needed for computing the long
- * form length so we need to calculate the length and just fixate
- */
+ * if we have collected all the octets needed for computing the long
+ * form length so we need to calculate the length and just fixate
+ */
else if ( buf.position() >= numOctets + 1 )
{
fixate();
@@ -201,7 +201,7 @@
}
byte octet = octets.get();
-
+
// if we are using the short form then just return the first octet
if ( ( octet & END_MASK ) == 0 )
{
@@ -212,18 +212,19 @@
{
return INDEFINITE;
}
-
+
// using the long form so we calculate the length from all octets
int length = 0;
-
+
// calculate tag value w/ long tag format
-
+
int shift = 0;
do
{
length |= ( 0xFF & (int) octets.get() ) << shift;
shift += 8;
- } while ( octets.hasRemaining() );
+ }
+ while ( octets.hasRemaining() );
return length;
}
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tag.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tag.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tag.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tag.java Sat Apr 21 23:17:39 2007
@@ -236,7 +236,6 @@
return typeClass;
}
-
// ------------------------------------------------------------------------
// Utility Methods For Dealing With Tags and Tag Octets
// ------------------------------------------------------------------------
@@ -316,16 +315,16 @@
}
int id = octets[0] & SHORT_MASK;
-
+
// if bits are not all 1's then return the value which is less than 31
if ( id != SHORT_MASK && octets.length == 1 )
{
return id;
}
-
+
// clear the id now
id = 0;
-
+
// calculate tag value w/ long tag format
for ( int i = 1; i < octets.length; i++ )
{
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tuple.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tuple.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tuple.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/Tuple.java Sat Apr 21 23:17:39 2007
@@ -92,11 +92,10 @@
*/
int index = 0;
-
// ------------------------------------------------------------------------
// C O N S T R U C T O R S
// ------------------------------------------------------------------------
-
+
/**
* Empty do nothing tuple.
@@ -191,13 +190,12 @@
this.typeClass = typeClass;
}
}
-
-
+
// ------------------------------------------------------------------------
// Public Accessors
// ------------------------------------------------------------------------
-
-
+
+
/**
* Gets the tag id for this TLV Tuple.
*
@@ -366,12 +364,12 @@
{
this.index = index;
}
-
+
// ------------------------------------------------------------------------
// Utility methods and java.lang.Object overrides
// ------------------------------------------------------------------------
-
-
+
+
/**
* Clears the values of this tuple.
*/
@@ -433,12 +431,11 @@
return false;
}
-
// ------------------------------------------------------------------------
// Tuple encoding operations
// ------------------------------------------------------------------------
-
-
+
+
/**
* @return partial encoded image if constructed or complete TLV if primitive
* @todo this should produce chunking output and needs to be removed from
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/TypeClass.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/TypeClass.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/TypeClass.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/TypeClass.java Sat Apr 21 23:17:39 2007
@@ -21,8 +21,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.lang.enum.EnumUtils;
-import org.apache.commons.lang.enum.ValuedEnum;
+import org.apache.asn1.runtime.ValuedEnum;
+import org.apache.asn1.runtime.EnumUtils;
/**
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/package.html
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/package.html?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/package.html (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/ber/package.html Sat Apr 21 23:17:39 2007
@@ -1,23 +1,24 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file 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.
--->
+ <!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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.
+ -->
</head>
+
<body bgcolor="white">
Provides the codec foundation for Basic Encoding Rules based on a Tag, Length
@@ -29,8 +30,8 @@
For overviews, tutorials, examples, guides, and tool documentation, please see:
<ul>
- <li><a href="http://incubator.apache.org/directory/subprojects/asn1/index.html">ASN1 Project</a>
- <li><a href="http://incubator.apache.org/directory/subprojects/asn1/ber-codec/index.html">ASN1 BER Codecs</a>
+ <li><a href="http://incubator.apache.org/directory/subprojects/asn1/index.html">ASN1 Project</a>
+ <li><a href="http://incubator.apache.org/directory/subprojects/asn1/ber-codec/index.html">ASN1 BER Codecs</a>
</ul>
<!-- Put @see and @since tags down here. -->
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/der/package.html
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/der/package.html?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/der/package.html (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/encoding/der/package.html Sat Apr 21 23:17:39 2007
@@ -1,23 +1,24 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file 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.
--->
+ <!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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.
+ -->
</head>
+
<body bgcolor="white">
Provides the codec foundation for Distinguished Encoding Rules based on a Tag, Length
@@ -29,8 +30,8 @@
For overviews, tutorials, examples, guides, and tool documentation, please see:
<ul>
- <li><a href="http://incubator.apache.org/directory/subprojects/asn1/index.html">ASN1 Project</a>
- <li><a href="http://incubator.apache.org/directory/subprojects/asn1/der-codec/index.html">ASN1 DER Codecs</a>
+ <li><a href="http://incubator.apache.org/directory/subprojects/asn1/index.html">ASN1 Project</a>
+ <li><a href="http://incubator.apache.org/directory/subprojects/asn1/der-codec/index.html">ASN1 DER Codecs</a>
</ul>
<!-- Put @see and @since tags down here. -->
Added: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/Enum.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/Enum.java?view=auto&rev=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/Enum.java (added)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/Enum.java Sat Apr 21 23:17:39 2007
@@ -0,0 +1,368 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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.
+ */
+package org.apache.asn1.runtime;
+
+import java.io.Serializable;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Abstract superclass for type-safe enums.
+ * <p/>
+ * One feature of the C programming language lacking in Java is enumerations. The
+ * C implementation based on ints was poor and open to abuse. The original Java
+ * recommendation and most of the JDK also uses int constants. It has been recognised
+ * however that a more robust type-safe class-based solution can be designed. This
+ * class follows the basic Java type-safe enumeration pattern.
+ * <p/>
+ * <em>NOTE:</em>Due to the way in which Java ClassLoaders work, comparing Enum objects
+ * should always be done using the equals() method, not ==. The equals() method will
+ * try == first so in most cases the effect is the same.
+ * <p/>
+ * To use this class, it must be subclassed. For example:
+ * <p/>
+ * <pre>
+ * public final class ColorEnum extends Enum {
+ * public static final ColorEnum RED = new ColorEnum("Red");
+ * public static final ColorEnum GREEN = new ColorEnum("Green");
+ * public static final ColorEnum BLUE = new ColorEnum("Blue");
+ * <p/>
+ * private ColorEnum(String color) {
+ * super(color);
+ * }
+ * <p/>
+ * public static ColorEnum getEnum(String color) {
+ * return (ColorEnum) getEnum(ColorEnum.class, color);
+ * }
+ * <p/>
+ * public static Map getEnumMap() {
+ * return getEnumMap(ColorEnum.class);
+ * }
+ * <p/>
+ * public static List getEnumList() {
+ * return getEnumList(ColorEnum.class);
+ * }
+ * <p/>
+ * public static Iterator iterator() {
+ * return iterator(ColorEnum.class);
+ * }
+ * }
+ * </pre>
+ * <p/>
+ * As shown, each enum has a name. This can be accessed using <code>getName</code>.
+ * <p/>
+ * The <code>getEnum</code> and <code>iterator</code> methods are recommended.
+ * Unfortunately, Java restrictions require these to be coded as shown in each subclass.
+ * An alternative choice is to use the {@link EnumUtils} class.
+ * <p/>
+ * <em>NOTE:</em> This class originated in the Jakarta Avalon project.
+ * </p>
+ *
+ * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
+ * @version $Rev$ $Date$
+ */
+public abstract class Enum implements Comparable, Serializable
+{
+ /**
+ * An empty map, as JDK1.2 didn't have an empty map
+ */
+ private static final Map EMPTY_MAP = Collections.unmodifiableMap( new HashMap() );
+ /**
+ * Map, key of class name, value of Entry.
+ */
+ private static final Map cEnumClasses = new HashMap();
+ /**
+ * The string representation of the Enum.
+ */
+ private final String iName;
+
+ /**
+ * Enable the iterator to retain the source code order
+ */
+ private static class Entry
+ {
+ /**
+ * Map of Enum name to Enum
+ */
+ final Map map = new HashMap( 50 );
+ /**
+ * List of Enums in source code order
+ */
+ final List list = new ArrayList( 25 );
+
+ /**
+ * Restrictive constructor
+ */
+ private Entry()
+ {
+ }
+ }
+
+ /**
+ * Constructor to add a new named item to the enumeration.
+ *
+ * @param name the name of the enum object
+ * @throws IllegalArgumentException if the name is null or a blank string
+ */
+ protected Enum( String name )
+ {
+ super();
+ if ( name == null || name.length() == 0 )
+ {
+ throw new IllegalArgumentException( "The Enum name must not be empty" );
+ }
+ iName = name;
+ Entry entry = (Entry) cEnumClasses.get( getClass().getName() );
+ if ( entry == null )
+ {
+ entry = new Entry();
+ cEnumClasses.put( getClass().getName(), entry );
+ }
+ if ( entry.map.containsKey( name ) )
+ {
+ throw new IllegalArgumentException( "The Enum name must be unique, '" + name + "' has already been added" );
+ }
+ entry.map.put( name, this );
+ entry.list.add( this );
+ }
+
+ /**
+ * Handle the deserialization of the class to ensure that multiple
+ * copies are not wastefully created, or illegal enum types created.
+ *
+ * @return the resolved object
+ */
+ protected Object readResolve()
+ {
+ return Enum.getEnum( getClass(), getName() );
+ }
+
+ /**
+ * Gets an Enum object by class and name.
+ *
+ * @param enumClass the class of the Enum to get
+ * @param name the name of the Enum to get, may be null
+ * @return the enum object, or null if the enum does not exist
+ * @throws IllegalArgumentException if the enum class is null
+ */
+ protected static Enum getEnum( Class enumClass, String name )
+ {
+ if ( enumClass == null )
+ {
+ throw new IllegalArgumentException( "The Enum Class must not be null" );
+ }
+ Entry entry = (Entry) cEnumClasses.get( enumClass.getName() );
+ if ( entry == null )
+ {
+ return null;
+ }
+ return (Enum) entry.map.get( name );
+ }
+
+ /**
+ * Gets the Map of Enum objects by name using the Enum class.
+ * If the requested class has no enum objects an empty Map is returned.
+ *
+ * @param enumClass the class of the Enum to get
+ * @return the enum object Map
+ * @throws IllegalArgumentException if the enum class is null
+ * @throws IllegalArgumentException if the enum class is not a subclass of Enum
+ */
+ protected static Map getEnumMap( Class enumClass )
+ {
+ if ( enumClass == null )
+ {
+ throw new IllegalArgumentException( "The Enum Class must not be null" );
+ }
+ if ( Enum.class.isAssignableFrom( enumClass ) == false )
+ {
+ throw new IllegalArgumentException( "The Class must be a subclass of Enum" );
+ }
+ Entry entry = (Entry) cEnumClasses.get( enumClass.getName() );
+ if ( entry == null )
+ {
+ return EMPTY_MAP;
+ }
+ return Collections.unmodifiableMap( entry.map );
+ }
+
+ /**
+ * Gets the List of Enum objects using the Enum class.
+ * The list is in the order that the objects were created (source code order).
+ * If the requested class has no enum objects an empty List is returned.
+ *
+ * @param enumClass the class of the Enum to get
+ * @return the enum object Map
+ * @throws IllegalArgumentException if the enum class is null
+ * @throws IllegalArgumentException if the enum class is not a subclass of Enum
+ */
+ protected static List getEnumList( Class enumClass )
+ {
+ if ( enumClass == null )
+ {
+ throw new IllegalArgumentException( "The Enum Class must not be null" );
+ }
+ if ( Enum.class.isAssignableFrom( enumClass ) == false )
+ {
+ throw new IllegalArgumentException( "The Class must be a subclass of Enum" );
+ }
+ Entry entry = (Entry) cEnumClasses.get( enumClass.getName() );
+ if ( entry == null )
+ {
+ return Collections.EMPTY_LIST;
+ }
+ return Collections.unmodifiableList( entry.list );
+ }
+
+ /**
+ * Gets an iterator over the Enum objects in an Enum class.
+ * The iterator is in the order that the objects were created (source code order).
+ * If the requested class has no enum objects an empty Iterator is returned.
+ *
+ * @param enumClass the class of the Enum to get
+ * @return an iterator of the Enum objects
+ * @throws IllegalArgumentException if the enum class is null
+ * @throws IllegalArgumentException if the enum class is not a subclass of Enum
+ */
+ protected static Iterator iterator( Class enumClass )
+ {
+ return Enum.getEnumList( enumClass ).iterator();
+ }
+
+ /**
+ * Retrieve the name of this Enum item, set in the constructor.
+ *
+ * @return the <code>String</code> name of this Enum item
+ */
+ public final String getName()
+ {
+ return iName;
+ }
+
+ /**
+ * Tests for equality. Two Enum objects are considered equal
+ * if they have the same class names and the same names.
+ * Identity is tested for first, so this method usually runs fast.
+ *
+ * @param other the other object to compare for equality
+ * @return true if the Enums are equal
+ */
+ public final boolean equals( Object other )
+ {
+ if ( other == this )
+ {
+ return true;
+ }
+ else if ( other == null )
+ {
+ return false;
+ }
+ else if ( other.getClass() == this.getClass() )
+ {
+ // shouldn't happen, but...
+ return iName.equals( ( (Enum) other ).iName );
+ }
+ else if ( other.getClass().getName().equals( this.getClass().getName() ) )
+ {
+ // different classloaders
+ try
+ {
+ // try to avoid reflection
+ return iName.equals( ( (Enum) other ).iName );
+
+ }
+ catch ( ClassCastException ex )
+ {
+ // use reflection
+ try
+ {
+ Method mth = other.getClass().getMethod( "getName", null );
+ String name = (String) mth.invoke( other, null );
+ return iName.equals( name );
+ }
+ catch ( NoSuchMethodException ex2 )
+ {
+ // ignore - should never happen
+ }
+ catch ( IllegalAccessException ex2 )
+ {
+ // ignore - should never happen
+ }
+ catch ( InvocationTargetException ex2 )
+ {
+ // ignore - should never happen
+ }
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Returns a suitable hashCode for the enumeration.
+ *
+ * @return a hashcode based on the name
+ */
+ public final int hashCode()
+ {
+ return 7 + iName.hashCode();
+ }
+
+ /**
+ * Tests for order. The default ordering is alphabetic by name, but this
+ * can be overridden by subclasses.
+ *
+ * @param other the other object to compare to
+ * @return -ve if this is less than the other object, +ve if greater than, 0 of equal
+ * @throws ClassCastException if other is not an Enum
+ * @throws NullPointerException if other is null
+ * @see Comparable#compareTo(Object)
+ */
+ public int compareTo( Object other )
+ {
+ return iName.compareTo( ( (Enum) other ).iName );
+ }
+
+ /**
+ * Human readable description of this Enum item. For use when debugging.
+ *
+ * @return String in the form <code>type[name]</code>, for example:
+ * <code>Color[Red]</code>. Note that the package name is stripped from
+ * the type name.
+ */
+ public String toString()
+ {
+ String shortName = getClass().getName();
+ int pos = shortName.lastIndexOf( '.' );
+ if ( pos != -1 )
+ {
+ shortName = shortName.substring( pos + 1 );
+ }
+ return shortName + "[" + getName() + "]";
+ }
+}
Propchange: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/Enum.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/Enum.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Id Author
Propchange: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/Enum.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/EnumUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/EnumUtils.java?view=auto&rev=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/EnumUtils.java (added)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/EnumUtils.java Sat Apr 21 23:17:39 2007
@@ -0,0 +1,117 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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.
+ */
+package org.apache.asn1.runtime;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Utility class for accessing and manipulating Enums.
+ *
+ * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
+ * @version $Rev$ $Date$
+ * @see java.lang.Enum
+ * @see ValuedEnum
+ */
+public abstract class EnumUtils implements Comparable, Serializable
+{
+
+ /**
+ * Restricted constructor
+ */
+ private EnumUtils()
+ {
+ }
+
+ /**
+ * Gets an Enum object by class and name.
+ *
+ * @param enumClass the class of the Enum to get
+ * @param name the name of the Enum to get, may be null
+ * @return the enum object
+ * @throws IllegalArgumentException if the enum class is null
+ */
+ public static Enum getEnum( Class enumClass, String name )
+ {
+ return Enum.getEnum( enumClass, name );
+ }
+
+ /**
+ * Gets a ValuedEnum object by class and value.
+ *
+ * @param enumClass the class of the Enum to get
+ * @param value the value of the Enum to get
+ * @return the enum object, or null if the enum does not exist
+ * @throws IllegalArgumentException if the enum class is null
+ */
+ public static ValuedEnum getEnum( Class enumClass, int value )
+ {
+ return (ValuedEnum) ValuedEnum.getEnum( enumClass, value );
+ }
+
+ /**
+ * Gets the Map of Enum objects by name using the Enum class.
+ * If the requested class has no enum objects an empty Map is returned.
+ * The Map is unmodifiable.
+ *
+ * @param enumClass the class of the Enum to get
+ * @return the enum object Map
+ * @throws IllegalArgumentException if the enum class is null
+ * @throws IllegalArgumentException if the enum class is not a subclass of Enum
+ */
+ public static Map getEnumMap( Class enumClass )
+ {
+ return Enum.getEnumMap( enumClass );
+ }
+
+ /**
+ * Gets the List of Enum objects using the Enum class.
+ * The list is in the order that the objects were created (source code order).
+ * If the requested class has no enum objects an empty List is returned.
+ * The List is unmodifiable.
+ *
+ * @param enumClass the class of the Enum to get
+ * @return the enum object Map
+ * @throws IllegalArgumentException if the enum class is null
+ * @throws IllegalArgumentException if the enum class is not a subclass of Enum
+ */
+ public static List getEnumList( Class enumClass )
+ {
+ return Enum.getEnumList( enumClass );
+ }
+
+ /**
+ * Gets an iterator over the Enum objects in an Enum class.
+ * The iterator is in the order that the objects were created (source code order).
+ * If the requested class has no enum objects an empty Iterator is returned.
+ * The Iterator is unmodifiable.
+ *
+ * @param enumClass the class of the Enum to get
+ * @return an iterator of the Enum objects
+ * @throws IllegalArgumentException if the enum class is null
+ * @throws IllegalArgumentException if the enum class is not a subclass of Enum
+ */
+ public static Iterator iterator( Class enumClass )
+ {
+ return Enum.getEnumList( enumClass ).iterator();
+ }
+
+}
Propchange: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/EnumUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/EnumUtils.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Id Author
Propchange: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/EnumUtils.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/ValuedEnum.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/ValuedEnum.java?view=auto&rev=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/ValuedEnum.java (added)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/ValuedEnum.java Sat Apr 21 23:17:39 2007
@@ -0,0 +1,188 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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.
+ */
+package org.apache.asn1.runtime;
+
+import java.util.Iterator;
+import java.util.List;
+
+
+/**
+ * Abstract superclass for type-safe enums with integer values.
+ * <p/>
+ * <em>NOTE:</em>Due to the way in which Java ClassLoaders work, comparing Enum objects
+ * should always be done using the equals() method, not ==. The equals() method will
+ * try == first so in most cases the effect is the same.
+ * <p/>
+ * To use this class, it must be subclassed. For example:
+ * <p/>
+ * <pre>
+ * public final class JavaVersion extends ValuedEnum {
+ * //standard enums for version of JVM
+ * public static final int JAVA1_0_VALUE = 100;
+ * public static final int JAVA1_1_VALUE = 110;
+ * public static final int JAVA1_2_VALUE = 120;
+ * public static final int JAVA1_3_VALUE = 130;
+ * public static final JavaVersionEnum JAVA1_0 = new JavaVersionEnum( "Java 1.0", JAVA1_0_VALUE );
+ * public static final JavaVersionEnum JAVA1_1 = new JavaVersionEnum( "Java 1.1", JAVA1_1_VALUE );
+ * public static final JavaVersionEnum JAVA1_2 = new JavaVersionEnum( "Java 1.2", JAVA1_2_VALUE );
+ * public static final JavaVersionEnum JAVA1_3 = new JavaVersionEnum( "Java 1.3", JAVA1_3_VALUE );
+ * <p/>
+ * private JavaVersionEnum(String name, int value) {
+ * super( name, value );
+ * }
+ * <p/>
+ * public static JavaVersionEnum getEnum(String javaVersion) {
+ * return (JavaVersionEnum) getEnum(JavaVersionEnum.class, javaVersion);
+ * }
+ * <p/>
+ * public static JavaVersionEnum getEnum(int javaVersion) {
+ * return (JavaVersionEnum) getEnum(JavaVersionEnum.class, javaVersion);
+ * }
+ * <p/>
+ * public static Map getEnumMap() {
+ * return getEnumMap(JavaVersionEnum.class);
+ * }
+ * <p/>
+ * public static List getEnumList() {
+ * return getEnumList(JavaVersionEnum.class);
+ * }
+ * <p/>
+ * public static Iterator iterator() {
+ * return iterator(JavaVersionEnum.class);
+ * }
+ * }
+ * </pre>
+ * <p/>
+ * The above class could then be used as follows:
+ * <pre>
+ * public void doSomething(JavaVersion ver) {
+ * switch (ver.getValue()) {
+ * case JAVA1_0_VALUE:
+ * // ...
+ * break;
+ * case JAVA1_1_VALUE:
+ * // ...
+ * break;
+ * //...
+ * }
+ * }
+ * </pre>
+ * <p/>
+ * As shown, each enum has a name and a value. These can be accessed using
+ * <code>getName</code> and <code>getValue</code>.
+ * <p/>
+ * The <code>getEnum</code> and <code>iterator</code> methods are recommended.
+ * Unfortunately, Java restrictions require these to be coded as shown in each subclass.
+ * An alternative choice is to use the {@link EnumUtils} class.
+ * <p/>
+ * <em>NOTE:</em> This class originated in the Jakarta Avalon project.
+ * </p>
+ *
+ * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
+ * @version $Rev$ $Date$
+ */
+public abstract class ValuedEnum extends Enum
+{
+ /**
+ * The value contained in enum.
+ */
+ private final int iValue;
+
+ /**
+ * Constructor for enum item.
+ *
+ * @param name the name of enum item.
+ * @param value the value of enum item.
+ */
+ protected ValuedEnum( String name, int value )
+ {
+ super( name );
+ iValue = value;
+ }
+
+ /**
+ * Gets an Enum object by class and value.
+ * This method loops through the list of Enums, thus if there
+ * are many Enums this will be slow.
+ *
+ * @param enumClass the class of the Enum to get
+ * @param value the value of the Enum to get
+ * @return the enum object, or null if the enum does not exist
+ * @throws IllegalArgumentException if the enum class is null
+ */
+ protected static Enum getEnum( Class enumClass, int value )
+ {
+ if ( enumClass == null )
+ {
+ throw new IllegalArgumentException( "The Enum Class must not be null" );
+ }
+ List list = Enum.getEnumList( enumClass );
+ for ( Iterator it = list.iterator(); it.hasNext(); )
+ {
+ ValuedEnum valuedEnum = (ValuedEnum) it.next();
+ if ( valuedEnum.getValue() == value )
+ {
+ return valuedEnum;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get value of enum item.
+ *
+ * @return the enum item's value.
+ */
+ public final int getValue()
+ {
+ return iValue;
+ }
+
+ /**
+ * Tests for order. The default ordering is numeric by value, but this
+ * can be overridden by subclasses.
+ *
+ * @param other the other object to compare to
+ * @return -ve if this is less than the other object, +ve if greater than, 0 of equal
+ * @throws ClassCastException if other is not an Enum
+ * @throws NullPointerException if other is null
+ * @see Comparable#compareTo(Object)
+ */
+ public int compareTo( Object other )
+ {
+ return iValue - ( (ValuedEnum) other ).iValue;
+ }
+
+ /**
+ * Human readable description of this Enum item. For use when debugging.
+ *
+ * @return String in the form <code>type[name=value]</code>, for example:
+ * <code>JavaVersion[Java 1.0=100]</code>. Note that the package name is
+ * stripped from the type name.
+ */
+ public String toString()
+ {
+ String shortName = getClass().getName();
+ int pos = shortName.lastIndexOf( '.' );
+ if ( pos != -1 )
+ {
+ shortName = shortName.substring( pos + 1 );
+ }
+ return shortName + "[" + getName() + "=" + getValue() + "]";
+ }
+}
Propchange: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/ValuedEnum.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/ValuedEnum.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Id Author
Propchange: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/main/java/org/apache/asn1/runtime/ValuedEnum.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/com/acme/spnego/NegTokenTarg.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/com/acme/spnego/NegTokenTarg.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/com/acme/spnego/NegTokenTarg.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/com/acme/spnego/NegTokenTarg.java Sat Apr 21 23:17:39 2007
@@ -18,6 +18,7 @@
package com.acme.spnego;
import org.apache.asn1.types.com.acme.spnego.NegTokenTargType;
+import org.apache.asn1.runtime.ValuedEnum;
/**
@@ -92,7 +93,7 @@
return true;
}
- public static class negResultEnum extends org.apache.commons.lang.enum.ValuedEnum implements org.apache.asn1.runtime.ASN1Type
+ public static class negResultEnum extends ValuedEnum implements org.apache.asn1.runtime.ASN1Type
{
public static final negResultEnum ACCEPTCOMPLETED = new negResultEnum( "accept_completed", 0 );
public static final negResultEnum ACCEPTINCOMPLETE = new negResultEnum( "accept_incomplete", 1 );
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsDecoder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsDecoder.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsDecoder.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsDecoder.java Sat Apr 21 23:17:39 2007
@@ -38,7 +38,7 @@
if ( stream.isConstructed() ) throw new org.apache.asn1.encoding.DecoderException( "Flags should not be constructed" );
if ( stream.getTag() != 3 ) throw new org.apache.asn1.encoding.DecoderException( "Wrong tag. Found " + stream.getTag() + " needed 3" );
- stream.readBitString(negTokenInit);
+ stream.readBitString( negTokenInit );
// tag = stream.getTag();
// if (tag == 0) {
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsEncoder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsEncoder.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsEncoder.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/ContextFlagsEncoder.java Sat Apr 21 23:17:39 2007
@@ -18,6 +18,7 @@
package org.apache.asn1.encoding.com.acme.spnego.ber;
import com.acme.spnego.ContextFlags;
+
import org.apache.asn1.types.com.acme.spnego.ContextFlagsType;
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitDecoder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitDecoder.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitDecoder.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitDecoder.java Sat Apr 21 23:17:39 2007
@@ -54,7 +54,8 @@
if ( !stream.isConstructed() ) throw new org.apache.asn1.encoding.DecoderException( "Identifier not constructed" );
tag = stream.getTag();
- if (tag == 0) {
+ if ( tag == 0 )
+ {
negTokenInit.setMechTypes( (com.acme.spnego.MechTypeList) mechTypesDecoder.decode( stream ) );
}
}
Modified: directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitEncoder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitEncoder.java?view=diff&rev=531147&r1=531146&r2=531147
==============================================================================
--- directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitEncoder.java (original)
+++ directory/sandbox/adc/asn1-compiler/asn1-runtime/src/test/java/org/apache/asn1/encoding/com/acme/spnego/ber/NegTokenInitEncoder.java Sat Apr 21 23:17:39 2007
@@ -18,6 +18,7 @@
package org.apache.asn1.encoding.com.acme.spnego.ber;
import com.acme.spnego.NegTokenInit;
+
import org.apache.asn1.types.com.acme.spnego.NegTokenInitType;