ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional Javah.java
Date Sun, 30 Dec 2001 06:14:21 GMT
donaldp     01/12/29 22:14:21

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
                        Javac.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional
                        Javah.java
  Added:       proposal/myrmidon/src/java/org/apache/myrmidon/framework
                        JavaVersion.java
  Removed:     proposal/myrmidon/src/java/org/apache/myrmidon/api
                        JavaVersion.java
  Log:
  Move JavaVersion class into framework package
  
  Revision  Changes    Path
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/JavaVersion.java
  
  Index: JavaVersion.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.framework;
  
  import org.apache.avalon.framework.ValuedEnum;
  
  /**
   * Type safe wrapper class for Java Version enums.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   */
  public final class JavaVersion
      extends ValuedEnum
  {
      //standard enums for version of JVM
      public final static JavaVersion JAVA1_0 = new JavaVersion( "Java 1.0", 100 );
      public final static JavaVersion JAVA1_1 = new JavaVersion( "Java 1.1", 110 );
      public final static JavaVersion JAVA1_2 = new JavaVersion( "Java 1.2", 120 );
      public final static JavaVersion JAVA1_3 = new JavaVersion( "Java 1.3", 130 );
  
      private final static JavaVersion CURRENT = determineCurrentJavaVersion();
  
      /**
       * Method to retrieve the current JVM version.
       *
       * @return the current JVM version
       */
      public static final JavaVersion getCurrentJavaVersion()
      {
          return CURRENT;
      }
  
      /**
       * Private constructor so no instance except here can be defined.
       *
       * @param name the java version name
       * @param value the version * 100
       */
      private JavaVersion( final String name, final int value )
      {
          super( name, value );
      }
  
      /**
       * Helper method to retrieve current JVM version.
       *
       * @return the current JVM version
       */
      private static final JavaVersion determineCurrentJavaVersion()
      {
          JavaVersion version = JavaVersion.JAVA1_0;
  
          try
          {
              Class.forName( "java.lang.Void" );
              version = JavaVersion.JAVA1_1;
              Class.forName( "java.lang.ThreadLocal" );
              version = JavaVersion.JAVA1_2;
              Class.forName( "java.lang.StrictMath" );
              version = JavaVersion.JAVA1_3;
          }
          catch( final ClassNotFoundException cnfe )
          {
          }
  
          return version;
      }
  }
  
  
  
  1.17      +1 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Javac.java	30 Dec 2001 06:13:33 -0000	1.16
  +++ Javac.java	30 Dec 2001 06:14:21 -0000	1.17
  @@ -10,7 +10,7 @@
   import java.io.File;
   import java.util.ArrayList;
   import java.util.Iterator;
  -import org.apache.myrmidon.api.JavaVersion;
  +import org.apache.myrmidon.framework.JavaVersion;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Os;
   import org.apache.tools.ant.DirectoryScanner;
  
  
  
  1.13      +1 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
  
  Index: Javah.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Javah.java	30 Dec 2001 06:13:33 -0000	1.12
  +++ Javah.java	30 Dec 2001 06:14:21 -0000	1.13
  @@ -12,7 +12,7 @@
   import java.util.Iterator;
   import java.util.StringTokenizer;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.api.JavaVersion;
  +import org.apache.myrmidon.framework.JavaVersion;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.Commandline;
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message