|
From: <ls...@us...> - 2007-05-13 17:11:30
|
Revision: 3200
http://jnode.svn.sourceforge.net/jnode/?rev=3200&view=rev
Author: lsantha
Date: 2007-05-13 10:11:27 -0700 (Sun, 13 May 2007)
Log Message:
-----------
First merges of OpenJDK.
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/misc/
trunk/core/src/openjdk/sun/sun/misc/DoubleConsts.java
trunk/core/src/openjdk/sun/sun/misc/FloatConsts.java
trunk/core/src/openjdk/sun/sun/misc/FloatingDecimal.java
trunk/core/src/openjdk/sun/sun/misc/FpUtils.java
trunk/core/src/openjdk/sun/sun/text/
trunk/core/src/openjdk/sun/sun/text/Normalizer.java
trunk/core/src/openjdk/sun/sun/text/normalizer/
trunk/core/src/openjdk/sun/sun/text/normalizer/CharTrie.java
trunk/core/src/openjdk/sun/sun/text/normalizer/CharacterIteratorWrapper.java
trunk/core/src/openjdk/sun/sun/text/normalizer/ICUBinary.java
trunk/core/src/openjdk/sun/sun/text/normalizer/ICUData.java
trunk/core/src/openjdk/sun/sun/text/normalizer/IntTrie.java
trunk/core/src/openjdk/sun/sun/text/normalizer/NormalizerBase.java
trunk/core/src/openjdk/sun/sun/text/normalizer/NormalizerDataReader.java
trunk/core/src/openjdk/sun/sun/text/normalizer/NormalizerImpl.java
trunk/core/src/openjdk/sun/sun/text/normalizer/RangeValueIterator.java
trunk/core/src/openjdk/sun/sun/text/normalizer/Replaceable.java
trunk/core/src/openjdk/sun/sun/text/normalizer/ReplaceableString.java
trunk/core/src/openjdk/sun/sun/text/normalizer/ReplaceableUCharacterIterator.java
trunk/core/src/openjdk/sun/sun/text/normalizer/RuleCharacterIterator.java
trunk/core/src/openjdk/sun/sun/text/normalizer/SymbolTable.java
trunk/core/src/openjdk/sun/sun/text/normalizer/Trie.java
trunk/core/src/openjdk/sun/sun/text/normalizer/TrieIterator.java
trunk/core/src/openjdk/sun/sun/text/normalizer/UCharacter.java
trunk/core/src/openjdk/sun/sun/text/normalizer/UCharacterIterator.java
trunk/core/src/openjdk/sun/sun/text/normalizer/UCharacterProperty.java
trunk/core/src/openjdk/sun/sun/text/normalizer/UCharacterPropertyReader.java
trunk/core/src/openjdk/sun/sun/text/normalizer/UProperty.java
trunk/core/src/openjdk/sun/sun/text/normalizer/UTF16.java
trunk/core/src/openjdk/sun/sun/text/normalizer/UnicodeMatcher.java
trunk/core/src/openjdk/sun/sun/text/normalizer/UnicodeSet.java
trunk/core/src/openjdk/sun/sun/text/normalizer/UnicodeSetIterator.java
trunk/core/src/openjdk/sun/sun/text/normalizer/Utility.java
trunk/core/src/openjdk/sun/sun/text/normalizer/VersionInfo.java
Added: trunk/core/src/openjdk/sun/sun/misc/DoubleConsts.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/misc/DoubleConsts.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/misc/DoubleConsts.java 2007-05-13 17:11:27 UTC (rev 3200)
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.misc;
+
+/**
+ * This class contains additional constants documenting limits of the
+ * <code>double</code> type.
+ *
+ * @author Joseph D. Darcy
+ * @version 1.7, 05/05/07
+ */
+
+public class DoubleConsts {
+ /**
+ * Don't let anyone instantiate this class.
+ */
+ private DoubleConsts() {}
+
+ public static final double POSITIVE_INFINITY = java.lang.Double.POSITIVE_INFINITY;
+ public static final double NEGATIVE_INFINITY = java.lang.Double.NEGATIVE_INFINITY;
+ public static final double NaN = java.lang.Double.NaN;
+ public static final double MAX_VALUE = java.lang.Double.MAX_VALUE;
+ public static final double MIN_VALUE = java.lang.Double.MIN_VALUE;
+
+ /**
+ * A constant holding the smallest positive normal value of type
+ * <code>double</code>, 2<sup>-1022</sup>. It is equal to the
+ * value returned by
+ * <code>Double.longBitsToDouble(0x0010000000000000L)</code>.
+ *
+ * @since 1.5
+ */
+ public static final double MIN_NORMAL = 2.2250738585072014E-308;
+
+
+ /**
+ * The number of logical bits in the significand of a
+ * <code>double</code> number, including the implicit bit.
+ */
+ public static final int SIGNIFICAND_WIDTH = 53;
+
+ /**
+ * Maximum exponent a finite <code>double</code> number may have.
+ * It is equal to the value returned by
+ * <code>Math.ilogb(Double.MAX_VALUE)</code>.
+ */
+ public static final int MAX_EXPONENT = 1023;
+
+ /**
+ * Minimum exponent a normalized <code>double</code> number may
+ * have. It is equal to the value returned by
+ * <code>Math.ilogb(Double.MIN_NORMAL)</code>.
+ */
+ public static final int MIN_EXPONENT = -1022;
+
+ /**
+ * The exponent the smallest positive <code>double</code>
+ * subnormal value would have if it could be normalized. It is
+ * equal to the value returned by
+ * <code>FpUtils.ilogb(Double.MIN_VALUE)</code>.
+ */
+ public static final int MIN_SUB_EXPONENT = MIN_EXPONENT -
+ (SIGNIFICAND_WIDTH - 1);
+
+ /**
+ * Bias used in representing a <code>double</code> exponent.
+ */
+ public static final int EXP_BIAS = 1023;
+
+ /**
+ * Bit mask to isolate the sign bit of a <code>double</code>.
+ */
+ public static final long SIGN_BIT_MASK = 0x8000000000000000L;
+
+ /**
+ * Bit mask to isolate the exponent field of a
+ * <code>double</code>.
+ */
+ public static final long EXP_BIT_MASK = 0x7FF0000000000000L;
+
+ /**
+ * Bit mask to isolate the significand field of a
+ * <code>double</code>.
+ */
+ public static final long SIGNIF_BIT_MASK = 0x000FFFFFFFFFFFFFL;
+
+ static {
+ // verify bit masks cover all bit positions and that the bit
+ // masks are non-overlapping
+ assert(((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0L) &&
+ (((SIGN_BIT_MASK & EXP_BIT_MASK) == 0L) &&
+ ((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0L) &&
+ ((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0L)));
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/misc/FloatConsts.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/misc/FloatConsts.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/misc/FloatConsts.java 2007-05-13 17:11:27 UTC (rev 3200)
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.misc;
+
+/**
+ * This class contains additional constants documenting limits of the
+ * <code>float</code> type.
+ *
+ * @author Joseph D. Darcy
+ * @version 1.7, 05/05/07
+ */
+
+public class FloatConsts {
+ /**
+ * Don't let anyone instantiate this class.
+ */
+ private FloatConsts() {}
+
+ public static final float POSITIVE_INFINITY = java.lang.Float.POSITIVE_INFINITY;
+ public static final float NEGATIVE_INFINITY = java.lang.Float.NEGATIVE_INFINITY;
+ public static final float NaN = java.lang.Float.NaN;
+ public static final float MAX_VALUE = java.lang.Float.MAX_VALUE;
+ public static final float MIN_VALUE = java.lang.Float.MIN_VALUE;
+
+ /**
+ * A constant holding the smallest positive normal value of type
+ * <code>float</code>, 2<sup>-126</sup>. It is equal to the value
+ * returned by <code>Float.intBitsToFloat(0x00800000)</code>.
+ */
+ public static final float MIN_NORMAL = 1.17549435E-38f;
+
+ /**
+ * The number of logical bits in the significand of a
+ * <code>float</code> number, including the implicit bit.
+ */
+ public static final int SIGNIFICAND_WIDTH = 24;
+
+ /**
+ * Maximum exponent a finite <code>float</code> number may have.
+ * It is equal to the value returned by
+ * <code>Math.ilogb(Float.MAX_VALUE)</code>.
+ */
+ public static final int MAX_EXPONENT = 127;
+
+ /**
+ * Minimum exponent a normalized <code>float</code> number may
+ * have. It is equal to the value returned by
+ * <code>Math.ilogb(Float.MIN_NORMAL)</code>.
+ */
+ public static final int MIN_EXPONENT = -126;
+
+ /**
+ * The exponent the smallest positive <code>float</code> subnormal
+ * value would have if it could be normalized. It is equal to the
+ * value returned by <code>FpUtils.ilogb(Float.MIN_VALUE)</code>.
+ */
+ public static final int MIN_SUB_EXPONENT = MIN_EXPONENT -
+ (SIGNIFICAND_WIDTH - 1);
+
+ /**
+ * Bias used in representing a <code>float</code> exponent.
+ */
+ public static final int EXP_BIAS = 127;
+
+ /**
+ * Bit mask to isolate the sign bit of a <code>float</code>.
+ */
+ public static final int SIGN_BIT_MASK = 0x80000000;
+
+ /**
+ * Bit mask to isolate the exponent field of a
+ * <code>float</code>.
+ */
+ public static final int EXP_BIT_MASK = 0x7F800000;
+
+ /**
+ * Bit mask to isolate the significand field of a
+ * <code>float</code>.
+ */
+ public static final int SIGNIF_BIT_MASK = 0x007FFFFF;
+
+ static {
+ // verify bit masks cover all bit positions and that the bit
+ // masks are non-overlapping
+ assert(((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0) &&
+ (((SIGN_BIT_MASK & EXP_BIT_MASK) == 0) &&
+ ((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0) &&
+ ((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0)));
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/misc/FloatingDecimal.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/misc/FloatingDecimal.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/misc/FloatingDecimal.java 2007-05-13 17:11:27 UTC (rev 3200)
@@ -0,0 +1,2876 @@
+/*
+ * Copyright 1996-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.misc;
+
+import sun.misc.FpUtils;
+import sun.misc.DoubleConsts;
+import sun.misc.FloatConsts;
+import java.util.regex.*;
+
+public class FloatingDecimal{
+ boolean isExceptional;
+ boolean isNegative;
+ int decExponent;
+ char digits[];
+ int nDigits;
+ int bigIntExp;
+ int bigIntNBits;
+ boolean mustSetRoundDir = false;
+ boolean fromHex = false;
+ int roundDir = 0; // set by doubleValue
+
+ private FloatingDecimal( boolean negSign, int decExponent, char []digits, int n, boolean e )
+ {
+ isNegative = negSign;
+ isExceptional = e;
+ this.decExponent = decExponent;
+ this.digits = digits;
+ this.nDigits = n;
+ }
+
+ /*
+ * Constants of the implementation
+ * Most are IEEE-754 related.
+ * (There are more really boring constants at the end.)
+ */
+ static final long signMask = 0x8000000000000000L;
+ static final long expMask = 0x7ff0000000000000L;
+ static final long fractMask= ~(signMask|expMask);
+ static final int expShift = 52;
+ static final int expBias = 1023;
+ static final long fractHOB = ( 1L<<expShift ); // assumed High-Order bit
+ static final long expOne = ((long)expBias)<<expShift; // exponent of 1.0
+ static final int maxSmallBinExp = 62;
+ static final int minSmallBinExp = -( 63 / 3 );
+ static final int maxDecimalDigits = 15;
+ static final int maxDecimalExponent = 308;
+ static final int minDecimalExponent = -324;
+ static final int bigDecimalExponent = 324; // i.e. abs(minDecimalExponent)
+
+ static final long highbyte = 0xff00000000000000L;
+ static final long highbit = 0x8000000000000000L;
+ static final long lowbytes = ~highbyte;
+
+ static final int singleSignMask = 0x80000000;
+ static final int singleExpMask = 0x7f800000;
+ static final int singleFractMask = ~(singleSignMask|singleExpMask);
+ static final int singleExpShift = 23;
+ static final int singleFractHOB = 1<<singleExpShift;
+ static final int singleExpBias = 127;
+ static final int singleMaxDecimalDigits = 7;
+ static final int singleMaxDecimalExponent = 38;
+ static final int singleMinDecimalExponent = -45;
+
+ static final int intDecimalDigits = 9;
+
+
+ /*
+ * count number of bits from high-order 1 bit to low-order 1 bit,
+ * inclusive.
+ */
+ private static int
+ countBits( long v ){
+ //
+ // the strategy is to shift until we get a non-zero sign bit
+ // then shift until we have no bits left, counting the difference.
+ // we do byte shifting as a hack. Hope it helps.
+ //
+ if ( v == 0L ) return 0;
+
+ while ( ( v & highbyte ) == 0L ){
+ v <<= 8;
+ }
+ while ( v > 0L ) { // i.e. while ((v&highbit) == 0L )
+ v <<= 1;
+ }
+
+ int n = 0;
+ while (( v & lowbytes ) != 0L ){
+ v <<= 8;
+ n += 8;
+ }
+ while ( v != 0L ){
+ v <<= 1;
+ n += 1;
+ }
+ return n;
+ }
+
+ /*
+ * Keep big powers of 5 handy for future reference.
+ */
+ private static FDBigInt b5p[];
+
+ private static synchronized FDBigInt
+ big5pow( int p ){
+ assert p >= 0 : p; // negative power of 5
+ if ( b5p == null ){
+ b5p = new FDBigInt[ p+1 ];
+ }else if (b5p.length <= p ){
+ FDBigInt t[] = new FDBigInt[ p+1 ];
+ System.arraycopy( b5p, 0, t, 0, b5p.length );
+ b5p = t;
+ }
+ if ( b5p[p] != null )
+ return b5p[p];
+ else if ( p < small5pow.length )
+ return b5p[p] = new FDBigInt( small5pow[p] );
+ else if ( p < long5pow.length )
+ return b5p[p] = new FDBigInt( long5pow[p] );
+ else {
+ // construct the value.
+ // recursively.
+ int q, r;
+ // in order to compute 5^p,
+ // compute its square root, 5^(p/2) and square.
+ // or, let q = p / 2, r = p -q, then
+ // 5^p = 5^(q+r) = 5^q * 5^r
+ q = p >> 1;
+ r = p - q;
+ FDBigInt bigq = b5p[q];
+ if ( bigq == null )
+ bigq = big5pow ( q );
+ if ( r < small5pow.length ){
+ return (b5p[p] = bigq.mult( small5pow[r] ) );
+ }else{
+ FDBigInt bigr = b5p[ r ];
+ if ( bigr == null )
+ bigr = big5pow( r );
+ return (b5p[p] = bigq.mult( bigr ) );
+ }
+ }
+ }
+
+ //
+ // a common operation
+ //
+ private static FDBigInt
+ multPow52( FDBigInt v, int p5, int p2 ){
+ if ( p5 != 0 ){
+ if ( p5 < small5pow.length ){
+ v = v.mult( small5pow[p5] );
+ } else {
+ v = v.mult( big5pow( p5 ) );
+ }
+ }
+ if ( p2 != 0 ){
+ v.lshiftMe( p2 );
+ }
+ return v;
+ }
+
+ //
+ // another common operation
+ //
+ private static FDBigInt
+ constructPow52( int p5, int p2 ){
+ FDBigInt v = new FDBigInt( big5pow( p5 ) );
+ if ( p2 != 0 ){
+ v.lshiftMe( p2 );
+ }
+ return v;
+ }
+
+ /*
+ * Make a floating double into a FDBigInt.
+ * This could also be structured as a FDBigInt
+ * constructor, but we'd have to build a lot of knowledge
+ * about floating-point representation into it, and we don't want to.
+ *
+ * AS A SIDE EFFECT, THIS METHOD WILL SET THE INSTANCE VARIABLES
+ * bigIntExp and bigIntNBits
+ *
+ */
+ private FDBigInt
+ doubleToBigInt( double dval ){
+ long lbits = Double.doubleToLongBits( dval ) & ~signMask;
+ int binexp = (int)(lbits >>> expShift);
+ lbits &= fractMask;
+ if ( binexp > 0 ){
+ lbits |= fractHOB;
+ } else {
+ assert lbits != 0L : lbits; // doubleToBigInt(0.0)
+ binexp +=1;
+ while ( (lbits & fractHOB ) == 0L){
+ lbits <<= 1;
+ binexp -= 1;
+ }
+ }
+ binexp -= expBias;
+ int nbits = countBits( lbits );
+ /*
+ * We now know where the high-order 1 bit is,
+ * and we know how many there are.
+ */
+ int lowOrderZeros = expShift+1-nbits;
+ lbits >>>= lowOrderZeros;
+
+ bigIntExp = binexp+1-nbits;
+ bigIntNBits = nbits;
+ return new FDBigInt( lbits );
+ }
+
+ /*
+ * Compute a number that is the ULP of the given value,
+ * for purposes of addition/subtraction. Generally easy.
+ * More difficult if subtracting and the argument
+ * is a normalized a power of 2, as the ULP changes at these points.
+ */
+ private static double
+ ulp( double dval, boolean subtracting ){
+ long lbits = Double.doubleToLongBits( dval ) & ~signMask;
+ int binexp = (int)(lbits >>> expShift);
+ double ulpval;
+ if ( subtracting && ( binexp >= expShift ) && ((lbits&fractMask) == 0L) ){
+ // for subtraction from normalized, powers of 2,
+ // use next-smaller exponent
+ binexp -= 1;
+ }
+ if ( binexp > expShift ){
+ ulpval = Double.longBitsToDouble( ((long)(binexp-expShift))<<expShift );
+ } else if ( binexp == 0 ){
+ ulpval = Double.MIN_VALUE;
+ } else {
+ ulpval = Double.longBitsToDouble( 1L<<(binexp-1) );
+ }
+ if ( subtracting ) ulpval = - ulpval;
+
+ return ulpval;
+ }
+
+ /*
+ * Round a double to a float.
+ * In addition to the fraction bits of the double,
+ * look at the class instance variable roundDir,
+ * which should help us avoid double-rounding error.
+ * roundDir was set in hardValueOf if the estimate was
+ * close enough, but not exact. It tells us which direction
+ * of rounding is preferred.
+ */
+ float
+ stickyRound( double dval ){
+ long lbits = Double.doubleToLongBits( dval );
+ long binexp = lbits & expMask;
+ if ( binexp == 0L || binexp == expMask ){
+ // what we have here is special.
+ // don't worry, the right thing will happen.
+ return (float) dval;
+ }
+ lbits += (long)roundDir; // hack-o-matic.
+ return (float)Double.longBitsToDouble( lbits );
+ }
+
+
+ /*
+ * This is the easy subcase --
+ * all the significant bits, after scaling, are held in lvalue.
+ * negSign and decExponent tell us what processing and scaling
+ * has already been done. Exceptional cases have already been
+ * stripped out.
+ * In particular:
+ * lvalue is a finite number (not Inf, nor NaN)
+ * lvalue > 0L (not zero, nor negative).
+ *
+ * The only reason that we develop the digits here, rather than
+ * calling on Long.toString() is that we can do it a little faster,
+ * and besides want to treat trailing 0s specially. If Long.toString
+ * changes, we should re-evaluate this strategy!
+ */
+ private void
+ developLongDigits( int decExponent, long lvalue, long insignificant ){
+ char digits[];
+ int ndigits;
+ int digitno;
+ int c;
+ //
+ // Discard non-significant low-order bits, while rounding,
+ // up to insignificant value.
+ int i;
+ for ( i = 0; insignificant >= 10L; i++ )
+ insignificant /= 10L;
+ if ( i != 0 ){
+ long pow10 = long5pow[i] << i; // 10^i == 5^i * 2^i;
+ long residue = lvalue % pow10;
+ lvalue /= pow10;
+ decExponent += i;
+ if ( residue >= (pow10>>1) ){
+ // round up based on the low-order bits we're discarding
+ lvalue++;
+ }
+ }
+ if ( lvalue <= Integer.MAX_VALUE ){
+ assert lvalue > 0L : lvalue; // lvalue <= 0
+ // even easier subcase!
+ // can do int arithmetic rather than long!
+ int ivalue = (int)lvalue;
+ ndigits = 10;
+ digits = (char[])(perThreadBuffer.get());
+ digitno = ndigits-1;
+ c = ivalue%10;
+ ivalue /= 10;
+ while ( c == 0 ){
+ decExponent++;
+ c = ivalue%10;
+ ivalue /= 10;
+ }
+ while ( ivalue != 0){
+ digits[digitno--] = (char)(c+'0');
+ decExponent++;
+ c = ivalue%10;
+ ivalue /= 10;
+ }
+ digits[digitno] = (char)(c+'0');
+ } else {
+ // same algorithm as above (same bugs, too )
+ // but using long arithmetic.
+ ndigits = 20;
+ digits = (char[])(perThreadBuffer.get());
+ digitno = ndigits-1;
+ c = (int)(lvalue%10L);
+ lvalue /= 10L;
+ while ( c == 0 ){
+ decExponent++;
+ c = (int)(lvalue%10L);
+ lvalue /= 10L;
+ }
+ while ( lvalue != 0L ){
+ digits[digitno--] = (char)(c+'0');
+ decExponent++;
+ c = (int)(lvalue%10L);
+ lvalue /= 10;
+ }
+ digits[digitno] = (char)(c+'0');
+ }
+ char result [];
+ ndigits -= digitno;
+ result = new char[ ndigits ];
+ System.arraycopy( digits, digitno, result, 0, ndigits );
+ this.digits = result;
+ this.decExponent = decExponent+1;
+ this.nDigits = ndigits;
+ }
+
+ //
+ // add one to the least significant digit.
+ // in the unlikely event there is a carry out,
+ // deal with it.
+ // assert that this will only happen where there
+ // is only one digit, e.g. (float)1e-44 seems to do it.
+ //
+ private void
+ roundup(){
+ int i;
+ int q = digits[ i = (nDigits-1)];
+ if ( q == '9' ){
+ while ( q == '9' && i > 0 ){
+ digits[i] = '0';
+ q = digits[--i];
+ }
+ if ( q == '9' ){
+ // carryout! High-order 1, rest 0s, larger exp.
+ decExponent += 1;
+ digits[0] = '1';
+ return;
+ }
+ // else fall through.
+ }
+ digits[i] = (char)(q+1);
+ }
+
+ /*
+ * FIRST IMPORTANT CONSTRUCTOR: DOUBLE
+ */
+ public FloatingDecimal( double d )
+ {
+ long dBits = Double.doubleToLongBits( d );
+ long fractBits;
+ int binExp;
+ int nSignificantBits;
+
+ // discover and delete sign
+ if ( (dBits&signMask) != 0 ){
+ isNegative = true;
+ dBits ^= signMask;
+ } else {
+ isNegative = false;
+ }
+ // Begin to unpack
+ // Discover obvious special cases of NaN and Infinity.
+ binExp = (int)( (dBits&expMask) >> expShift );
+ fractBits = dBits&fractMask;
+ if ( binExp == (int)(expMask>>expShift) ) {
+ isExceptional = true;
+ if ( fractBits == 0L ){
+ digits = infinity;
+ } else {
+ digits = notANumber;
+ isNegative = false; // NaN has no sign!
+ }
+ nDigits = digits.length;
+ return;
+ }
+ isExceptional = false;
+ // Finish unpacking
+ // Normalize denormalized numbers.
+ // Insert assumed high-order bit for normalized numbers.
+ // Subtract exponent bias.
+ if ( binExp == 0 ){
+ if ( fractBits == 0L ){
+ // not a denorm, just a 0!
+ decExponent = 0;
+ digits = zero;
+ nDigits = 1;
+ return;
+ }
+ while ( (fractBits&fractHOB) == 0L ){
+ fractBits <<= 1;
+ binExp -= 1;
+ }
+ nSignificantBits = expShift + binExp +1; // recall binExp is - shift count.
+ binExp += 1;
+ } else {
+ fractBits |= fractHOB;
+ nSignificantBits = expShift+1;
+ }
+ binExp -= expBias;
+ // call the routine that actually does all the hard work.
+ dtoa( binExp, fractBits, nSignificantBits );
+ }
+
+ /*
+ * SECOND IMPORTANT CONSTRUCTOR: SINGLE
+ */
+ public FloatingDecimal( float f )
+ {
+ int fBits = Float.floatToIntBits( f );
+ int fractBits;
+ int binExp;
+ int nSignificantBits;
+
+ // discover and delete sign
+ if ( (fBits&singleSignMask) != 0 ){
+ isNegative = true;
+ fBits ^= singleSignMask;
+ } else {
+ isNegative = false;
+ }
+ // Begin to unpack
+ // Discover obvious special cases of NaN and Infinity.
+ binExp = (int)( (fBits&singleExpMask) >> singleExpShift );
+ fractBits = fBits&singleFractMask;
+ if ( binExp == (int)(singleExpMask>>singleExpShift) ) {
+ isExceptional = true;
+ if ( fractBits == 0L ){
+ digits = infinity;
+ } else {
+ digits = notANumber;
+ isNegative = false; // NaN has no sign!
+ }
+ nDigits = digits.length;
+ return;
+ }
+ isExceptional = false;
+ // Finish unpacking
+ // Normalize denormalized numbers.
+ // Insert assumed high-order bit for normalized numbers.
+ // Subtract exponent bias.
+ if ( binExp == 0 ){
+ if ( fractBits == 0 ){
+ // not a denorm, just a 0!
+ decExponent = 0;
+ digits = zero;
+ nDigits = 1;
+ return;
+ }
+ while ( (fractBits&singleFractHOB) == 0 ){
+ fractBits <<= 1;
+ binExp -= 1;
+ }
+ nSignificantBits = singleExpShift + binExp +1; // recall binExp is - shift count.
+ binExp += 1;
+ } else {
+ fractBits |= singleFractHOB;
+ nSignificantBits = singleExpShift+1;
+ }
+ binExp -= singleExpBias;
+ // call the routine that actually does all the hard work.
+ dtoa( binExp, ((long)fractBits)<<(expShift-singleExpShift), nSignificantBits );
+ }
+
+ private void
+ dtoa( int binExp, long fractBits, int nSignificantBits )
+ {
+ int nFractBits; // number of significant bits of fractBits;
+ int nTinyBits; // number of these to the right of the point.
+ int decExp;
+
+ // Examine number. Determine if it is an easy case,
+ // which we can do pretty trivially using float/long conversion,
+ // or whether we must do real work.
+ nFractBits = countBits( fractBits );
+ nTinyBits = Math.max( 0, nFractBits - binExp - 1 );
+ if ( binExp <= maxSmallBinExp && binExp >= minSmallBinExp ){
+ // Look more closely at the number to decide if,
+ // with scaling by 10^nTinyBits, the result will fit in
+ // a long.
+ if ( (nTinyBits < long5pow.length) && ((nFractBits + n5bits[nTinyBits]) < 64 ) ){
+ /*
+ * We can do this:
+ * take the fraction bits, which are normalized.
+ * (a) nTinyBits == 0: Shift left or right appropriately
+ * to align the binary point at the extreme right, i.e.
+ * where a long int point is expected to be. The integer
+ * result is easily converted to a string.
+ * (b) nTinyBits > 0: Shift right by expShift-nFractBits,
+ * which effectively converts to long and scales by
+ * 2^nTinyBits. Then multiply by 5^nTinyBits to
+ * complete the scaling. We know this won't overflow
+ * because we just counted the number of bits necessary
+ * in the result. The integer you get from this can
+ * then be converted to a string pretty easily.
+ */
+ long halfULP;
+ if ( nTinyBits == 0 ) {
+ if ( binExp > nSignificantBits ){
+ halfULP = 1L << ( binExp-nSignificantBits-1);
+ } else {
+ halfULP = 0L;
+ }
+ if ( binExp >= expShift ){
+ fractBits <<= (binExp-expShift);
+ } else {
+ fractBits >>>= (expShift-binExp) ;
+ }
+ developLongDigits( 0, fractBits, halfULP );
+ return;
+ }
+ /*
+ * The following causes excess digits to be printed
+ * out in the single-float case. Our manipulation of
+ * halfULP here is apparently not correct. If we
+ * better understand how this works, perhaps we can
+ * use this special case again. But for the time being,
+ * we do not.
+ * else {
+ * fractBits >>>= expShift+1-nFractBits;
+ * fractBits *= long5pow[ nTinyBits ];
+ * halfULP = long5pow[ nTinyBits ] >> (1+nSignificantBits-nFractBits);
+ * developLongDigits( -nTinyBits, fractBits, halfULP );
+ * return;
+ * }
+ */
+ }
+ }
+ /*
+ * This is the hard case. We are going to compute large positive
+ * integers B and S and integer decExp, s.t.
+ * d = ( B / S ) * 10^decExp
+ * 1 <= B / S < 10
+ * Obvious choices are:
+ * decExp = floor( log10(d) )
+ * B = d * 2^nTinyBits * 10^max( 0, -decExp )
+ * S = 10^max( 0, decExp) * 2^nTinyBits
+ * (noting that nTinyBits has already been forced to non-negative)
+ * I am also going to compute a large positive integer
+ * M = (1/2^nSignificantBits) * 2^nTinyBits * 10^max( 0, -decExp )
+ * i.e. M is (1/2) of the ULP of d, scaled like B.
+ * When we iterate through dividing ...
[truncated message content] |
|
From: <ls...@us...> - 2007-05-17 20:40:36
|
Revision: 3221
http://jnode.svn.sourceforge.net/jnode/?rev=3221&view=rev
Author: lsantha
Date: 2007-05-17 13:40:30 -0700 (Thu, 17 May 2007)
Log Message:
-----------
Openjdk patches.
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/misc/Service.java
trunk/core/src/openjdk/sun/sun/misc/ServiceConfigurationError.java
trunk/core/src/openjdk/sun/sun/reflect/
trunk/core/src/openjdk/sun/sun/reflect/Reflection.java
trunk/core/src/openjdk/sun/sun/security/util/
trunk/core/src/openjdk/sun/sun/security/util/SecurityConstants.java
Added: trunk/core/src/openjdk/sun/sun/misc/Service.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/misc/Service.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/misc/Service.java 2007-05-17 20:40:30 UTC (rev 3221)
@@ -0,0 +1,427 @@
+/*
+ * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.misc;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.TreeSet;
+
+
+/**
+ * A simple service-provider lookup mechanism. A <i>service</i> is a
+ * well-known set of interfaces and (usually abstract) classes. A <i>service
+ * provider</i> is a specific implementation of a service. The classes in a
+ * provider typically implement the interfaces and subclass the classes defined
+ * in the service itself. Service providers may be installed in an
+ * implementation of the Java platform in the form of extensions, that is, jar
+ * files placed into any of the usual extension directories. Providers may
+ * also be made available by adding them to the applet or application class
+ * path or by some other platform-specific means.
+ *
+ * <p> In this lookup mechanism a service is represented by an interface or an
+ * abstract class. (A concrete class may be used, but this is not
+ * recommended.) A provider of a given service contains one or more concrete
+ * classes that extend this <i>service class</i> with data and code specific to
+ * the provider. This <i>provider class</i> will typically not be the entire
+ * provider itself but rather a proxy that contains enough information to
+ * decide whether the provider is able to satisfy a particular request together
+ * with code that can create the actual provider on demand. The details of
+ * provider classes tend to be highly service-specific; no single class or
+ * interface could possibly unify them, so no such class has been defined. The
+ * only requirement enforced here is that provider classes must have a
+ * zero-argument constructor so that they may be instantiated during lookup.
+ *
+ * <p> A service provider identifies itself by placing a provider-configuration
+ * file in the resource directory <tt>META-INF/services</tt>. The file's name
+ * should consist of the fully-qualified name of the abstract service class.
+ * The file should contain a list of fully-qualified concrete provider-class
+ * names, one per line. Space and tab characters surrounding each name, as
+ * well as blank lines, are ignored. The comment character is <tt>'#'</tt>
+ * (<tt>0x23</tt>); on each line all characters following the first comment
+ * character are ignored. The file must be encoded in UTF-8.
+ *
+ * <p> If a particular concrete provider class is named in more than one
+ * configuration file, or is named in the same configuration file more than
+ * once, then the duplicates will be ignored. The configuration file naming a
+ * particular provider need not be in the same jar file or other distribution
+ * unit as the provider itself. The provider must be accessible from the same
+ * class loader that was initially queried to locate the configuration file;
+ * note that this is not necessarily the class loader that found the file.
+ *
+ * <p> <b>Example:</b> Suppose we have a service class named
+ * <tt>java.io.spi.CharCodec</tt>. It has two abstract methods:
+ *
+ * <pre>
+ * public abstract CharEncoder getEncoder(String encodingName);
+ * public abstract CharDecoder getDecoder(String encodingName);
+ * </pre>
+ *
+ * Each method returns an appropriate object or <tt>null</tt> if it cannot
+ * translate the given encoding. Typical <tt>CharCodec</tt> providers will
+ * support more than one encoding.
+ *
+ * <p> If <tt>sun.io.StandardCodec</tt> is a provider of the <tt>CharCodec</tt>
+ * service then its jar file would contain the file
+ * <tt>META-INF/services/java.io.spi.CharCodec</tt>. This file would contain
+ * the single line:
+ *
+ * <pre>
+ * sun.io.StandardCodec # Standard codecs for the platform
+ * </pre>
+ *
+ * To locate an encoder for a given encoding name, the internal I/O code would
+ * do something like this:
+ *
+ * <pre>
+ * CharEncoder getEncoder(String encodingName) {
+ * Iterator ps = Service.providers(CharCodec.class);
+ * while (ps.hasNext()) {
+ * CharCodec cc = (CharCodec)ps.next();
+ * CharEncoder ce = cc.getEncoder(encodingName);
+ * if (ce != null)
+ * return ce;
+ * }
+ * return null;
+ * }
+ * </pre>
+ *
+ * The provider-lookup mechanism always executes in the security context of the
+ * caller. Trusted system code should typically invoke the methods in this
+ * class from within a privileged security context.
+ *
+ * @author Mark Reinhold
+ * @version 1.18, 07/05/05
+ * @since 1.3
+ */
+
+public final class Service {
+
+ private static final String prefix = "META-INF/services/";
+
+ private Service() { }
+
+ private static void fail(Class service, String msg, Throwable cause)
+ throws ServiceConfigurationError
+ {
+ ServiceConfigurationError sce
+ = new ServiceConfigurationError(service.getName() + ": " + msg);
+ sce.initCause(cause);
+ throw sce;
+ }
+
+ private static void fail(Class service, String msg)
+ throws ServiceConfigurationError
+ {
+ throw new ServiceConfigurationError(service.getName() + ": " + msg);
+ }
+
+ private static void fail(Class service, URL u, int line, String msg)
+ throws ServiceConfigurationError
+ {
+ fail(service, u + ":" + line + ": " + msg);
+ }
+
+ /**
+ * Parse a single line from the given configuration file, adding the name
+ * on the line to both the names list and the returned set iff the name is
+ * not already a member of the returned set.
+ */
+ private static int parseLine(Class service, URL u, BufferedReader r, int lc,
+ List names, Set returned)
+ throws IOException, ServiceConfigurationError
+ {
+ String ln = r.readLine();
+ if (ln == null) {
+ return -1;
+ }
+ int ci = ln.indexOf('#');
+ if (ci >= 0) ln = ln.substring(0, ci);
+ ln = ln.trim();
+ int n = ln.length();
+ if (n != 0) {
+ if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0))
+ fail(service, u, lc, "Illegal configuration-file syntax");
+ int cp = ln.codePointAt(0);
+ if (!Character.isJavaIdentifierStart(cp))
+ fail(service, u, lc, "Illegal provider-class name: " + ln);
+ for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
+ cp = ln.codePointAt(i);
+ if (!Character.isJavaIdentifierPart(cp) && (cp != '.'))
+ fail(service, u, lc, "Illegal provider-class name: " + ln);
+ }
+ if (!returned.contains(ln)) {
+ names.add(ln);
+ returned.add(ln);
+ }
+ }
+ return lc + 1;
+ }
+
+ /**
+ * Parse the content of the given URL as a provider-configuration file.
+ *
+ * @param service
+ * The service class for which providers are being sought;
+ * used to construct error detail strings
+ *
+ * @param url
+ * The URL naming the configuration file to be parsed
+ *
+ * @param returned
+ * A Set containing the names of provider classes that have already
+ * been returned. This set will be updated to contain the names
+ * that will be yielded from the returned <tt>Iterator</tt>.
+ *
+ * @return A (possibly empty) <tt>Iterator</tt> that will yield the
+ * provider-class names in the given configuration file that are
+ * not yet members of the returned set
+ *
+ * @throws ServiceConfigurationError
+ * If an I/O error occurs while reading from the given URL, or
+ * if a configuration-file format error is detected
+ */
+ private static Iterator parse(Class service, URL u, Set returned)
+ throws ServiceConfigurationError
+ {
+ InputStream in = null;
+ BufferedReader r = null;
+ ArrayList names = new ArrayList();
+ try {
+ in = u.openStream();
+ r = new BufferedReader(new InputStreamReader(in, "utf-8"));
+ int lc = 1;
+ while ((lc = parseLine(service, u, r, lc, names, returned)) >= 0);
+ } catch (IOException x) {
+ fail(service, ": " + x);
+ } finally {
+ try {
+ if (r != null) r.close();
+ if (in != null) in.close();
+ } catch (IOException y) {
+ fail(service, ": " + y);
+ }
+ }
+ return names.iterator();
+ }
+
+
+ /**
+ * Private inner class implementing fully-lazy provider lookup
+ */
+ private static class LazyIterator implements Iterator {
+
+ Class service;
+ ClassLoader loader;
+ Enumeration configs = null;
+ Iterator pending = null;
+ Set returned = new TreeSet();
+ String nextName = null;
+
+ private LazyIterator(Class service, ClassLoader loader) {
+ this.service = service;
+ this.loader = loader;
+ }
+
+ public boolean hasNext() throws ServiceConfigurationError {
+ if (nextName != null) {
+ return true;
+ }
+ if (configs == null) {
+ try {
+ String fullName = prefix + service.getName();
+ if (loader == null)
+ configs = ClassLoader.getSystemResources(fullName);
+ else
+ configs = loader.getResources(fullName);
+ } catch (IOException x) {
+ fail(service, ": " + x);
+ }
+ }
+ while ((pending == null) || !pending.hasNext()) {
+ if (!configs.hasMoreElements()) {
+ return false;
+ }
+ pending = parse(service, (URL)configs.nextElement(), returned);
+ }
+ nextName = (String)pending.next();
+ return true;
+ }
+
+ public Object next() throws ServiceConfigurationError {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+ String cn = nextName;
+ nextName = null;
+ try {
+ return Class.forName(cn, true, loader).newInstance();
+ } catch (ClassNotFoundException x) {
+ fail(service,
+ "Provider " + cn + " not found");
+ } catch (Exception x) {
+ fail(service,
+ "Provider " + cn + " could not be instantiated: " + x,
+ x);
+ }
+ return null; /* This cannot happen */
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+
+ }
+
+
+ /**
+ * Locates and incrementally instantiates the available providers of a
+ * given service using the given class loader.
+ *
+ * <p> This method transforms the name of the given service class into a
+ * provider-configuration filename as described above and then uses the
+ * <tt>getResources</tt> method of the given class loader to find all
+ * available files with that name. These files are then read and parsed to
+ * produce a list of provider-class names. The iterator that is returned
+ * uses the given class loader to lookup and then instantiate each element
+ * of the list.
+ *
+ * <p> Because it is possible for extensions to be installed into a running
+ * Java virtual machine, this method may return different results each time
+ * it is invoked. <p>
+ *
+ * @param service
+ * The service's abstract service class
+ *
+ * @param loader
+ * The class loader to be used to load provider-configuration files
+ * and instantiate provider classes, or <tt>null</tt> if the system
+ * class loader (or, failing that the bootstrap class loader) is to
+ * be used
+ *
+ * @return An <tt>Iterator</tt> that yields provider objects for the given
+ * service, in some arbitrary order. The iterator will throw a
+ * <tt>ServiceConfigurationError</tt> if a provider-configuration
+ * file violates the specified format or if a provider class cannot
+ * be found and instantiated.
+ *
+ * @throws ServiceConfigurationError
+ * If a provider-configuration file violates the specified format
+ * or names a provider class that cannot be found and instantiated
+ *
+ * @see #providers(java.lang.Class)
+ * @see #installedProviders(java.lang.Class)
+ */
+ public static Iterator providers(Class service, ClassLoader loader)
+ throws ServiceConfigurationError
+ {
+ return new LazyIterator(service, loader);
+ }
+
+
+ /**
+ * Locates and incrementally instantiates the available providers of a
+ * given service using the context class loader. This convenience method
+ * is equivalent to
+ *
+ * <pre>
+ * ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ * return Service.providers(service, cl);
+ * </pre>
+ *
+ * @param service
+ * The service's abstract service class
+ *
+ * @return An <tt>Iterator</tt> that yields provider objects for the given
+ * service, in some arbitrary order. The iterator will throw a
+ * <tt>ServiceConfigurationError</tt> if a provider-configuration
+ * file violates the specified format or if a provider class cannot
+ * be found and instantiated.
+ *
+ * @throws ServiceConfigurationError
+ * If a provider-configuration file violates the specified format
+ * or names a provider class that cannot be found and instantiated
+ *
+ * @see #providers(java.lang.Class, java.lang.ClassLoader)
+ */
+ public static Iterator providers(Class service)
+ throws ServiceConfigurationError
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ return Service.providers(service, cl);
+ }
+
+
+ /**
+ * Locates and incrementally instantiates the available providers of a
+ * given service using the extension class loader. This convenience method
+ * simply locates the extension class loader, call it
+ * <tt>extClassLoader</tt>, and then does
+ *
+ * <pre>
+ * return Service.providers(service, extClassLoader);
+ * </pre>
+ *
+ * If the extension class loader cannot be found then the system class
+ * loader is used; if there is no system class loader then the bootstrap
+ * class loader is used.
+ *
+ * @param service
+ * The service's abstract service class
+ *
+ * @return An <tt>Iterator</tt> that yields provider objects for the given
+ * service, in some arbitrary order. The iterator will throw a
+ * <tt>ServiceConfigurationError</tt> if a provider-configuration
+ * file violates the specified format or if a provider class cannot
+ * be found and instantiated.
+ *
+ * @throws ServiceConfigurationError
+ * If a provider-configuration file violates the specified format
+ * or names a provider class that cannot be found and instantiated
+ *
+ * @see #providers(java.lang.Class, java.lang.ClassLoader)
+ */
+ public static Iterator installedProviders(Class service)
+ throws ServiceConfigurationError
+ {
+ ClassLoader cl = ClassLoader.getSystemClassLoader();
+ ClassLoader prev = null;
+ while (cl != null) {
+ prev = cl;
+ cl = cl.getParent();
+ }
+ return Service.providers(service, prev);
+ }
+
+}
Added: trunk/core/src/openjdk/sun/sun/misc/ServiceConfigurationError.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/misc/ServiceConfigurationError.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/misc/ServiceConfigurationError.java 2007-05-17 20:40:30 UTC (rev 3221)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 1999-2000 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.misc;
+
+
+/**
+ * Error thrown when something goes wrong while looking up service providers.
+ * In particular, this error will be thrown in the following situations:
+ *
+ * <ul>
+ * <li> A concrete provider class cannot be found,
+ * <li> A concrete provider class cannot be instantiated,
+ * <li> The format of a provider-configuration file is illegal, or
+ * <li> An IOException occurs while reading a provider-configuration file.
+ * </ul>
+ *
+ * @author Mark Reinhold
+ * @version 1.14, 07/05/05
+ * @since 1.3
+ */
+
+public class ServiceConfigurationError extends Error {
+
+ /**
+ * Constructs a new instance with the specified detail string.
+ */
+ public ServiceConfigurationError(String msg) {
+ super(msg);
+ }
+
+ /**
+ * Constructs a new instance that wraps the specified throwable.
+ */
+ public ServiceConfigurationError(Throwable x) {
+ super(x);
+ }
+
+}
Added: trunk/core/src/openjdk/sun/sun/reflect/Reflection.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/reflect/Reflection.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/reflect/Reflection.java 2007-05-17 20:40:30 UTC (rev 3221)
@@ -0,0 +1,325 @@
+/*
+ * Copyright 2001-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.reflect;
+
+import java.lang.reflect.*;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Common utility routines used by both java.lang and
+ java.lang.reflect */
+
+public class Reflection {
+
+ /** Used to filter out fields and methods from certain classes from public
+ view, where they are sensitive or they may contain VM-internal objects.
+ These Maps are updated very rarely. Rather than synchronize on
+ each access, we use copy-on-write */
+ private static volatile Map<Class,String[]> fieldFilterMap;
+ private static volatile Map<Class,String[]> methodFilterMap;
+
+ static {
+ Map<Class,String[]> map = new HashMap<Class,String[]>();
+ map.put(Reflection.class,
+ new String[] {"fieldFilterMap", "methodFilterMap"});
+ map.put(System.class, new String[] {"security"});
+ fieldFilterMap = map;
+
+ methodFilterMap = new HashMap<Class,String[]>();
+ }
+
+ /** Returns the class of the method <code>realFramesToSkip</code>
+ frames up the stack (zero-based), ignoring frames associated
+ with java.lang.reflect.Method.invoke() and its implementation.
+ The first frame is that associated with this method, so
+ <code>getCallerClass(0)</code> returns the Class object for
+ sun.reflect.Reflection. Frames associated with
+ java.lang.reflect.Method.invoke() and its implementation are
+ completely ignored and do not count toward the number of "real"
+ frames skipped. */
+ public static native Class getCallerClass(int realFramesToSkip);
+
+ /** Retrieves the access flags written to the class file. For
+ inner classes these flags may differ from those returned by
+ Class.getModifiers(), which searches the InnerClasses
+ attribute to find the source-level access flags. This is used
+ instead of Class.getModifiers() for run-time access checks due
+ to compatibility reasons; see 4471811. Only the values of the
+ low 13 bits (i.e., a mask of 0x1FFF) are guaranteed to be
+ valid. */
+ private static native int getClassAccessFlags(Class c);
+
+ /** A quick "fast-path" check to try to avoid getCallerClass()
+ calls. */
+ public static boolean quickCheckMemberAccess(Class memberClass,
+ int modifiers)
+ {
+ return Modifier.isPublic(getClassAccessFlags(memberClass) & modifiers);
+ }
+
+ public static void ensureMemberAccess(Class currentClass,
+ Class memberClass,
+ Object target,
+ int modifiers)
+ throws IllegalAccessException
+ {
+ if (currentClass == null || memberClass == null) {
+ throw new InternalError();
+ }
+
+ if (!verifyMemberAccess(currentClass, memberClass, target, modifiers)) {
+ throw new IllegalAccessException("Class " + currentClass.getName() +
+ " can not access a member of class " +
+ memberClass.getName() +
+ " with modifiers \"" +
+ Modifier.toString(modifiers) +
+ "\"");
+ }
+ }
+
+ public static boolean verifyMemberAccess(Class currentClass,
+ // Declaring class of field
+ // or method
+ Class memberClass,
+ // May be NULL in case of statics
+ Object target,
+ int modifiers)
+ {
+ // Verify that currentClass can access a field, method, or
+ // constructor of memberClass, where that member's access bits are
+ // "modifiers".
+
+ boolean gotIsSameClassPackage = false;
+ boolean isSameClassPackage = false;
+
+ if (currentClass == memberClass) {
+ // Always succeeds
+ return true;
+ }
+
+ if (!Modifier.isPublic(getClassAccessFlags(memberClass))) {
+ isSameClassPackage = isSameClassPackage(currentClass, memberClass);
+ gotIsSameClassPackage = true;
+ if (!isSameClassPackage) {
+ return false;
+ }
+ }
+
+ // At this point we know that currentClass can access memberClass.
+
+ if (Modifier.isPublic(modifiers)) {
+ return true;
+ }
+
+ boolean successSoFar = false;
+
+ if (Modifier.isProtected(modifiers)) {
+ // See if currentClass is a subclass of memberClass
+ if (isSubclassOf(currentClass, memberClass)) {
+ successSoFar = true;
+ }
+ }
+
+ if (!successSoFar && !Modifier.isPrivate(modifiers)) {
+ if (!gotIsSameClassPackage) {
+ isSameClassPackage = isSameClassPackage(currentClass,
+ memberClass);
+ gotIsSameClassPackage = true;
+ }
+
+ if (isSameClassPackage) {
+ successSoFar = true;
+ }
+ }
+
+ if (!successSoFar) {
+ return false;
+ }
+
+ if (Modifier.isProtected(modifiers)) {
+ // Additional test for protected members: JLS 6.6.2
+ Class targetClass = (target == null ? memberClass : target.getClass());
+ if (targetClass != currentClass) {
+ if (!gotIsSameClassPackage) {
+ isSameClassPackage = isSameClassPackage(currentClass, memberClass);
+ gotIsSameClassPackage = true;
+ }
+ if (!isSameClassPackage) {
+ if (!isSubclassOf(targetClass, currentClass)) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+
+ private static boolean isSameClassPackage(Class c1, Class c2) {
+ return isSameClassPackage(c1.getClassLoader(), c1.getName(),
+ c2.getClassLoader(), c2.getName());
+ }
+
+ /** Returns true if two classes are in the same package; classloader
+ and classname information is enough to determine a class's package */
+ private static boolean isSameClassPackage(ClassLoader loader1, String name1,
+ ClassLoader loader2, String name2)
+ {
+ if (loader1 != loader2) {
+ return false;
+ } else {
+ int lastDot1 = name1.lastIndexOf('.');
+ int lastDot2 = name2.lastIndexOf('.');
+ if ((lastDot1 == -1) || (lastDot2 == -1)) {
+ // One of the two doesn't have a package. Only return true
+ // if the other one also doesn't have a package.
+ return (lastDot1 == lastDot2);
+ } else {
+ int idx1 = 0;
+ int idx2 = 0;
+
+ // Skip over '['s
+ if (name1.charAt(idx1) == '[') {
+ do {
+ idx1++;
+ } while (name1.charAt(idx1) == '[');
+ if (name1.charAt(idx1) != 'L') {
+ // Something is terribly wrong. Shouldn't be here.
+ throw new InternalError("Illegal class name " + name1);
+ }
+ }
+ if (name2.charAt(idx2) == '[') {
+ do {
+ idx2++;
+ } while (name2.charAt(idx2) == '[');
+ if (name2.charAt(idx2) != 'L') {
+ // Something is terribly wrong. Shouldn't be here.
+ throw new InternalError("Illegal class name " + name2);
+ }
+ }
+
+ // Check that package part is identical
+ int length1 = lastDot1 - idx1;
+ int length2 = lastDot2 - idx2;
+
+ if (length1 != length2) {
+ return false;
+ }
+ return name1.regionMatches(false, idx1, name2, idx2, length1);
+ }
+ }
+ }
+
+ static boolean isSubclassOf(Class queryClass,
+ Class ofClass)
+ {
+ while (queryClass != null) {
+ if (queryClass == ofClass) {
+ return true;
+ }
+ queryClass = queryClass.getSuperclass();
+ }
+ return false;
+ }
+
+ // fieldNames must contain only interned Strings
+ public static synchronized void registerFieldsToFilter(Class containingClass,
+ ...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-10 08:42:17
|
Revision: 3232
http://jnode.svn.sourceforge.net/jnode/?rev=3232&view=rev
Author: lsantha
Date: 2007-06-10 01:42:12 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Added javap from openjdk.
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/tools/
trunk/core/src/openjdk/sun/sun/tools/asm/
trunk/core/src/openjdk/sun/sun/tools/asm/ArrayData.java
trunk/core/src/openjdk/sun/sun/tools/asm/Assembler.java
trunk/core/src/openjdk/sun/sun/tools/asm/CatchData.java
trunk/core/src/openjdk/sun/sun/tools/asm/ClassConstantData.java
trunk/core/src/openjdk/sun/sun/tools/asm/ConstantPool.java
trunk/core/src/openjdk/sun/sun/tools/asm/ConstantPoolData.java
trunk/core/src/openjdk/sun/sun/tools/asm/Cover.java
trunk/core/src/openjdk/sun/sun/tools/asm/FieldConstantData.java
trunk/core/src/openjdk/sun/sun/tools/asm/Instruction.java
trunk/core/src/openjdk/sun/sun/tools/asm/Label.java
trunk/core/src/openjdk/sun/sun/tools/asm/LocalVariable.java
trunk/core/src/openjdk/sun/sun/tools/asm/LocalVariableTable.java
trunk/core/src/openjdk/sun/sun/tools/asm/NameAndTypeConstantData.java
trunk/core/src/openjdk/sun/sun/tools/asm/NameAndTypeData.java
trunk/core/src/openjdk/sun/sun/tools/asm/NumberConstantData.java
trunk/core/src/openjdk/sun/sun/tools/asm/StringConstantData.java
trunk/core/src/openjdk/sun/sun/tools/asm/StringExpressionConstantData.java
trunk/core/src/openjdk/sun/sun/tools/asm/SwitchData.java
trunk/core/src/openjdk/sun/sun/tools/asm/TryData.java
trunk/core/src/openjdk/sun/sun/tools/java/
trunk/core/src/openjdk/sun/sun/tools/java/AmbiguousClass.java
trunk/core/src/openjdk/sun/sun/tools/java/AmbiguousMember.java
trunk/core/src/openjdk/sun/sun/tools/java/ArrayType.java
trunk/core/src/openjdk/sun/sun/tools/java/BinaryAttribute.java
trunk/core/src/openjdk/sun/sun/tools/java/BinaryClass.java
trunk/core/src/openjdk/sun/sun/tools/java/BinaryCode.java
trunk/core/src/openjdk/sun/sun/tools/java/BinaryConstantPool.java
trunk/core/src/openjdk/sun/sun/tools/java/BinaryExceptionHandler.java
trunk/core/src/openjdk/sun/sun/tools/java/BinaryMember.java
trunk/core/src/openjdk/sun/sun/tools/java/ClassDeclaration.java
trunk/core/src/openjdk/sun/sun/tools/java/ClassDefinition.java
trunk/core/src/openjdk/sun/sun/tools/java/ClassFile.java
trunk/core/src/openjdk/sun/sun/tools/java/ClassNotFound.java
trunk/core/src/openjdk/sun/sun/tools/java/ClassPath.java
trunk/core/src/openjdk/sun/sun/tools/java/ClassType.java
trunk/core/src/openjdk/sun/sun/tools/java/CompilerError.java
trunk/core/src/openjdk/sun/sun/tools/java/Constants.java
trunk/core/src/openjdk/sun/sun/tools/java/Environment.java
trunk/core/src/openjdk/sun/sun/tools/java/Identifier.java
trunk/core/src/openjdk/sun/sun/tools/java/IdentifierToken.java
trunk/core/src/openjdk/sun/sun/tools/java/Imports.java
trunk/core/src/openjdk/sun/sun/tools/java/MemberDefinition.java
trunk/core/src/openjdk/sun/sun/tools/java/MethodSet.java
trunk/core/src/openjdk/sun/sun/tools/java/MethodType.java
trunk/core/src/openjdk/sun/sun/tools/java/Package.java
trunk/core/src/openjdk/sun/sun/tools/java/Parser.java
trunk/core/src/openjdk/sun/sun/tools/java/ParserActions.java
trunk/core/src/openjdk/sun/sun/tools/java/RuntimeConstants.java
trunk/core/src/openjdk/sun/sun/tools/java/Scanner.java
trunk/core/src/openjdk/sun/sun/tools/java/ScannerInputReader.java
trunk/core/src/openjdk/sun/sun/tools/java/SyntaxError.java
trunk/core/src/openjdk/sun/sun/tools/java/Type.java
trunk/core/src/openjdk/sun/sun/tools/javac/
trunk/core/src/openjdk/sun/sun/tools/javac/BatchEnvironment.java
trunk/core/src/openjdk/sun/sun/tools/javac/BatchParser.java
trunk/core/src/openjdk/sun/sun/tools/javac/CompilerMember.java
trunk/core/src/openjdk/sun/sun/tools/javac/ErrorConsumer.java
trunk/core/src/openjdk/sun/sun/tools/javac/ErrorMessage.java
trunk/core/src/openjdk/sun/sun/tools/javac/Main.java
trunk/core/src/openjdk/sun/sun/tools/javac/SourceClass.java
trunk/core/src/openjdk/sun/sun/tools/javac/SourceMember.java
trunk/core/src/openjdk/sun/sun/tools/javac/resources/
trunk/core/src/openjdk/sun/sun/tools/javac/resources/javac.properties
trunk/core/src/openjdk/sun/sun/tools/javac/resources/javac_ja.properties
trunk/core/src/openjdk/sun/sun/tools/javac/resources/javac_zh_CN.properties
trunk/core/src/openjdk/sun/sun/tools/javap/
trunk/core/src/openjdk/sun/sun/tools/javap/AttrData.java
trunk/core/src/openjdk/sun/sun/tools/javap/CPX.java
trunk/core/src/openjdk/sun/sun/tools/javap/CPX2.java
trunk/core/src/openjdk/sun/sun/tools/javap/ClassData.java
trunk/core/src/openjdk/sun/sun/tools/javap/Constants.java
trunk/core/src/openjdk/sun/sun/tools/javap/FieldData.java
trunk/core/src/openjdk/sun/sun/tools/javap/InnerClassData.java
trunk/core/src/openjdk/sun/sun/tools/javap/JavapEnvironment.java
trunk/core/src/openjdk/sun/sun/tools/javap/JavapPrinter.java
trunk/core/src/openjdk/sun/sun/tools/javap/LineNumData.java
trunk/core/src/openjdk/sun/sun/tools/javap/LocVarData.java
trunk/core/src/openjdk/sun/sun/tools/javap/Main.java
trunk/core/src/openjdk/sun/sun/tools/javap/MethodData.java
trunk/core/src/openjdk/sun/sun/tools/javap/RuntimeConstants.java
trunk/core/src/openjdk/sun/sun/tools/javap/StackMapData.java
trunk/core/src/openjdk/sun/sun/tools/javap/StackMapTableData.java
trunk/core/src/openjdk/sun/sun/tools/javap/Tables.java
trunk/core/src/openjdk/sun/sun/tools/javap/TrapData.java
trunk/core/src/openjdk/sun/sun/tools/javap/TypeSignature.java
trunk/core/src/openjdk/sun/sun/tools/javap/oldjavap/
trunk/core/src/openjdk/sun/sun/tools/javap/oldjavap/ConstantPrinter.java
trunk/core/src/openjdk/sun/sun/tools/javap/oldjavap/JavaP.java
trunk/core/src/openjdk/sun/sun/tools/javap/oldjavap/JavaPBinaryCode.java
trunk/core/src/openjdk/sun/sun/tools/javap/oldjavap/JavaPClassPrinter.java
trunk/core/src/openjdk/sun/sun/tools/javap/oldjavap/JavaPEnvironment.java
trunk/core/src/openjdk/sun/sun/tools/tree/
trunk/core/src/openjdk/sun/sun/tools/tree/AddExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AndExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ArrayAccessExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ArrayExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignAddExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignBitAndExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignBitOrExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignBitXorExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignDivideExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignMultiplyExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignOpExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignRemainderExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignShiftLeftExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignShiftRightExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignSubtractExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/AssignUnsignedShiftRightExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BinaryArithmeticExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BinaryAssignExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BinaryBitExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BinaryCompareExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BinaryEqualityExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BinaryExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BinaryLogicalExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BinaryShiftExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BitAndExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BitNotExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BitOrExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BitXorExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BooleanExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/BreakStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/ByteExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/CaseStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/CastExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/CatchStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/CharExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/CheckContext.java
trunk/core/src/openjdk/sun/sun/tools/tree/CodeContext.java
trunk/core/src/openjdk/sun/sun/tools/tree/CommaExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/CompoundStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/ConditionVars.java
trunk/core/src/openjdk/sun/sun/tools/tree/ConditionalExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ConstantExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/Context.java
trunk/core/src/openjdk/sun/sun/tools/tree/ContinueStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/ConvertExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/DeclarationStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/DivRemExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/DivideExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/DoStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/DoubleExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/EqualExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ExprExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/Expression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ExpressionStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/FieldExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/FieldUpdater.java
trunk/core/src/openjdk/sun/sun/tools/tree/FinallyStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/FloatExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ForStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/GreaterExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/GreaterOrEqualExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/IdentifierExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/IfStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/IncDecExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/InlineMethodExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/InlineNewInstanceExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/InlineReturnStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/InstanceOfExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/IntExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/IntegerExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/LengthExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/LessExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/LessOrEqualExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/LocalMember.java
trunk/core/src/openjdk/sun/sun/tools/tree/LongExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/MethodExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/MultiplyExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/NaryExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/NegativeExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/NewArrayExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/NewInstanceExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/Node.java
trunk/core/src/openjdk/sun/sun/tools/tree/NotEqualExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/NotExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/NullExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/OrExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/PositiveExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/PostDecExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/PostIncExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/PreDecExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/PreIncExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/RemainderExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ReturnStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/ShiftLeftExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ShiftRightExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ShortExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/Statement.java
trunk/core/src/openjdk/sun/sun/tools/tree/StringExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/SubtractExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/SuperExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/SwitchStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/SynchronizedStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/ThisExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/ThrowStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/TryStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/TypeExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/UnaryExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/UnsignedShiftRightExpression.java
trunk/core/src/openjdk/sun/sun/tools/tree/UplevelReference.java
trunk/core/src/openjdk/sun/sun/tools/tree/VarDeclarationStatement.java
trunk/core/src/openjdk/sun/sun/tools/tree/Vset.java
trunk/core/src/openjdk/sun/sun/tools/tree/WhileStatement.java
trunk/core/src/openjdk/sun/sun/tools/util/
trunk/core/src/openjdk/sun/sun/tools/util/CommandLine.java
trunk/core/src/openjdk/sun/sun/tools/util/ModifierFilter.java
Added: trunk/core/src/openjdk/sun/sun/tools/asm/ArrayData.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/tools/asm/ArrayData.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/tools/asm/ArrayData.java 2007-06-10 08:42:12 UTC (rev 3232)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 1995-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.tools.asm;
+
+import sun.tools.java.*;
+
+/**
+ * WARNING: The contents of this source file are not part of any
+ * supported API. Code that depends on them does so at its own risk:
+ * they are subject to change or removal without notice.
+ */
+public final
+class ArrayData {
+ Type type;
+ int nargs;
+
+ public ArrayData(Type type, int nargs) {
+ this.type = type;
+ this.nargs = nargs;
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/tools/asm/Assembler.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/tools/asm/Assembler.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/tools/asm/Assembler.java 2007-06-10 08:42:12 UTC (rev 3232)
@@ -0,0 +1,957 @@
+/*
+ * Copyright 1994-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.tools.asm;
+
+import sun.tools.java.*;
+import java.util.Enumeration;
+import java.io.IOException;
+import java.io.DataOutputStream;
+import java.io.PrintStream;
+import java.util.Vector;
+// JCOV
+import sun.tools.javac.*;
+import java.io.File;
+import java.io.BufferedInputStream;
+import java.io.DataInputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.lang.String;
+// end JCOV
+
+/**
+ * This class is used to assemble the bytecode instructions for a method.
+ *
+ * WARNING: The contents of this source file are not part of any
+ * supported API. Code that depends on them does so at its own risk:
+ * they are subject to change or removal without notice.
+ *
+ * @author Arthur van Hoff
+ * @version 1.41, 08/19/97
+ */
+public final
+class Assembler implements Constants {
+ static final int NOTREACHED = 0;
+ static final int REACHED = 1;
+ static final int NEEDED = 2;
+
+ Label first = new Label();
+ Instruction last = first;
+ int maxdepth;
+ int maxvar;
+ int maxpc;
+
+ /**
+ * Add an instruction
+ */
+ public void add(Instruction inst) {
+ if (inst != null) {
+ last.next = inst;
+ last = inst;
+ }
+ }
+ public void add(long where, int opc) {
+ add(new Instruction(where, opc, null));
+ }
+ public void add(long where, int opc, Object obj) {
+ add(new Instruction(where, opc, obj));
+ }
+// JCOV
+ public void add(long where, int opc, Object obj, boolean flagCondInverted) {
+ add(new Instruction(where, opc, obj, flagCondInverted));
+ }
+
+ public void add(boolean flagNoCovered, long where, int opc, Object obj) {
+ add(new Instruction(flagNoCovered, where, opc, obj));
+ }
+
+ public void add(long where, int opc, boolean flagNoCovered) {
+ add(new Instruction(where, opc, flagNoCovered));
+ }
+
+ static Vector SourceClassList = new Vector();
+
+ static Vector TmpCovTable = new Vector();
+
+ static int[] JcovClassCountArray = new int[CT_LAST_KIND + 1];
+
+ static String JcovMagicLine = "JCOV-DATA-FILE-VERSION: 2.0";
+ static String JcovClassLine = "CLASS: ";
+ static String JcovSrcfileLine = "SRCFILE: ";
+ static String JcovTimestampLine = "TIMESTAMP: ";
+ static String JcovDataLine = "DATA: ";
+ static String JcovHeadingLine = "#kind\tcount";
+
+ static int[] arrayModifiers =
+ {M_PUBLIC, M_PRIVATE, M_PROTECTED, M_ABSTRACT, M_FINAL, M_INTERFACE};
+ static int[] arrayModifiersOpc =
+ {PUBLIC, PRIVATE, PROTECTED, ABSTRACT, FINAL, INTERFACE};
+//end JCOV
+
+ /**
+ * Optimize instructions and mark those that can be reached
+ */
+ void optimize(Environment env, Label lbl) {
+ lbl.pc = REACHED;
+
+ for (Instruction inst = lbl.next ; inst != null ; inst = inst.next) {
+ switch (inst.pc) {
+ case NOTREACHED:
+ inst.optimize(env);
+ inst.pc = REACHED;
+ break;
+ case REACHED:
+ return;
+ case NEEDED:
+ break;
+ }
+
+ switch (inst.opc) {
+ case opc_label:
+ case opc_dead:
+ if (inst.pc == REACHED) {
+ inst.pc = NOTREACHED;
+ }
+ break;
+
+ case opc_ifeq:
+ case opc_ifne:
+ case opc_ifgt:
+ case opc_ifge:
+ case opc_iflt:
+ case opc_ifle:
+ case opc_if_icmpeq:
+ case opc_if_icmpne:
+ case opc_if_icmpgt:
+ case opc_if_icmpge:
+ case opc_if_icmplt:
+ case opc_if_icmple:
+ case opc_if_acmpeq:
+ case opc_if_acmpne:
+ case opc_ifnull:
+ case opc_ifnonnull:
+ optimize(env, (Label)inst.value);
+ break;
+
+ case opc_goto:
+ optimize(env, (Label)inst.value);
+ return;
+
+ case opc_jsr:
+ optimize(env, (Label)inst.value);
+ break;
+
+ case opc_ret:
+ case opc_return:
+ case opc_ireturn:
+ case opc_lreturn:
+ case opc_freturn:
+ case opc_dreturn:
+ case opc_areturn:
+ case opc_athrow:
+ return;
+
+ case opc_tableswitch:
+ case opc_lookupswitch: {
+ SwitchData sw = (SwitchData)inst.value;
+ optimize(env, sw.defaultLabel);
+ for (Enumeration e = sw.tab.elements() ; e.hasMoreElements();) {
+ optimize(env, (Label)e.nextElement());
+ }
+ return;
+ }
+
+ case opc_try: {
+ TryData td = (TryData)inst.value;
+ td.getEndLabel().pc = NEEDED;
+ for (Enumeration e = td.catches.elements() ; e.hasMoreElements();) {
+ CatchData cd = (CatchData)e.nextElement();
+ optimize(env, cd.getLabel());
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Eliminate instructions that are not reached
+ */
+ boolean eliminate() {
+ boolean change = false;
+ Instruction prev = first;
+
+ for (Instruction inst = first.next ; inst != null ; inst = inst.next) {
+ if (inst.pc != NOTREACHED) {
+ prev.next = inst;
+ prev = inst;
+ inst.pc = NOTREACHED;
+ } else {
+ change = true;
+ }
+ }
+ first.pc = NOTREACHED;
+ prev.next = null;
+ return change;
+ }
+
+ /**
+ * Optimize the byte codes
+ */
+ public void optimize(Environment env) {
+ //listing(System.out);
+ do {
+ // Figure out which instructions are reached
+ optimize(env, first);
+
+ // Eliminate instructions that are not reached
+ } while (eliminate() && env.opt());
+ }
+
+ /**
+ * Collect all constants into the constant table
+ */
+ public void collect(Environment env, MemberDefinition field, ConstantPool tab) {
+ // Collect constants for arguments only
+ // if a local variable table is generated
+ if ((field != null) && env.debug_vars()) {
+ if (field.getArguments() != null) {
+ for (Enumeration e = field.getArguments().elements() ; e.hasMoreElements() ;) {
+ MemberDefinition f = (MemberDefinition)e.nextElement();
+ tab.put(f.getName().toString());
+ tab.put(f.getType().getTypeSignature());
+ }
+ }
+ }
+
+ // Collect constants from the instructions
+ for (Instruction inst = first ; inst != null ; inst = inst.next) {
+ inst.collect(tab);
+ }
+ }
+
+ /**
+ * Determine stack size, count local variables
+ */
+ void balance(Label lbl, int depth) {
+ for (Instruction inst = lbl ; inst != null ; inst = inst.next) {
+ //Environment.debugOutput(inst.toString() + ": " + depth + " => " +
+ // (depth + inst.balance()));
+ depth += inst.balance();
+ if (depth < 0) {
+ throw new CompilerError("stack under flow: " + inst.toString() + " = " + depth);
+ }
+ if (depth > maxdepth) {
+ maxdepth = depth;
+ }
+ switch (inst.opc) {
+ case opc_label:
+ lbl = (Label)inst;
+ if (inst.pc == REACHED) {
+ if (lbl.depth != depth) {
+ throw new CompilerError("stack depth error " +
+ depth + "/" + lbl.depth +
+ ": " + inst.toString());
+ }
+ return;
+ }
+ lbl.pc = REACHED;
+ lbl.depth = depth;
+ break;
+
+ case opc_ifeq:
+ case opc_ifne:
+ case opc_ifgt:
+ case opc_ifge:
+ case opc_iflt:
+ case opc_ifle:
+ case opc_if_icmpeq:
+ case opc_if_icmpne:
+ case opc_if_icmpgt:
+ case opc_if_icmpge:
+ case opc_if_icmplt:
+ case opc_if_icmple:
+ case opc_if_acmpeq:
+ case opc_if_acmpne:
+ case opc_ifnull:
+ case opc_ifnonnull:
+ balance((Label)inst.value, depth);
+ break;
+
+ case opc_goto:
+ balance((Label)inst.value, depth);
+ return;
+
+ case opc_jsr:
+ balance((Label)inst.value, depth + 1);
+ break;
+
+ case opc_ret:
+ case opc_return:
+ case opc_ireturn:
+ case opc_lreturn:
+ case opc_freturn:
+ case opc_dreturn:
+ case opc_areturn:
+ case opc_athrow:
+ return;
+
+ case opc_iload:
+ case opc_fload:
+ case opc_aload:
+ case opc_istore:
+ case opc_fstore:
+ case opc_astore: {
+ int v = ((inst.value instanceof Number)
+ ? ((Number)inst.value).intValue()
+ : ((LocalVariable)inst.value).slot) + 1;
+ if (v > maxvar)
+ maxvar = v;
+ break;
+ }
+
+ case opc_lload:
+ case opc_dload:
+ case opc_lstore:
+ case opc_dstore: {
+ int v = ((inst.value instanceof Number)
+ ? ((Number)inst.value).intValue()
+ : ((LocalVariable)inst.value).slot) + 2;
+ if (v > maxvar)
+ maxvar = v;
+ break;
+ }
+
+ case opc_iinc: {
+ int v = ((int[])inst.value)[0] + 1;
+ if (v > maxvar)
+ maxvar = v + 1;
+ break;
+ }
+
+ case opc_tableswitch:
+ case opc_lookupswitch: {
+ SwitchData sw = (SwitchData)inst.value;
+ balance(sw.defaultLabel, depth);
+ for (Enumeration e = sw.tab.elements() ; e.hasMoreElements();) {
+ balance((Label)e.nextElement(), depth);
+ }
+ return;
+ }
+
+ case opc_try: {
+ TryData td = (TryData)inst.value;
+ for (Enumeration e = td.catches.elements() ; e.hasMoreElements();) {
+ CatchData cd = (CatchData)e.nextElement();
+ balance(cd.getLabel(), depth + 1);
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Generate code
+ */
+ public void write(Environment env, DataOutputStream out,
+ MemberDefinition field, ConstantPool tab)
+ throws IOException {
+ //listing(System.out);
+
+ if ((field != null) && field.getArguments() != null) {
+ int sum = 0;
+ Vector v = field.getArguments();
+ for (Enumeration e = v.elements(); e.hasMoreElements(); ) {
+ MemberDefinition f = ((MemberDefinition)e.nextElement());
+ sum += f.getType().stackSize();
+ }
+ maxvar = sum;
+ }
+
+ // Make sure the stack balances. Also calculate maxvar and maxstack
+ try {
+ balance(first, 0);
+ } catch (CompilerError e) {
+ System.out.println("ERROR: " + e);
+ listing(System.out);
+ throw e;
+ }
+
+ // Assign PCs
+ int pc = 0, nexceptions = 0;
+ for (Instruction inst = first ; inst != null ; inst = inst.next) {
+ inst.pc = pc;
+ int sz = inst.size(tab);
+ if (pc<65536 && (pc+sz)>=65536) {
+ env.error(inst.where, "warn.method.too.long");
+ }
+ pc += sz;
+
+ if (inst.opc == opc_try) {
+ nexceptions += ((TryData)inst.value).catches.size();
+ }
+ }
+
+ // Write header
+ out.writeShort(maxdepth);
+ out.writeShort(maxvar);
+ out.writeInt(maxpc = pc);
+
+ // Generate code
+ for (Instruction inst = first.next ; inst != null ; inst = inst.next) {
+ inst.write(out, tab);
+ }
+
+ // write exceptions
+ out.writeShort(nexceptions);
+ if (nexceptions > 0) {
+ //listing(System.out);
+ writeExceptions(env, out, tab, first, last);
+ }
+ }
+
+ /**
+ * Write the exceptions table
+ */
+ void writeExceptions(Environment env, DataOutputStream out, ConstantPool tab, Instruction first, Instruction last) throws IOException {
+ for (Instruction inst = first ; inst != last.next ; inst = inst.next) {
+ if (inst.opc == opc_try) {
+ TryData td = (TryData)inst.value;
+ writeExceptions(env, out, tab, inst.next, td.getEndLabel());
+ for (Enumeration e = td.catches.elements() ; e.hasMoreElements();) {
+ CatchData cd = (CatchData)e.nextElement();
+ //System.out.println("EXCEPTION: " + env.getSource() + ", pc=" + inst.pc + ", end=" + td.getEndLabel().pc + ", hdl=" + cd.getLabel().pc + ", tp=" + cd.getType());
+ out.writeShort(inst.pc);
+ out.writeShort(td.getEndLabel().pc);
+ out.writeShort(cd.getLabel().pc);
+ if (cd.getType() != null) {
+ out.writeShort(tab.index(cd.getType()));
+ } else {
+ out.writeShort(0);
+ }
+ }
+ inst = td.getEndLabel();
+ }
+ }
+ }
+
+//JCOV
+ /**
+ * Write the coverage table
+ */
+ public void writeCoverageTable(Environment env, ClassDefinition c, DataOutputStream out, ConstantPool tab, long whereField) throws IOException {
+ Vector TableLot = new Vector(); /* Coverage table */
+ boolean begseg = false;
+ boolean begmeth = false;
+ long whereClass = ((SourceClass)c).getWhere();
+ Vector whereTry = new Vector();
+ int numberTry = 0;
+ int count = 0;
+
+ for (Instruction inst = first ; inst != null ; inst = inst.next) {
+ long n = (inst.where >> WHEREOFFSETBITS);
+ if (n > 0 && inst.opc != opc_label) {
+ if (!begmeth) {
+ if ( whereClass == inst.where)
+ TableLot.addElement(new Cover(CT_FIKT_METHOD, whereField, inst.pc));
+ else
+ TableLot.addElement(new Cover(CT_METHOD, whereField, inst.pc));
+ coun...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-16 20:20:26
|
Revision: 3251
http://jnode.svn.sourceforge.net/jnode/?rev=3251&view=rev
Author: lsantha
Date: 2007-06-16 13:20:24 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/nio/
trunk/core/src/openjdk/sun/sun/nio/ch/
trunk/core/src/openjdk/sun/sun/nio/ch/Interruptible.java
Added: trunk/core/src/openjdk/sun/sun/nio/ch/Interruptible.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/nio/ch/Interruptible.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/nio/ch/Interruptible.java 2007-06-16 20:20:24 UTC (rev 3251)
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @(#)Interruptible.java 1.13 07/05/05
+ */
+
+package sun.nio.ch;
+
+
+public interface Interruptible {
+
+ public void interrupt();
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2007-06-16 20:22:39
|
Revision: 3253
http://jnode.svn.sourceforge.net/jnode/?rev=3253&view=rev
Author: lsantha
Date: 2007-06-16 13:22:36 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/util/
trunk/core/src/openjdk/sun/sun/util/PreHashedMap.java
Added: trunk/core/src/openjdk/sun/sun/util/PreHashedMap.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/util/PreHashedMap.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/util/PreHashedMap.java 2007-06-16 20:22:36 UTC (rev 3253)
@@ -0,0 +1,290 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.util;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.AbstractMap;
+import java.util.AbstractSet;
+import java.util.NoSuchElementException;
+
+
+/**
+ * A precomputed hash map.
+ *
+ * <p> Subclasses of this class are of the following form:
+ *
+ * <blockquote><pre>
+ * class FooMap
+ * extends sun.util.PreHashedMap<String>
+ * {
+ *
+ * private FooMap() {
+ * super(ROWS, SIZE, SHIFT, MASK);
+ * }
+ *
+ * protected void init(Object[] ht) {
+ * ht[0] = new Object[] { "key-1", value_1 };
+ * ht[1] = new Object[] { "key-2", value_2,
+ * new Object { "key-3", value_3 } };
+ * ...
+ * }
+ *
+ * }</pre></blockquote>
+ *
+ * <p> The <tt>init</tt> method is invoked by the <tt>PreHashedMap</tt>
+ * constructor with an object array long enough for the map's rows. The method
+ * must construct the hash chain for each row and store it in the appropriate
+ * element of the array.
+ *
+ * <p> Each entry in the map is represented by a unique hash-chain node. The
+ * final node of a hash chain is a two-element object array whose first element
+ * is the entry's key and whose second element is the entry's value. A
+ * non-final node of a hash chain is a three-element object array whose first
+ * two elements are the entry's key and value and whose third element is the
+ * next node in the chain.
+ *
+ * <p> Instances of this class are mutable and are not safe for concurrent
+ * access. They may be made immutable and thread-safe via the appropriate
+ * methods in the {@link java.util.Collections} utility class.
+ *
+ * <p> In the JDK build, subclasses of this class are typically created via the
+ * <tt>Hasher</tt> program in the <tt>make/tools/Hasher</tt> directory.
+ *
+ * @author Mark Reinhold
+ * @version 1.8 07/05/05
+ * @since 1.5
+ *
+ * @see java.util.AbstractMap
+ */
+
+public abstract class PreHashedMap<V>
+ extends AbstractMap<String,V>
+{
+
+ private final int rows;
+ private final int size;
+ private final int shift;
+ private final int mask;
+ private final Object[] ht;
+
+ /**
+ * Creates a new map.
+ *
+ * <p> This constructor invokes the {@link #init init} method, passing it a
+ * newly-constructed row array that is <tt>rows</tt> elements long.
+ *
+ * @param rows
+ * The number of rows in the map
+ * @param size
+ * The number of entries in the map
+ * @param shift
+ * The value by which hash codes are right-shifted
+ * @param mask
+ * The value with which hash codes are masked after being shifted
+ */
+ protected PreHashedMap(int rows, int size, int shift, int mask) {
+ this.rows = rows;
+ this.size = size;
+ this.shift = shift;
+ this.mask = mask;
+ this.ht = new Object[rows];
+ init(ht);
+ }
+
+ /**
+ * Initializes this map.
+ *
+ * <p> This method must construct the map's hash chains and store them into
+ * the appropriate elements of the given hash-table row array.
+ *
+ * @param rows
+ * The row array to be initialized
+ */
+ protected abstract void init(Object[] ht);
+
+ // @SuppressWarnings("unchecked")
+ private V toV(Object x) {
+ return (V)x;
+ }
+
+ public V get(Object k) {
+ int h = (k.hashCode() >> shift) & mask;
+ Object[] a = (Object[])ht[h];
+ if (a == null) return null;
+ for (;;) {
+ if (a[0].equals(k))
+ return toV(a[1]);
+ if (a.length < 3)
+ return null;
+ a = (Object[])a[2];
+ }
+ }
+
+ /**
+ * @throws UnsupportedOperationException
+ * If the given key is not part of this map's initial key set
+ */
+ public V put(String k, V v) {
+ int h = (k.hashCode() >> shift) & mask;
+ Object[] a = (Object[])ht[h];
+ if (a == null)
+ throw new UnsupportedOperationException(k);
+ for (;;) {
+ if (a[0].equals(k)) {
+ V ov = toV(a[1]);
+ a[1] = v;
+ return ov;
+ }
+ if (a.length < 3)
+ throw new UnsupportedOperationException(k);
+ a = (Object[])a[2];
+ }
+ }
+
+ public Set<String> keySet() {
+ return new AbstractSet<String> () {
+
+ public int size() {
+ return size;
+ }
+
+ public Iterator<String> iterator() {
+ return new Iterator<String>() {
+ private int i = -1;
+ Object[] a = null;
+ String cur = null;
+
+ private boolean findNext() {
+ if (a != null) {
+ if (a.length == 3) {
+ a = (Object[])a[2];
+ cur = (String)a[0];
+ return true;
+ }
+ i++;
+ a = null;
+ }
+ cur = null;
+ if (i >= rows)
+ return false;
+ if (i < 0 || ht[i] == null) {
+ do {
+ if (++i >= rows)
+ return false;
+ } while (ht[i] == null);
+ }
+ a = (Object[])ht[i];
+ cur = (String)a[0];
+ return true;
+ }
+
+ public boolean hasNext() {
+ if (cur != null)
+ return true;
+ return findNext();
+ }
+
+ public String next() {
+ if (cur == null) {
+ if (!findNext())
+ throw new NoSuchElementException();
+ }
+ String s = cur;
+ cur = null;
+ return s;
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+
+ };
+ }
+ };
+ }
+
+ public Set<Map.Entry<String,V>> entrySet() {
+ return new AbstractSet<Map.Entry<String,V>> () {
+
+ public int size() {
+ return size;
+ }
+
+ public Iterator<Map.Entry<String,V>> iterator() {
+ return new Iterator<Map.Entry<String,V>>() {
+ final Iterator<String> i = keySet().iterator();
+
+ public boolean hasNext() {
+ return i.hasNext();
+ }
+
+ public Map.Entry<String,V> next() {
+ return new Map.Entry<String,V>() {
+ String k = i.next();
+ public String getKey() { return k; }
+ public V getValue() { return get(k); }
+ public int hashCode() {
+ V v = get(k);
+ return (k.hashCode()
+ + (v == null
+ ? 0
+ : v.hashCode()));
+ }
+ public boolean equals(Object ob) {
+ if (ob == this)
+ return true;
+ if (!(ob instanceof Map.Entry))
+ return false;
+ Map.Entry<String,V> that
+ = (Map.Entry<String,V>)ob;
+ return ((this.getKey() == null
+ ? that.getKey() == null
+ : this.getKey()
+ .equals(that.getKey()))
+ &&
+ (this.getValue() == null
+ ? that.getValue() == null
+ : this.getValue()
+ .equals(that.getValue())));
+ }
+ public V setValue(V v) {
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+
+ };
+ }
+ };
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2007-06-23 05:00:56
|
Revision: 3291
http://jnode.svn.sourceforge.net/jnode/?rev=3291&view=rev
Author: lsantha
Date: 2007-06-22 22:00:54 -0700 (Fri, 22 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/net/dns/
trunk/core/src/openjdk/sun/sun/net/dns/ResolverConfiguration.java
trunk/core/src/openjdk/sun/sun/net/dns/ResolverConfigurationImpl.java
trunk/core/src/openjdk/sun/sun/net/util/
trunk/core/src/openjdk/sun/sun/net/util/IPAddressUtil.java
trunk/core/src/openjdk/sun/sun/security/ec/
trunk/core/src/openjdk/sun/sun/security/ec/ECKeyFactory.java
trunk/core/src/openjdk/sun/sun/security/ec/ECParameters.java
trunk/core/src/openjdk/sun/sun/security/ec/ECPrivateKeyImpl.java
trunk/core/src/openjdk/sun/sun/security/ec/ECPublicKeyImpl.java
trunk/core/src/openjdk/sun/sun/security/ec/NamedCurve.java
trunk/core/src/openjdk/sun/sun/security/jca/
trunk/core/src/openjdk/sun/sun/security/jca/GetInstance.java
trunk/core/src/openjdk/sun/sun/security/jca/JCAUtil.java
trunk/core/src/openjdk/sun/sun/security/jca/ProviderConfig.java
trunk/core/src/openjdk/sun/sun/security/jca/ProviderList.java
trunk/core/src/openjdk/sun/sun/security/jca/Providers.java
trunk/core/src/openjdk/sun/sun/security/jca/ServiceId.java
trunk/core/src/openjdk/sun/sun/security/krb5/
trunk/core/src/openjdk/sun/sun/security/krb5/Asn1Exception.java
trunk/core/src/openjdk/sun/sun/security/krb5/Checksum.java
trunk/core/src/openjdk/sun/sun/security/krb5/Config.java
trunk/core/src/openjdk/sun/sun/security/krb5/Confounder.java
trunk/core/src/openjdk/sun/sun/security/krb5/Credentials.java
trunk/core/src/openjdk/sun/sun/security/krb5/EncryptedData.java
trunk/core/src/openjdk/sun/sun/security/krb5/EncryptionKey.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbApRep.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbApReq.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbAppMessage.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbAsRep.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbAsReq.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbCred.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbCryptoException.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbException.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbKdcRep.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbKdcReq.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbPriv.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbSafe.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbServiceLocator.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbTgsRep.java
trunk/core/src/openjdk/sun/sun/security/krb5/KrbTgsReq.java
trunk/core/src/openjdk/sun/sun/security/krb5/PrincipalName.java
trunk/core/src/openjdk/sun/sun/security/krb5/Realm.java
trunk/core/src/openjdk/sun/sun/security/krb5/RealmException.java
trunk/core/src/openjdk/sun/sun/security/krb5/ServiceName.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/
trunk/core/src/openjdk/sun/sun/security/krb5/internal/APOptions.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/APRep.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/APReq.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ASRep.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ASReq.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/AuthContext.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/Authenticator.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/AuthorizationData.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/AuthorizationDataEntry.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/CredentialsUtil.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ETypeInfo.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ETypeInfo2.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/EncAPRepPart.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/EncASRepPart.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/EncKDCRepPart.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/EncKrbCredPart.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/EncKrbPrivPart.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/EncTGSRepPart.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/EncTicketPart.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/HostAddress.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/HostAddresses.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KDCOptions.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KDCRep.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KDCReq.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KDCReqBody.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KRBCred.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KRBError.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KRBPriv.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KRBSafe.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KRBSafeBody.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KdcErrException.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KerberosTime.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/Krb5.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KrbApErrException.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KrbCredInfo.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/KrbErrException.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/LastReq.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/LastReqEntry.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/LocalSeqNumber.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/LoginOptions.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/MethodData.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/PAData.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/PAEncTSEnc.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/SeqNumber.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/TCPClient.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/TGSRep.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/TGSReq.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/Ticket.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/TicketFlags.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/TransitedEncoding.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/UDPClient.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ccache/
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ccache/CCacheInputStream.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ccache/CCacheOutputStream.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ccache/Credentials.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ccache/CredentialsCache.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ccache/FileCCacheConstants.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ccache/FileCredentialsCache.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ccache/MemoryCredentialsCache.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ccache/Tag.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/Aes128.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/Aes128CtsHmacSha1EType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/Aes256.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/Aes256CtsHmacSha1EType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/ArcFourHmac.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/ArcFourHmacEType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/CksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/Crc32CksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/Des.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/Des3.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/Des3CbcHmacSha1KdEType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/DesCbcCrcEType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/DesCbcEType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/DesCbcMd5EType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/DesMacCksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/DesMacKCksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/EType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/HmacMd5ArcFourCksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/HmacSha1Aes128CksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/HmacSha1Aes256CksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/HmacSha1Des3KdCksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/KeyUsage.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/Nonce.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/NullEType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/RsaMd5CksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/RsaMd5DesCksumType.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/crc32.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/dk/
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/dk/ArcFourCrypto.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/dk/Des3DkCrypto.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/crypto/dk/DkCrypto.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ktab/
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ktab/KeyTab.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ktab/KeyTabConstants.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ktab/KeyTabEntry.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ktab/KeyTabInputStream.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/ktab/KeyTabOutputStream.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/rcache/
trunk/core/src/openjdk/sun/sun/security/krb5/internal/rcache/AuthTime.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/rcache/CacheTable.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/rcache/ReplayCache.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/util/
trunk/core/src/openjdk/sun/sun/security/krb5/internal/util/KerberosFlags.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/util/KrbDataInputStream.java
trunk/core/src/openjdk/sun/sun/security/krb5/internal/util/KrbDataOutputStream.java
trunk/core/src/openjdk/sun/sun/security/pkcs/
trunk/core/src/openjdk/sun/sun/security/pkcs/ContentInfo.java
trunk/core/src/openjdk/sun/sun/security/pkcs/EncodingException.java
trunk/core/src/openjdk/sun/sun/security/pkcs/EncryptedPrivateKeyInfo.java
trunk/core/src/openjdk/sun/sun/security/pkcs/PKCS10.java
trunk/core/src/openjdk/sun/sun/security/pkcs/PKCS10Attribute.java
trunk/core/src/openjdk/sun/sun/security/pkcs/PKCS10Attributes.java
trunk/core/src/openjdk/sun/sun/security/pkcs/PKCS7.java
trunk/core/src/openjdk/sun/sun/security/pkcs/PKCS8Key.java
trunk/core/src/openjdk/sun/sun/security/pkcs/PKCS9Attribute.java
trunk/core/src/openjdk/sun/sun/security/pkcs/PKCS9Attributes.java
trunk/core/src/openjdk/sun/sun/security/pkcs/ParsingException.java
trunk/core/src/openjdk/sun/sun/security/pkcs/SignerInfo.java
trunk/core/src/openjdk/sun/sun/security/pkcs/SigningCertificateInfo.java
trunk/core/src/openjdk/sun/sun/security/provider/
trunk/core/src/openjdk/sun/sun/security/provider/ByteArrayAccess.java
trunk/core/src/openjdk/sun/sun/security/provider/DSA.java
trunk/core/src/openjdk/sun/sun/security/provider/DSAKeyFactory.java
trunk/core/src/openjdk/sun/sun/security/provider/DSAKeyPairGenerator.java
trunk/core/src/openjdk/sun/sun/security/provider/DSAParameterGenerator.java
trunk/core/src/openjdk/sun/sun/security/provider/DSAParameters.java
trunk/core/src/openjdk/sun/sun/security/provider/DSAPrivateKey.java
trunk/core/src/openjdk/sun/sun/security/provider/DSAPublicKey.java
trunk/core/src/openjdk/sun/sun/security/provider/DSAPublicKeyImpl.java
trunk/core/src/openjdk/sun/sun/security/provider/DigestBase.java
trunk/core/src/openjdk/sun/sun/security/provider/IdentityDatabase.java
trunk/core/src/openjdk/sun/sun/security/provider/JavaKeyStore.java
trunk/core/src/openjdk/sun/sun/security/provider/KeyProtector.java
trunk/core/src/openjdk/sun/sun/security/provider/MD2.java
trunk/core/src/openjdk/sun/sun/security/provider/MD4.java
trunk/core/src/openjdk/sun/sun/security/provider/MD5.java
trunk/core/src/openjdk/sun/sun/security/provider/ParameterCache.java
trunk/core/src/openjdk/sun/sun/security/provider/PolicyParser.java
trunk/core/src/openjdk/sun/sun/security/provider/SHA.java
trunk/core/src/openjdk/sun/sun/security/provider/SHA2.java
trunk/core/src/openjdk/sun/sun/security/provider/SHA5.java
trunk/core/src/openjdk/sun/sun/security/provider/SystemIdentity.java
trunk/core/src/openjdk/sun/sun/security/provider/SystemSigner.java
trunk/core/src/openjdk/sun/sun/security/provider/X509Factory.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/
trunk/core/src/openjdk/sun/sun/security/provider/certpath/AdjacencyList.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/BasicChecker.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/BuildStep.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/Builder.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/CertId.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/CertPathHelper.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/CollectionCertStore.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/ConstraintsChecker.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/CrlRevocationChecker.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/DistributionPointFetcher.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/ForwardBuilder.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/ForwardState.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/IndexedCollectionCertStore.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/KeyChecker.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/LDAPCertStore.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/OCSPChecker.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/OCSPRequest.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/OCSPResponse.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/PKIXCertPathValidator.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/PKIXMasterCertPathValidator.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/PolicyChecker.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/PolicyNodeImpl.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/ReverseBuilder.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/ReverseState.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/State.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/SunCertPathBuilder.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/SunCertPathBuilderException.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/SunCertPathBuilderParameters.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/SunCertPathBuilderResult.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/URICertStore.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/Vertex.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/X509CertPath.java
trunk/core/src/openjdk/sun/sun/security/provider/certpath/X509CertificatePair.java
trunk/core/src/openjdk/sun/sun/security/timestamp/
trunk/core/src/openjdk/sun/sun/security/timestamp/HttpTimestamper.java
trunk/core/src/openjdk/sun/sun/security/timestamp/TSRequest.java
trunk/core/src/openjdk/sun/sun/security/timestamp/TSResponse.java
trunk/core/src/openjdk/sun/sun/security/timestamp/TimestampToken.java
trunk/core/src/openjdk/sun/sun/security/timestamp/Timestamper.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources_de.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources_es.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources_fr.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources_it.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources_ja.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources_ko.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources_sv.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources_zh_CN.java
trunk/core/src/openjdk/sun/sun/security/util/AuthResources_zh_TW.java
trunk/core/src/openjdk/sun/sun/security/util/BigInt.java
trunk/core/src/openjdk/sun/sun/security/util/BitArray.java
trunk/core/src/openjdk/sun/sun/security/util/ByteArrayLexOrder.java
trunk/core/src/openjdk/sun/sun/security/util/ByteArrayTagOrder.java
trunk/core/src/openjdk/sun/sun/security/util/Cache.java
trunk/core/src/openjdk/sun/sun/security/util/DerEncoder.java
trunk/core/src/openjdk/sun/sun/security/util/DerIndefLenConverter.java
trunk/core/src/openjdk/sun/sun/security/util/DerInputBuffer.java
trunk/core/src/openjdk/sun/sun/security/util/DerInputStream.java
trunk/core/src/openjdk/sun/sun/security/util/DerOutputStream.java
trunk/core/src/openjdk/sun/sun/security/util/DerValue.java
trunk/core/src/openjdk/sun/sun/security/util/HostnameChecker.java
trunk/core/src/openjdk/sun/sun/security/util/ManifestDigester.java
trunk/core/src/openjdk/sun/sun/security/util/ObjectIdentifier.java
trunk/core/src/openjdk/sun/sun/security/util/Password.java
trunk/core/src/openjdk/sun/sun/security/util/PathList.java
trunk/core/src/openjdk/sun/sun/security/util/PendingException.java
trunk/core/src/openjdk/sun/sun/security/util/PolicyUtil.java
trunk/core/src/openjdk/sun/sun/security/util/Resources.java
trunk/core/src/openjdk/sun/sun/security/util/ResourcesMgr.java
trunk/core/src/openjdk/sun/sun/security/util/Resources_de.java
trunk/core/src/openjdk/sun/sun/security/util/Resources_es.java
trunk/core/src/openjdk/sun/sun/security/util/Resources_fr.java
trunk/core/src/openjdk/sun/sun/security/util/Resources_it.java
trunk/core/src/openjdk/sun/sun/security/util/Resources_ja.java
trunk/core/src/openjdk/sun/sun/security/util/Resources_ko.java
trunk/core/src/openjdk/sun/sun/security/util/Resources_sv.java
trunk/core/src/openjdk/sun/sun/security/util/Resources_zh_CN.java
trunk/core/src/openjdk/sun/sun/security/util/Resources_zh_TW.java
trunk/core/src/openjdk/sun/sun/security/x509/
trunk/core/src/openjdk/sun/sun/security/x509/AVA.java
trunk/core/src/openjdk/sun/sun/security/x509/AccessDescription.java
trunk/core/src/openjdk/sun/sun/security/x509/AlgIdDSA.java
trunk/core/src/openjdk/sun/sun/security/x509/AlgorithmId.java
trunk/core/src/openjdk/sun/sun/security/x509/AttributeNameEnumeration.java
trunk/core/src/openjdk/sun/sun/security/x509/AuthorityInfoAccessExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/AuthorityKeyIdentifierExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/BasicConstraintsExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/CRLDistributionPointsExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/CRLExtensions.java
trunk/core/src/openjdk/sun/sun/security/x509/CRLNumberExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/CRLReasonCodeExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/CertAndKeyGen.java
trunk/core/src/openjdk/sun/sun/security/x509/CertAttrSet.java
trunk/core/src/openjdk/sun/sun/security/x509/CertException.java
trunk/core/src/openjdk/sun/sun/security/x509/CertParseError.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateAlgorithmId.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateExtensions.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateIssuerExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateIssuerName.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateIssuerUniqueIdentity.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificatePoliciesExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificatePolicyId.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificatePolicyMap.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificatePolicySet.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateSerialNumber.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateSubjectName.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateSubjectUniqueIdentity.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateValidity.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateVersion.java
trunk/core/src/openjdk/sun/sun/security/x509/CertificateX509Key.java
trunk/core/src/openjdk/sun/sun/security/x509/DNSName.java
trunk/core/src/openjdk/sun/sun/security/x509/DeltaCRLIndicatorExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/DistributionPoint.java
trunk/core/src/openjdk/sun/sun/security/x509/DistributionPointName.java
trunk/core/src/openjdk/sun/sun/security/x509/EDIPartyName.java
trunk/core/src/openjdk/sun/sun/security/x509/ExtendedKeyUsageExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/Extension.java
trunk/core/src/openjdk/sun/sun/security/x509/FreshestCRLExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/GeneralName.java
trunk/core/src/openjdk/sun/sun/security/x509/GeneralNameInterface.java
trunk/core/src/openjdk/sun/sun/security/x509/GeneralNames.java
trunk/core/src/openjdk/sun/sun/security/x509/GeneralSubtree.java
trunk/core/src/openjdk/sun/sun/security/x509/GeneralSubtrees.java
trunk/core/src/openjdk/sun/sun/security/x509/IPAddressName.java
trunk/core/src/openjdk/sun/sun/security/x509/InhibitAnyPolicyExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/IssuerAlternativeNameExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/IssuingDistributionPointExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/KeyIdentifier.java
trunk/core/src/openjdk/sun/sun/security/x509/KeyUsageExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/NameConstraintsExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/NetscapeCertTypeExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/OIDMap.java
trunk/core/src/openjdk/sun/sun/security/x509/OIDName.java
trunk/core/src/openjdk/sun/sun/security/x509/OtherName.java
trunk/core/src/openjdk/sun/sun/security/x509/PKIXExtensions.java
trunk/core/src/openjdk/sun/sun/security/x509/PolicyConstraintsExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/PolicyInformation.java
trunk/core/src/openjdk/sun/sun/security/x509/PolicyMappingsExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/PrivateKeyUsageExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/RDN.java
trunk/core/src/openjdk/sun/sun/security/x509/README
trunk/core/src/openjdk/sun/sun/security/x509/RFC822Name.java
trunk/core/src/openjdk/sun/sun/security/x509/ReasonFlags.java
trunk/core/src/openjdk/sun/sun/security/x509/SerialNumber.java
trunk/core/src/openjdk/sun/sun/security/x509/SubjectAlternativeNameExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/SubjectKeyIdentifierExtension.java
trunk/core/src/openjdk/sun/sun/security/x509/URIName.java
trunk/core/src/openjdk/sun/sun/security/x509/UniqueIdentity.java
trunk/core/src/openjdk/sun/sun/security/x509/X400Address.java
trunk/core/src/openjdk/sun/sun/security/x509/X500Name.java
trunk/core/src/openjdk/sun/sun/security/x509/X500Signer.java
trunk/core/src/openjdk/sun/sun/security/x509/X509AttributeName.java
trunk/core/src/openjdk/sun/sun/security/x509/X509CRLEntryImpl.java
trunk/core/src/openjdk/sun/sun/security/x509/X509CRLImpl.java
trunk/core/src/openjdk/sun/sun/security/x509/X509Cert.java
trunk/core/src/openjdk/sun/sun/security/x509/X509CertImpl.java
trunk/core/src/openjdk/sun/sun/security/x509/X509CertInfo.java
trunk/core/src/openjdk/sun/sun/security/x509/X509Key.java
trunk/core/src/openjdk/sun/sun/security/x509/certAttributes.html
Added: trunk/core/src/openjdk/sun/sun/net/dns/ResolverConfiguration.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/net/dns/ResolverConfiguration.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/net/dns/ResolverConfiguration.java 2007-06-23 05:00:54 UTC (rev 3291)
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.net.dns;
+
+import java.util.List;
+import java.io.IOException;
+
+/**
+ * The configuration of the client resolver.
+ *
+ * <p>A ResolverConfiguration is a singleton that represents the
+ * configuration of the client resolver. The ResolverConfiguration
+ * is opened by invoking the {@link #open() open} method.
+ *
+ * @since 1.4
+ */
+
+public abstract class ResolverConfiguration {
+
+ private static final Object lock = new Object();
+
+ private static ResolverConfiguration provider;
+
+ protected ResolverConfiguration() { }
+
+ /**
+ * Opens the resolver configuration.
+ *
+ * @return the resolver configuration
+ */
+ public static ResolverConfiguration open() {
+ synchronized (lock) {
+ if (provider == null) {
+ provider = new sun.net.dns.ResolverConfigurationImpl();
+ }
+ return provider;
+ }
+ }
+
+ /**
+ * Returns a list corresponding to the domain search path. The
+ * list is ordered by the search order used for host name lookup.
+ * Each element in the list returns a {@link java.lang.String}
+ * containing a domain name or suffix.
+ *
+ * @return list of domain names
+ */
+ public abstract List searchlist();
+
+ /**
+ * Returns a list of name servers used for host name lookup.
+ * Each element in the list returns a {@link java.lang.String}
+ * containing the textual representation of the IP address of
+ * the name server.
+ *
+ * @return list of the name servers
+ */
+ public abstract List nameservers();
+
+
+ /**
+ * Options representing certain resolver variables of
+ * a {@link ResolverConfiguration}.
+ */
+ public static abstract class Options {
+
+ /**
+ * Returns the maximum number of attempts the resolver
+ * will connect to each name server before giving up
+ * and returning an error.
+ *
+ * @return the resolver attempts value or -1 is unknown
+ */
+ public int attempts() {
+ return -1;
+ }
+
+ /**
+ * Returns the basic retransmit timeout, in milliseconds,
+ * used by the resolver. The resolver will typically use
+ * an exponential backoff algorithm where the timeout is
+ * doubled for every retransmit attempt. The basic
+ * retransmit timeout, returned here, is the initial
+ * timeout for the exponential backoff algorithm.
+ *
+ * @return the basic retransmit timeout value or -1
+ * if unknown
+ */
+ public int retrans() {
+ return -1;
+ }
+ }
+
+ /**
+ * Returns the {@link #Options} for the resolver.
+ *
+ * @return options for the resolver
+ */
+ public abstract Options options();
+}
+
+
Added: trunk/core/src/openjdk/sun/sun/net/dns/ResolverConfigurationImpl.java
========================...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-25 10:03:00
|
Revision: 3309
http://jnode.svn.sourceforge.net/jnode/?rev=3309&view=rev
Author: lsantha
Date: 2007-06-25 03:02:57 -0700 (Mon, 25 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/corba/
trunk/core/src/openjdk/sun/sun/corba/Bridge.java
trunk/core/src/openjdk/sun/sun/corba/BridgePermission.java
trunk/core/src/openjdk/sun/sun/corba/package.html
trunk/core/src/openjdk/sun/sun/io/
trunk/core/src/openjdk/sun/sun/io/ByteToCharASCII.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharBig5.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharBig5_HKSCS.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharBig5_Solaris.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharConverter.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp037.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1006.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1025.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1026.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1046.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1047.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1097.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1098.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1112.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1122.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1123.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1124.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1140.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1141.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1142.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1143.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1144.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1145.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1146.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1147.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1148.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1149.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1250.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1251.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1252.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1253.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1254.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1255.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1256.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1257.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1258.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1381.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp1383.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp273.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp277.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp278.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp280.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp284.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp285.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp297.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp33722.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp420.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp424.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp437.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp500.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp737.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp775.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp834.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp838.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp850.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp852.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp855.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp856.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp857.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp858.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp860.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp861.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp862.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp863.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp864.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp865.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp866.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp868.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp869.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp870.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp871.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp874.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp875.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp918.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp921.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp922.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp930.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp933.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp935.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp937.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp939.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp942.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp942C.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp943.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp943C.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp948.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp949.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp949C.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp950.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp964.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharCp970.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharDBCS_ASCII.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharDBCS_EBCDIC.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharDoubleByte.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharEUC.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharEUC_CN.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharEUC_JP.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharEUC_JP_LINUX.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharEUC_JP_Solaris.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharEUC_KR.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharEUC_TW.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharGB18030.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharGB18030DB.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharGBK.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharHKSCS.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharHKSCS_2001.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISCII91.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO2022.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO2022CN.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO2022JP.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO2022KR.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_1.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_13.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_15.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_2.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_3.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_4.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_5.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_6.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_7.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_8.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharISO8859_9.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharJIS0201.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharJIS0208.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharJIS0208_Solaris.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharJIS0212.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharJIS0212_Solaris.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharJISAutoDetect.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharJohab.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharKOI8_R.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMS874.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMS932.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMS932DB.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMS936.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMS949.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMS950.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMS950_HKSCS.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacArabic.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacCentralEurope.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacCroatian.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacCyrillic.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacDingbat.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacGreek.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacHebrew.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacIceland.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacRoman.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacRomania.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacSymbol.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacThai.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacTurkish.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharMacUkraine.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharPCK.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharSJIS.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharSingleByte.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharTIS620.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharUTF16.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharUTF8.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharUnicode.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharUnicodeBig.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharUnicodeBigUnmarked.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharUnicodeLittle.java
trunk/core/src/openjdk/sun/sun/io/ByteToCharUnicodeLittleUnmarked.java
trunk/core/src/openjdk/sun/sun/io/CharToByteASCII.java
trunk/core/src/openjdk/sun/sun/io/CharToByteBig5.java
trunk/core/src/openjdk/sun/sun/io/CharToByteBig5_HKSCS.java
trunk/core/src/openjdk/sun/sun/io/CharToByteBig5_Solaris.java
trunk/core/src/openjdk/sun/sun/io/CharToByteConverter.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp037.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1006.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1025.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1026.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1046.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1047.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1097.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1098.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1112.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1122.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1123.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1124.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1140.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1141.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1142.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1143.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1144.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1145.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1146.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1147.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1148.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1149.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1250.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1251.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1252.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1253.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1254.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1255.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1256.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1257.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1258.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1381.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp1383.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp273.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp277.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp278.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp280.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp284.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp285.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp297.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp33722.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp420.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp424.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp437.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp500.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp737.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp775.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp834.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp838.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp850.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp852.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp855.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp856.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp857.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp858.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp860.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp861.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp862.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp863.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp864.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp865.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp866.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp868.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp869.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp870.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp871.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp874.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp875.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp918.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp921.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp922.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp930.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp933.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp935.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp937.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp939.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp942.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp942C.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp943.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp943C.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp948.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp949.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp949C.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp950.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp964.java
trunk/core/src/openjdk/sun/sun/io/CharToByteCp970.java
trunk/core/src/openjdk/sun/sun/io/CharToByteDBCS_ASCII.java
trunk/core/src/openjdk/sun/sun/io/CharToByteDBCS_EBCDIC.java
trunk/core/src/openjdk/sun/sun/io/CharToByteDoubleByte.java
trunk/core/src/openjdk/sun/sun/io/CharToByteEUC.java
trunk/core/src/openjdk/sun/sun/io/CharToByteEUC_CN.java
trunk/core/src/openjdk/sun/sun/io/CharToByteEUC_JP.java
trunk/core/src/openjdk/sun/sun/io/CharToByteEUC_JP_LINUX.java
trunk/core/src/openjdk/sun/sun/io/CharToByteEUC_JP_Solaris.java
trunk/core/src/openjdk/sun/sun/io/CharToByteEUC_KR.java
trunk/core/src/openjdk/sun/sun/io/CharToByteEUC_TW.java
trunk/core/src/openjdk/sun/sun/io/CharToByteGB18030.java
trunk/core/src/openjdk/sun/sun/io/CharToByteGBK.java
trunk/core/src/openjdk/sun/sun/io/CharToByteHKSCS.java
trunk/core/src/openjdk/sun/sun/io/CharToByteHKSCS_2001.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISCII91.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO2022.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO2022CN_CNS.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO2022CN_GB.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO2022JP.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO2022KR.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_1.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_13.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_15.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_2.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_3.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_4.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_5.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_6.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_7.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_8.java
trunk/core/src/openjdk/sun/sun/io/CharToByteISO8859_9.java
trunk/core/src/openjdk/sun/sun/io/CharToByteJIS0201.java
trunk/core/src/openjdk/sun/sun/io/CharToByteJIS0208.java
trunk/core/src/openjdk/sun/sun/io/CharToByteJIS0208_Solaris.java
trunk/core/src/openjdk/sun/sun/io/CharToByteJIS0212.java
trunk/core/src/openjdk/sun/sun/io/CharToByteJIS0212_Solaris.java
trunk/core/src/openjdk/sun/sun/io/CharToByteJohab.java
trunk/core/src/openjdk/sun/sun/io/CharToByteKOI8_R.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMS874.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMS932.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMS932DB.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMS936.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMS949.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMS950.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMS950_HKSCS.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacArabic.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacCentralEurope.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacCroatian.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacCyrillic.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacDingbat.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacGreek.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacHebrew.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacIceland.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacRoman.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacRomania.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacSymbol.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacThai.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacTurkish.java
trunk/core/src/openjdk/sun/sun/io/CharToByteMacUkraine.java
trunk/core/src/openjdk/sun/sun/io/CharToBytePCK.java
trunk/core/src/openjdk/sun/sun/io/CharToByteSJIS.java
trunk/core/src/openjdk/sun/sun/io/CharToByteSingleByte.java
trunk/core/src/openjdk/sun/sun/io/CharToByteTIS620.java
trunk/core/src/openjdk/sun/sun/io/CharToByteUTF16.java
trunk/core/src/openjdk/sun/sun/io/CharToByteUTF8.java
trunk/core/src/openjdk/sun/sun/io/CharToByteUnicode.java
trunk/core/src/openjdk/sun/sun/io/CharToByteUnicodeBig.java
trunk/core/src/openjdk/sun/sun/io/CharToByteUnicodeBigUnmarked.java
trunk/core/src/openjdk/sun/sun/io/CharToByteUnicodeLittle.java
trunk/core/src/openjdk/sun/sun/io/CharToByteUnicodeLittleUnmarked.java
trunk/core/src/openjdk/sun/sun/io/CharacterEncoding.java
trunk/core/src/openjdk/sun/sun/io/ConversionBufferFullException.java
trunk/core/src/openjdk/sun/sun/io/Converters.java
trunk/core/src/openjdk/sun/sun/io/MalformedInputException.java
trunk/core/src/openjdk/sun/sun/io/UnknownCharacterException.java
trunk/core/src/openjdk/sun/sun/net/www/MessageHeader.java
trunk/core/src/openjdk/sun/sun/net/www/protocol/
trunk/core/src/openjdk/sun/sun/net/www/protocol/http/
trunk/core/src/openjdk/sun/sun/net/www/protocol/http/InMemoryCookieStore.java
trunk/core/src/openjdk/sun/sun/net/www/protocol/http/NegotiateCallbackHandler.java
trunk/core/src/openjdk/sun/sun/reflect/AccessorGenerator.java
trunk/core/src/openjdk/sun/sun/reflect/BootstrapConstructorAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/ByteVector.java
trunk/core/src/openjdk/sun/sun/reflect/ByteVectorFactory.java
trunk/core/src/openjdk/sun/sun/reflect/ByteVectorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/ClassDefiner.java
trunk/core/src/openjdk/sun/sun/reflect/ClassFileAssembler.java
trunk/core/src/openjdk/sun/sun/reflect/ClassFileConstants.java
trunk/core/src/openjdk/sun/sun/reflect/ConstructorAccessor.java
trunk/core/src/openjdk/sun/sun/reflect/ConstructorAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/DelegatingConstructorAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/DelegatingMethodAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/FieldAccessor.java
trunk/core/src/openjdk/sun/sun/reflect/FieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/FieldInfo.java
trunk/core/src/openjdk/sun/sun/reflect/InstantiationExceptionConstructorAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/Label.java
trunk/core/src/openjdk/sun/sun/reflect/LangReflectAccess.java
trunk/core/src/openjdk/sun/sun/reflect/MagicAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/MethodAccessor.java
trunk/core/src/openjdk/sun/sun/reflect/MethodAccessorGenerator.java
trunk/core/src/openjdk/sun/sun/reflect/MethodAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/NativeConstructorAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/NativeMethodAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/ReflectionFactory.java
trunk/core/src/openjdk/sun/sun/reflect/SerializationConstructorAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/SignatureIterator.java
trunk/core/src/openjdk/sun/sun/reflect/UTF8.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeBooleanFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeByteFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeCharacterFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeDoubleFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeFieldAccessorFactory.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeFloatFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeIntegerFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeLongFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeObjectFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedBooleanFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedByteFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedCharacterFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedDoubleFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedFloatFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedIntegerFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedLongFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedObjectFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedShortFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticBooleanFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticByteFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticCharacterFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticDoubleFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticFloatFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticIntegerFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticLongFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticObjectFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeQualifiedStaticShortFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeShortFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticBooleanFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticByteFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticCharacterFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticDoubleFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticFloatFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticIntegerFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticLongFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticObjectFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/UnsafeStaticShortFieldAccessorImpl.java
trunk/core/src/openjdk/sun/sun/reflect/annotation/
trunk/core/src/openjdk/sun/sun/reflect/annotation/AnnotationInvocationHandler.java
trunk/core/src/openjdk/sun/sun/reflect/annotation/AnnotationParser.java
trunk/core/src/openjdk/sun/sun/reflect/annotation/AnnotationType.java
trunk/core/src/openjdk/sun/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java
trunk/core/src/openjdk/sun/sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java
trunk/core/src/openjdk/sun/sun/reflect/annotation/ExceptionProxy.java
trunk/core/src/openjdk/sun/sun/reflect/annotation/TypeNotPresentExceptionProxy.java
trunk/core/src/openjdk/sun/sun/reflect/generics/
trunk/core/src/openjdk/sun/sun/reflect/generics/factory/
trunk/core/src/openjdk/sun/sun/reflect/generics/factory/CoreReflectionFactory.java
trunk/core/src/openjdk/sun/sun/reflect/generics/factory/GenericsFactory.java
trunk/core/src/openjdk/sun/sun/reflect/generics/parser/
trunk/core/src/openjdk/sun/sun/reflect/generics/parser/SignatureParser.java
trunk/core/src/openjdk/sun/sun/reflect/generics/reflectiveObjects/
trunk/core/src/openjdk/sun/sun/reflect/generics/reflectiveObjects/GenericArrayTypeImpl.java
trunk/core/src/openjdk/sun/sun/reflect/generics/reflectiveObjects/LazyReflectiveObjectGenerator.java
trunk/core/src/openjdk/sun/sun/reflect/generics/reflectiveObjects/NotImplementedException.java
trunk/core/src/openjdk/sun/sun/reflect/generics/reflectiveObjects/ParameterizedTypeImpl.java
trunk/core/src/openjdk/sun/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java
trunk/core/src/openjdk/sun/sun/reflect/generics/reflectiveObjects/WildcardTypeImpl.java
trunk/core/src/openjdk/sun/sun/reflect/generics/repository/
trunk/core/src/openjdk/sun/sun/reflect/generics/repository/AbstractRepository.java
trunk/core/src/openjdk/sun/sun/reflect/generics/repository/ClassRepository.java
trunk/core/src/openjdk/sun/sun/reflect/generics/repository/ConstructorRepository.java
trunk/core/src/openjdk/sun/sun/reflect/generics/repository/FieldRepository.java
trunk/core/src/openjdk/sun/sun/reflect/generics/repository/GenericDeclRepository.java
trunk/core/src/openjdk/sun/sun/reflect/generics/repository/MethodRepository.java
trunk/core/src/openjdk/sun/sun/reflect/generics/scope/
trunk/core/src/openjdk/sun/sun/reflect/generics/scope/AbstractScope.java
trunk/core/src/openjdk/sun/sun/reflect/generics/scope/ClassScope.java
trunk/core/src/openjdk/sun/sun/reflect/generics/scope/ConstructorScope.java
trunk/core/src/openjdk/sun/sun/reflect/generics/scope/DummyScope.java
trunk/core/src/openjdk/sun/sun/reflect/generics/scope/MethodScope.java
trunk/core/src/openjdk/sun/sun/reflect/generics/scope/Scope.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/ArrayTypeSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/BaseType.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/BooleanSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/BottomSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/ByteSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/CharSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/ClassSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/ClassTypeSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/DoubleSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/FieldTypeSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/FloatSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/FormalTypeParameter.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/IntSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/LongSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/MethodTypeSignature.java
trunk/core/src/openjdk/sun/sun/reflect/generics/tree/ReturnType.java
trunk/core/src/openjdk/sun/s...
[truncated message content] |
|
From: <ls...@us...> - 2007-07-06 11:07:34
|
Revision: 3349
http://jnode.svn.sourceforge.net/jnode/?rev=3349&view=rev
Author: lsantha
Date: 2007-07-06 04:07:32 -0700 (Fri, 06 Jul 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/awt/
trunk/core/src/openjdk/sun/sun/awt/EventListenerAggregate.java
trunk/core/src/openjdk/sun/sun/beans/
trunk/core/src/openjdk/sun/sun/beans/editors/
trunk/core/src/openjdk/sun/sun/beans/editors/BooleanEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/ByteEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/ColorEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/DoubleEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/EnumEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/FloatEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/FontEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/IntegerEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/LongEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/NumberEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/ShortEditor.java
trunk/core/src/openjdk/sun/sun/beans/editors/StringEditor.java
trunk/core/src/openjdk/sun/sun/beans/infos/
trunk/core/src/openjdk/sun/sun/beans/infos/ComponentBeanInfo.java
Added: trunk/core/src/openjdk/sun/sun/awt/EventListenerAggregate.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/EventListenerAggregate.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/EventListenerAggregate.java 2007-07-06 11:07:32 UTC (rev 3349)
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.awt;
+
+import java.lang.reflect.Array;
+import java.util.EventListener;
+
+
+/**
+ * A class that assists in managing {@link java.util.EventListener}s of
+ * the specified type. Its instance holds an array of listeners of the same
+ * type and allows to perform the typical operations on the listeners.
+ * This class is thread-safe.
+ *
+ * @version 1.9, 05/05/07
+ * @author Alexander Gerasimov
+ *
+ * @since 1.5
+ */
+public class EventListenerAggregate {
+
+ private EventListener[] listenerList;
+
+ /**
+ * Constructs an <code>EventListenerAggregate</code> object.
+ *
+ * @param listenerClass the type of the listeners to be managed by this object
+ *
+ * @throws NullPointerException if <code>listenerClass</code> is
+ * <code>null</code>
+ * @throws ClassCastException if <code>listenerClass</code> is not
+ * assignable to <code>java.util.EventListener</code>
+ */
+ public EventListenerAggregate(Class listenerClass) {
+ if (listenerClass == null) {
+ throw new NullPointerException("listener class is null");
+ }
+
+ if (!EventListener.class.isAssignableFrom(listenerClass)) {
+ throw new ClassCastException("listener class " + listenerClass +
+ " is not assignable to EventListener");
+ }
+
+ listenerList = (EventListener[])Array.newInstance(listenerClass, 0);
+ }
+
+ private Class getListenerClass() {
+ return listenerList.getClass().getComponentType();
+ }
+
+ /**
+ * Adds the listener to this aggregate.
+ *
+ * @param listener the listener to be added
+ *
+ * @throws ClassCastException if <code>listener</code> is not
+ * an instatce of <code>listenerClass</code> specified
+ * in the constructor
+ */
+ public synchronized void add(EventListener listener) {
+ Class listenerClass = getListenerClass();
+
+ if (!listenerClass.isInstance(listener)) { // null is not an instance of any class
+ throw new ClassCastException("listener " + listener + " is not " +
+ "an instance of listener class " + listenerClass);
+ }
+
+ EventListener[] tmp = (EventListener[])Array.newInstance(listenerClass, listenerList.length + 1);
+ System.arraycopy(listenerList, 0, tmp, 0, listenerList.length);
+ tmp[listenerList.length] = listener;
+ listenerList = tmp;
+ }
+
+ /**
+ * Removes a listener that is equal to the given one from this aggregate.
+ * <code>equals()</code> method is used to compare listeners.
+ *
+ * @param listener the listener to be removed
+ *
+ * @return <code>true</code> if this aggregate contained the specified
+ * <code>listener</code>; <code>false</code> otherwise
+ *
+ * @throws ClassCastException if <code>listener</code> is not
+ * an instatce of <code>listenerClass</code> specified
+ * in the constructor
+ */
+ public synchronized boolean remove(EventListener listener) {
+ Class listenerClass = getListenerClass();
+
+ if (!listenerClass.isInstance(listener)) { // null is not an instance of any class
+ throw new ClassCastException("listener " + listener + " is not " +
+ "an instance of listener class " + listenerClass);
+ }
+
+ for (int i = 0; i < listenerList.length; i++) {
+ if (listenerList[i].equals(listener)) {
+ EventListener[] tmp = (EventListener[])Array.newInstance(listenerClass,
+ listenerList.length - 1);
+ System.arraycopy(listenerList, 0, tmp, 0, i);
+ System.arraycopy(listenerList, i + 1, tmp, i, listenerList.length - i - 1);
+ listenerList = tmp;
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns an array of all the listeners contained in this aggregate.
+ * The array is the data structure in which listeners are stored internally.
+ * The runtime type of the returned array is "array of <code>listenerClass</code>"
+ * (<code>listenerClass</code> has been specified as a parameter to
+ * the constructor of this class).
+ *
+ * @return all the listeners contained in this aggregate (an empty
+ * array if there are no listeners)
+ */
+ public synchronized EventListener[] getListenersInternal() {
+ return listenerList;
+ }
+
+ /**
+ * Returns an array of all the listeners contained in this aggregate.
+ * The array is a copy of the data structure in which listeners are stored
+ * internally.
+ * The runtime type of the returned array is "array of <code>listenerClass</code>"
+ * (<code>listenerClass</code> has been specified as a parameter to
+ * the constructor of this class).
+ *
+ * @return a copy of all the listeners contained in this aggregate (an empty
+ * array if there are no listeners)
+ */
+ public synchronized EventListener[] getListenersCopy() {
+ return (listenerList.length == 0) ? listenerList : (EventListener[])listenerList.clone();
+ }
+
+ /**
+ * Returns the number of lisetners in this aggregate.
+ *
+ * @return the number of lisetners in this aggregate
+ */
+ public synchronized int size() {
+ return listenerList.length;
+ }
+
+ /**
+ * Returns <code>true</code> if this aggregate contains no listeners,
+ * <code>false</code> otherwise.
+ *
+ * @return <code>true</code> if this aggregate contains no listeners,
+ * <code>false</code> otherwise
+ */
+ public synchronized boolean isEmpty() {
+ return listenerList.length == 0;
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/beans/editors/BooleanEditor.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/beans/editors/BooleanEditor.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/beans/editors/BooleanEditor.java 2007-07-06 11:07:32 UTC (rev 3349)
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "boolean" type.
+ */
+
+import java.beans.*;
+
+public class BooleanEditor extends PropertyEditorSupport {
+
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value.toString()
+ : "null";
+ }
+
+ public String getAsText() {
+ Object value = getValue();
+ return (value instanceof Boolean)
+ ? getValidName((Boolean) value)
+ : null;
+ }
+
+ public void setAsText(String text) throws java.lang.IllegalArgumentException {
+ if (text == null) {
+ setValue(null);
+ } else if (isValidName(true, text)) {
+ setValue(Boolean.TRUE);
+ } else if (isValidName(false, text)) {
+ setValue(Boolean.FALSE);
+ } else {
+ throw new java.lang.IllegalArgumentException(text);
+ }
+ }
+
+ public String[] getTags() {
+ return new String[] {getValidName(true), getValidName(false)};
+ }
+
+ // the following method should be localized (4890258)
+
+ private String getValidName(boolean value) {
+ return value ? "True" : "False";
+ }
+
+ private boolean isValidName(boolean value, String name) {
+ return getValidName(value).equalsIgnoreCase(name);
+ }
+}
+
Added: trunk/core/src/openjdk/sun/sun/beans/editors/ByteEditor.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/beans/editors/ByteEditor.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/beans/editors/ByteEditor.java 2007-07-06 11:07:32 UTC (rev 3349)
@@ -0,0 +1,49 @@
+/*
+ * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "byte" type.
+ *
+ */
+
+import java.beans.*;
+
+public class ByteEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? "((byte)" + value + ")"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Byte.decode(text));
+ }
+
+}
+
Added: trunk/core/src/openjdk/sun/sun/beans/editors/ColorEditor.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/beans/editors/ColorEditor.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/beans/editors/ColorEditor.java 2007-07-06 11:07:32 UTC (rev 3349)
@@ -0,0 +1,213 @@
+/*
+ * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.beans.editors;
+
+import java.awt.*;
+import java.beans.*;
+
+public class ColorEditor extends Panel implements PropertyEditor {
+ public ColorEditor() {
+ setLayout(null);
+
+ ourWidth = hPad;
+
+ // Create a sample color block bordered in black
+ Panel p = new Panel();
+ p.setLayout(null);
+ p.setBackground(Color.black);
+ sample = new Canvas();
+ p.add(sample);
+ sample.reshape(2, 2, sampleWidth, sampleHeight);
+ add(p);
+ p.reshape(ourWidth, 2, sampleWidth+4, sampleHeight+4);
+ ourWidth += sampleWidth + 4 + hPad;
+
+ text = new TextField("", 14);
+ add(text);
+ text.reshape(ourWidth,0,100,30);
+ ourWidth += 100 + hPad;
+
+ choser = new Choice();
+ int active = 0;
+ for (int i = 0; i < colorNames.length; i++) {
+ choser.addItem(colorNames[i]);
+ }
+ add(choser);
+ choser.reshape(ourWidth,0,100,30);
+ ourWidth += 100 + hPad;
+
+ resize(ourWidth,40);
+ }
+
+ public void setValue(Object o) {
+ Color c = (Color)o;
+ changeColor(c);
+ }
+
+ public Dimension preferredSize() {
+ return new Dimension(ourWidth, 40);
+ }
+
+ public boolean keyUp(Event e, int key) {
+ if (e.target == text) {
+ try {
+ setAsText(text.getText());
+ } catch (IllegalArgumentException ex) {
+ // Quietly ignore.
+ }
+ }
+ return (false);
+ }
+
+ public void setAsText(String s) throws java.lang.IllegalArgumentException {
+ if (s == null) {
+ changeColor(null);
+ return;
+ }
+ int c1 = s.indexOf(',');
+ int c2 = s.indexOf(',', c1+1);
+ if (c1 < 0 || c2 < 0) {
+ // Invalid string.
+ throw new IllegalArgumentException(s);
+ }
+ try {
+ int r = Integer.parseInt(s.substring(0,c1));
+ int g = Integer.parseInt(s.substring(c1+1, c2));
+ int b = Integer.parseInt(s.substring(c2+1));
+ Color c = new Color(r,g,b);
+ changeColor(c);
+ } catch (Exception ex) {
+ throw new IllegalArgumentException(s);
+ }
+
+ }
+
+ public boolean action(Event e, Object arg) {
+ if (e.target == choser) {
+ changeColor(colors[choser.getSelectedIndex()]);
+ }
+ return false;
+ }
+
+ public String getJavaInitializationString() {
+ return (this.color != null)
+ ? "new java.awt.Color(" + this.color.getRGB() + ",true)"
+ : "null";
+ }
+
+
+ private void changeColor(Color c) {
+
+ if (c == null) {
+ this.color = null;
+ this.text.setText("");
+ return;
+ }
+
+ color = c;
+
+ text.setText("" + c.getRed() + "," + c.getGreen() + "," + c.getBlue());
+
+ int active = 0;
+ for (int i = 0; i < colorNames.length; i++) {
+ if (color.equals(colors[i])) {
+ active = i;
+ }
+ }
+ choser.select(active);
+
+ sample.setBackground(color);
+ sample.repaint();
+
+ support.firePropertyChange("", null, null);
+ }
+
+ public Object getValue() {
+ return color;
+ }
+
+ public boolean isPaintable() {
+ return true;
+ }
+
+ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
+ Color oldColor = gfx.getColor();
+ gfx.setColor(Color.black);
+ gfx.drawRect(box.x, box.y, box.width-3, box.height-3);
+ gfx.setColor(color);
+ gfx.fillRect(box.x+1, box.y+1, box.width-4, box.height-4);
+ gfx.setColor(oldColor);
+ }
+
+ public String getAsText() {
+ return (this.color != null)
+ ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue()
+ : null;
+ }
+
+ public String[] getTags() {
+ return null;
+ }
+
+ public java.awt.Component getCustomEditor() {
+ return this;
+ }
+
+ public boolean supportsCustomEditor() {
+ return true;
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener l) {
+ support.addPropertyChangeListener(l);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener l) {
+ support.removePropertyChangeListener(l);
+ }
+
+
+ private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray",
+ "black", "red", "pink", "orange",
+ "yellow", "green", "magenta", "cyan",
+ "blue"};
+ private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray,
+ Color.black, Color.red, Color.pink, Color.orange,
+ Color.yellow, Color.green, Color.magenta, Color.cyan,
+ Color.blue};
+
+ private Canvas sample;
+ private int sampleHeight = 20;
+ private int sampleWidth = 40;
+ private int hPad = 5;
+ private int ourWidth;
+
+ private Color color;
+ private TextField text;
+ private Choice choser;
+
+ private PropertyChangeSupport support = new PropertyChangeSupport(this);
+}
+
Added: trunk/core/src/openjdk/sun/sun/beans/editors/DoubleEditor.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/beans/editors/DoubleEditor.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/beans/editors/DoubleEditor.java 2007-07-06 11:07:32 UTC (rev 3349)
@@ -0,0 +1,42 @@
+/*
+ * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "double" type.
+ *
+ */
+
+import java.beans.*;
+
+public class DoubleEditor extends NumberEditor {
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Double.valueOf(text));
+ }
+
+}
+
Added: trunk/core/src/openjdk/sun/sun/beans/editors/EnumEditor.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/beans/editors/EnumEditor.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/beans/editors/EnumEditor.java 2007-07-06 11:07:32 UTC (rev 3349)
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package sun.beans.editors;
+
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyEditor;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Property editor for java.lang.Enum subclasses.
+ *
+ * @see PropertyEditor
+ *
+ * @since 1.7
+ *
+ * @version 1.6 05/05/07
+ * @author Sergey A. Malenkov
+ */
+public final class EnumEditor implements PropertyEditor {
+ private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
+
+ private final Class type;
+ private final String[] tags;
+
+ private Object value;
+
+ public EnumEditor( Class type ) {
+ Object[] values = type.getEnumConstants();
+ if ( values == null ) {
+ throw new IllegalArgumentException( "Unsupported " + type );
+ }
+ this.type = type;
+ this.tags = new String[values.length];
+ for ( int i = 0; i < values.length; i++ ) {
+ this.tags[i] = ( ( Enum )values[i] ).name();
+ }
+ }
+
+ public Object getValue() {
+ return this.value;
+ }
+
+ public void setValue( Object value ) {
+ if ( ( value != null ) && ( this.type != value.getClass() ) ) {
+ throw new IllegalArgumentException( "Unsupported value: " + value );
+ }
+ Object oldValue;
+ PropertyChangeListener[] listeners;
+ synchronized ( this.listeners ) {
+ oldValue = this.value;
+ this.value = value;
+
+ if ( ( value == null ) ? oldValue == null : value.equals( oldValue ) ) {
+ return; // do not fire event if value is not changed
+ }
+ int size = this.listeners.size();
+ if ( size == 0 ) {
+ return; // do not fire event if there are no any listener
+ }
+ listeners = this.listeners.toArray( new PropertyChangeListener[size] );
+ }
+ PropertyChangeEvent event = new PropertyChangeEvent( this, null, oldValue, value );
+ for ( PropertyChangeListener listener : listeners ) {
+ listener.propertyChange( event );
+ }
+ }
+
+ public String getAsText() {
+ return ( this.value != null )
+ ? ( ( Enum )this.value ).name()
+ : null;
+ }
+
+ public void setAsText( String text ) {
+ setValue( ( text != null )
+ ? Enum.valueOf( this.type, text )
+ : null );
+ }
+
+ public String[] getTags() {
+ return this.tags.clone();
+ }
+
+ public String getJavaInitializationString() {
+ String name = getAsText();
+ return ( name != null )
+ ? this.type.getName() + '.' + name
+ : "null";
+ }
+
+ public boolean isPaintable() {
+ return false;
+ }
+
+ public void paintValue( Graphics gfx, Rectangle box ) {
+ }
+
+ public boolean supportsCustomEditor() {
+ return false;
+ }
+
+ public Component getCustomEditor() {
+ return null;
+ }
+
+ public void addPropertyChangeListener( PropertyChangeListener listener ) {
+ synchronized ( this.listeners ) {
+ this.listeners.add( listener );
+ }
+ }
+
+ public void removePropertyChangeListener( PropertyChangeListener listener ) {
+ synchronized ( this.listeners ) {
+ this.listeners.remove( listener );
+ }
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/beans/editors/FloatEditor.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/beans/editors/FloatEditor.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/beans/editors/FloatEditor.java 2007-07-06 11:07:32 UTC (rev 3349)
@@ -0,0 +1,49 @@
+/*
+ * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.beans.editors;
+
+/**
+ * Property editor for a java builtin "float" type.
+ *
+ */
+
+import java.beans.*;
+
+public class FloatEditor extends NumberEditor {
+
+ public String getJavaInitializationString() {
+ Object value = getValue();
+ return (value != null)
+ ? value + "F"
+ : "null";
+ }
+
+ public void setAsText(String text) throws IllegalArgumentException {
+ setValue((text == null) ? null : Float.valueOf(text));
+ }
+
+}
+
Added: trunk/core/src/openjdk/sun/sun/beans/editors/FontEditor.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/beans/editors/FontEditor.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/beans/editors/FontEditor.java 2007-07-06 11:07:32 UTC (rev 3349)
@@ -0,0 +1,219 @@
+/*
+ * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accomp...
[truncated message content] |
|
From: <ls...@us...> - 2007-08-27 15:33:51
|
Revision: 3413
http://jnode.svn.sourceforge.net/jnode/?rev=3413&view=rev
Author: lsantha
Date: 2007-08-25 12:25:55 -0700 (Sat, 25 Aug 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/applet/
trunk/core/src/openjdk/sun/sun/applet/AppletAudioClip.java
trunk/core/src/openjdk/sun/sun/applet/AppletClassLoader.java
trunk/core/src/openjdk/sun/sun/applet/AppletEvent.java
trunk/core/src/openjdk/sun/sun/applet/AppletEventMulticaster.java
trunk/core/src/openjdk/sun/sun/applet/AppletIOException.java
trunk/core/src/openjdk/sun/sun/applet/AppletIllegalArgumentException.java
trunk/core/src/openjdk/sun/sun/applet/AppletImageRef.java
trunk/core/src/openjdk/sun/sun/applet/AppletListener.java
trunk/core/src/openjdk/sun/sun/applet/AppletMessageHandler.java
trunk/core/src/openjdk/sun/sun/applet/AppletObjectInputStream.java
trunk/core/src/openjdk/sun/sun/applet/AppletPanel.java
trunk/core/src/openjdk/sun/sun/applet/AppletProps.java
trunk/core/src/openjdk/sun/sun/applet/AppletResourceLoader.java
trunk/core/src/openjdk/sun/sun/applet/AppletSecurity.java
trunk/core/src/openjdk/sun/sun/applet/AppletSecurityException.java
trunk/core/src/openjdk/sun/sun/applet/AppletThreadGroup.java
trunk/core/src/openjdk/sun/sun/applet/AppletViewer.java
trunk/core/src/openjdk/sun/sun/applet/AppletViewerFactory.java
trunk/core/src/openjdk/sun/sun/applet/AppletViewerPanel.java
trunk/core/src/openjdk/sun/sun/applet/Main.java
trunk/core/src/openjdk/sun/sun/applet/resources/
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer.java
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer_de.java
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer_es.java
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer_fr.java
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer_it.java
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer_ja.java
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer_ko.java
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer_sv.java
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer_zh_CN.java
trunk/core/src/openjdk/sun/sun/applet/resources/MsgAppletViewer_zh_TW.java
Added: trunk/core/src/openjdk/sun/sun/applet/AppletAudioClip.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/applet/AppletAudioClip.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/applet/AppletAudioClip.java 2007-08-25 19:25:55 UTC (rev 3413)
@@ -0,0 +1,152 @@
+/*
+ * Copyright 1995-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.applet;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ByteArrayInputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.applet.AudioClip;
+
+import com.sun.media.sound.JavaSoundAudioClip;
+
+
+/**
+ * Applet audio clip;
+ *
+ * @version 1.40 07/05/05
+ * @author Arthur van Hoff, Kara Kytle
+ */
+
+public class AppletAudioClip implements AudioClip {
+
+ // url that this AudioClip is based on
+ private URL url = null;
+
+ // the audio clip implementation
+ private AudioClip audioClip = null;
+
+ boolean DEBUG = false /*true*/;
+
+ /**
+ * Constructs an AppletAudioClip from an URL.
+ */
+ public AppletAudioClip(URL url) {
+
+ // store the url
+ this.url = url;
+
+ try {
+ // create a stream from the url, and use it
+ // in the clip.
+ InputStream in = url.openStream();
+ createAppletAudioClip(in);
+
+ } catch (IOException e) {
+ /* just quell it */
+ if (DEBUG) {
+ System.err.println("IOException creating AppletAudioClip" + e);
+ }
+ }
+ }
+
+ /**
+ * Constructs an AppletAudioClip from a URLConnection.
+ */
+ public AppletAudioClip(URLConnection uc) {
+
+ try {
+ // create a stream from the url, and use it
+ // in the clip.
+ createAppletAudioClip(uc.getInputStream());
+
+ } catch (IOException e) {
+ /* just quell it */
+ if (DEBUG) {
+ System.err.println("IOException creating AppletAudioClip" + e);
+ }
+ }
+ }
+
+
+ /**
+ * For constructing directly from Jar entries, or any other
+ * raw Audio data. Note that the data provided must include the format
+ * header.
+ */
+ public AppletAudioClip(byte [] data) {
+
+ try {
+
+ // construct a stream from the byte array
+ InputStream in = new ByteArrayInputStream(data);
+
+ createAppletAudioClip(in);
+
+ } catch (IOException e) {
+ /* just quell it */
+ if (DEBUG) {
+ System.err.println("IOException creating AppletAudioClip " + e);
+ }
+ }
+ }
+
+
+ /*
+ * Does the real work of creating an AppletAudioClip from an InputStream.
+ * This function is used by both constructors.
+ */
+ void createAppletAudioClip(InputStream in) throws IOException {
+
+ try {
+ audioClip = new JavaSoundAudioClip(in);
+ } catch (Exception e3) {
+ // no matter what happened, we throw an IOException to avoid changing the interfaces....
+ throw new IOException("Failed to construct the AudioClip: " + e3);
+ }
+ }
+
+
+ public synchronized void play() {
+
+ if (audioClip != null)
+ audioClip.play();
+ }
+
+
+ public synchronized void loop() {
+
+ if (audioClip != null)
+ audioClip.loop();
+ }
+
+ public synchronized void stop() {
+
+ if (audioClip != null)
+ audioClip.stop();
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/applet/AppletClassLoader.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/applet/AppletClassLoader.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/applet/AppletClassLoader.java 2007-08-25 19:25:55 UTC (rev 3413)
@@ -0,0 +1,861 @@
+/*
+ * Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.applet;
+
+import java.lang.NullPointerException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.net.SocketPermission;
+import java.net.URLConnection;
+import java.net.MalformedURLException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.io.File;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.NoSuchElementException;
+import java.security.AccessController;
+import java.security.AccessControlContext;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedExceptionAction;
+import java.security.PrivilegedActionException;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import sun.awt.AppContext;
+import sun.awt.SunToolkit;
+import sun.net.www.ParseUtil;
+import sun.security.util.SecurityConstants;
+
+/**
+ * This class defines the class loader for loading applet classes and
+ * resources. It extends URLClassLoader to search the applet code base
+ * for the class or resource after checking any loaded JAR files.
+ */
+public class AppletClassLoader extends URLClassLoader {
+ private URL base; /* applet code base URL */
+ private CodeSource codesource; /* codesource for the base URL */
+ private AccessControlContext acc;
+ private boolean exceptionStatus = false;
+
+ private final Object threadGroupSynchronizer = new Object();
+ private final Object grabReleaseSynchronizer = new Object();
+
+ private boolean codebaseLookup = true;
+
+ /*
+ * Creates a new AppletClassLoader for the specified base URL.
+ */
+ protected AppletClassLoader(URL base) {
+ super(new URL[0]);
+ this.base = base;
+ this.codesource =
+ new CodeSource(base, (java.security.cert.Certificate[]) null);
+ acc = AccessController.getContext();
+ }
+
+ /**
+ * Set the codebase lookup flag.
+ */
+ void setCodebaseLookup(boolean codebaseLookup) {
+ this.codebaseLookup = codebaseLookup;
+ }
+
+ /*
+ * Returns the applet code base URL.
+ */
+ URL getBaseURL() {
+ return base;
+ }
+
+ /*
+ * Returns the URLs used for loading classes and resources.
+ */
+ public URL[] getURLs() {
+ URL[] jars = super.getURLs();
+ URL[] urls = new URL[jars.length + 1];
+ System.arraycopy(jars, 0, urls, 0, jars.length);
+ urls[urls.length - 1] = base;
+ return urls;
+ }
+
+ /*
+ * Adds the specified JAR file to the search path of loaded JAR files.
+ * Changed modifier to protected in order to be able to overwrite addJar()
+ * in PluginClassLoader.java
+ */
+ protected void addJar(String name) throws IOException {
+ URL url;
+ try {
+ url = new URL(base, name);
+ } catch (MalformedURLException e) {
+ throw new IllegalArgumentException("name");
+ }
+ addURL(url);
+ // DEBUG
+ //URL[] urls = getURLs();
+ //for (int i = 0; i < urls.length; i++) {
+ // System.out.println("url[" + i + "] = " + urls[i]);
+ //}
+ }
+
+ /*
+ * Override loadClass so that class loading errors can be caught in
+ * order to print better error messages.
+ */
+ public synchronized Class loadClass(String name, boolean resolve)
+ throws ClassNotFoundException
+ {
+ // First check if we have permission to access the package. This
+ // should go away once we've added support for exported packages.
+ int i = name.lastIndexOf('.');
+ if (i != -1) {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null)
+ sm.checkPackageAccess(name.substring(0, i));
+ }
+ try {
+ return super.loadClass(name, resolve);
+ } catch (ClassNotFoundException e) {
+ //printError(name, e.getException());
+ throw e;
+ } catch (RuntimeException e) {
+ //printError(name, e);
+ throw e;
+ } catch (Error e) {
+ //printError(name, e);
+ throw e;
+ }
+ }
+
+ /*
+ * Finds the applet class with the specified name. First searches
+ * loaded JAR files then the applet code base for the class.
+ */
+ protected Class findClass(String name) throws ClassNotFoundException {
+
+ int index = name.indexOf(";");
+ String cookie = "";
+ if(index != -1) {
+ cookie = name.substring(index, name.length());
+ name = name.substring(0, index);
+ }
+
+ // check loaded JAR files
+ try {
+ return super.findClass(name);
+ } catch (ClassNotFoundException e) {
+ }
+
+ // Otherwise, try loading the class from the code base URL
+
+ // 4668479: Option to turn off codebase lookup in AppletClassLoader
+ // during resource requests. [stanley.ho]
+ if (codebaseLookup == false)
+ throw new ClassNotFoundException(name);
+
+// final String path = name.replace('.', '/').concat(".class").concat(cookie);
+ String encodedName = ParseUtil.encodePath(name.replace('.', '/'), false);
+ final String path = (new StringBuffer(encodedName)).append(".class").append(cookie).toString();
+ try {
+ byte[] b = (byte[]) AccessController.doPrivileged(
+ new PrivilegedExceptionAction() {
+ public Object run() throws IOException {
+ return getBytes(new URL(base, path));
+ }
+ }, acc);
+
+ if (b != null) {
+ return defineClass(name, b, 0, b.length, codesource);
+ } else {
+ throw new ClassNotFoundException(name);
+ }
+ } catch (PrivilegedActionException e) {
+ throw new ClassNotFoundException(name, e.getException());
+ }
+ }
+
+ /**
+ * Returns the permissions for the given codesource object.
+ * The implementation of this method first calls super.getPermissions,
+ * to get the permissions
+ * granted by the super class, and then adds additional permissions
+ * based on the URL of the codesource.
+ * <p>
+ * If the protocol is "file"
+ * and the path specifies a file, permission is granted to read all files
+ * and (recursively) all files and subdirectories contained in
+ * that directory. This is so applets with a codebase of
+ * file:/blah/some.jar can read in file:/blah/, which is needed to
+ * be backward compatible. We also add permission to connect back to
+ * the "localhost".
+ *
+ * @param codesource the codesource
+ * @return the permissions granted to the codesource
+ */
+ protected PermissionCollection getPermissions(CodeSource codesource)
+ {
+ final PermissionCollection perms = super.getPermissions(codesource);
+
+ URL url = codesource.getLocation();
+
+ String path = null;
+ Permission p;
+
+ try {
+ p = url.openConnection().getPermission();
+ } catch (java.io.IOException ioe) {
+ p = null;
+ }
+
+ if (p instanceof FilePermission) {
+ path = p.getName();
+ } else if ((p == null) && (url.getProtocol().equals("file"))) {
+ path = url.getFile().replace('/', File.separatorChar);
+ path = ParseUtil.decode(path);
+ }
+
+ if (path != null) {
+ if (!path.endsWith(File.separator)) {
+ int endIndex = path.lastIndexOf(File.separatorChar);
+ if (endIndex != -1) {
+ path = path.substring(0, endIndex+1) + "-";
+ perms.add(new FilePermission(path,
+ SecurityConstants.FILE_READ_ACTION));
+ }
+ }
+ perms.add(new SocketPermission("localhost",
+ SecurityConstants.SOCKET_CONNECT_ACCEPT_ACTION));
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ try {
+ String host = InetAddress.getLocalHost().getHostName();
+ perms.add(new SocketPermission(host,
+ SecurityConstants.SOCKET_CONNECT_ACCEPT_ACTION));
+ } catch (UnknownHostException uhe) {
+
+ }
+ return null;
+ }
+ });
+
+ Permission bperm;
+ try {
+ bperm = base.openConnection().getPermission();
+ } catch (java.io.IOException ioe) {
+ bperm = null;
+ }
+ if (bperm instanceof FilePermission) {
+ String bpath = bperm.getName();
+ if (bpath.endsWith(File.separator)) {
+ bpath += "-";
+ }
+ perms.add(new FilePermission(bpath,
+ SecurityConstants.FILE_READ_ACTION));
+ } else if ((bperm == null) && (base.getProtocol().equals("file"))) {
+ String bpath = base.getFile().replace('/', File.separatorChar);
+ bpath = ParseUtil.decode(bpath);
+ if (bpath.endsWith(File.separator)) {
+ bpath += "-";
+ }
+ perms.add(new FilePermission(bpath, SecurityConstants.FILE_READ_ACTION));
+ }
+
+ }
+ return perms;
+ }
+
+ /*
+ * Returns the contents of the specified URL as an array of bytes.
+ */
+ private static byte[] getBytes(URL url) throws IOException {
+ URLConnection uc = url.openConnection();
+ if (uc instanceof java.net.HttpURLConnection) {
+ java.net.HttpURLConnection huc = (java.net.HttpURLConnection) uc;
+ int code = huc.getResponseCode();
+ if (code >= java.net.HttpURLConnection.HTTP_BAD_REQUEST) {
+ throw new IOException("open HTTP connection failed.");
+ }
+ }
+ int len = uc.getContentLength();
+
+ // Fixed #4507227: Slow performance to load
+ // class and resources. [stanleyh]
+ //
+ // Use buffered input stream [stanleyh]
+ InputStream in = new BufferedInputStream(uc.getInputStream());
+
+ byte[] b;
+ try {
+ if (len != -1) {
+ // Read exactly len bytes from the input stream
+ b = new byte[len];
+ while (len > 0) {
+ int n = in.read(b, b.length - len, len);
+ if (n == -1) {
+ throw new IOException("unexpected EOF");
+ }
+ len -= n;
+ }
+ } else {
+ // Read until end of stream is reached - use 8K buffer
+ // to speed up performance [stanleyh]
+ b = new byte[8192];
+ int total = 0;
+ while ((len = in.read(b, total, b.length - total)) != -1) {
+ total += len;
+ if (total >= b.length) {
+ byte[] tmp = new byte[total * 2];
+ System.arraycopy(b, 0, tmp, 0, total);
+ b = tmp;
+ }
+ }
+ // Trim array to correct size, if necessary
+ if (total != b.length) {
+ byte[] tmp = new byte[total];
+ System.arraycopy(b, 0, tmp, 0, total);
+ b = tmp;
+ }
+ }
+ } finally {
+ in.close();
+ }
+ return b;
+ }
+
+ // Object for synchronization around getResourceAsStream()
+ private Object syncResourceAsStream = new Object();
+ private Object syncResourceAsStreamFromJar = new Object();
+
+ // Flag to indicate getResourceAsStream() is in call
+ private boolean resourceAsStreamInCall = false;
+ private boolean resourceAsStreamFromJarInCall = false;
+
+ /**
+ * Returns an input stream for reading the specified resource.
+ *
+ * The search order is described in the documentation for {@link
+ * #getResource(String)}.<p>
+ *
+ * @param name the resource name
+ * @return an input stream for reading the resource, or <code>null</code>
+ * if the resource could not be found
+ * @since JDK1.1
+ */
+ public InputStream getResourceAsStream(String name)
+ {
+
+ if (name == null) {
+ throw new NullPointerException("name");
+ }
+
+ try
+ {
+ InputStream is = null;
+
+ // Fixed #4507227: Slow performance to load
+ // class and resources. [stanleyh]
+ //
+ // The following is used to avoid calling
+ // AppletClassLoader.findResource() in
+ // super.getResourceAsStream(). Otherwise,
+ // unnecessary connection will be made.
+ //
+ synchronized(syncResourceAsStream)
+ {
+ resourceAsStreamInCall = true;
+
+ // Call super class
+ is = super.getResourceAsStream(name);
+
+ resourceAsStreamInCall = false;
+ }
+
+ // 4668479: Option to turn off codebase lookup in AppletClassLoader
+ // during resource requests. [stanley.ho]
+ if (codebaseLookup == true && is == null)
+ {
+ // If resource cannot be obtained,
+ // try to download it from codebase
+ URL url = new URL(base, ParseUtil.encodePath(name, false));
+ is = url.openStream();
+ }
+
+ return is;
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ }
+
+
+ /**
+ * Returns an input stream for reading the specified resource from the
+ * the loaded jar files.
+ *
+ * The search order is described in the documentation for {@link
+ * #getResource(String)}.<p>
+ *
+ * @param name the resource name
+ * @return an input stream for reading the resource, or <code>null</code>
+ * if the resource could not be found
+ * @since JDK1.1
+ */
+ public InputStream getResourceAsStreamFromJar(String name) {
+
+ if (name == null) {
+ throw new NullPointerException("name");
+ }
+
+ try {
+ InputStream is = null;
+ synchronized(syncResourceAsStreamFromJar) {
+ resourceAsStreamFromJarInCall = true;
+ // Call super class
+ is = super.getResourceAsStream(name);
+ resourceAsStreamFromJarInCall = false;
+ }
+
+ return is;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+
+ /*
+ * Finds the applet resource with the specified name. First checks
+ * loaded JAR files then the applet code base for the resource.
+ */
+ public URL findResource(String name) {
+ // check loaded JAR files
+ URL url = super.findResource(name);
+
+ // 6215746: Disable META-INF/* lookup from codebase in
+ // applet/plugin classloader. [stanley.ho]
+ if (name.startsWith("META-INF/"))
+ return url;
+
+ // 4668479: Option to turn off codebase lookup in AppletClassLoader
+ // during resource requests. [stanley.ho]
+ if (codebaseLookup == false)
+ return url;
+
+ if (url == null)
+ {
+ //#4805170, if it is a call from Applet.getImage()
+ //we should check for the image only in the archives
+ boolean insideGetResourceAsStreamFromJar = false;
+ synchronized(syncResourceAsStreamFromJar) {
+ insideGetResourceAsStreamFromJar = resourceAsStreamFromJarInCall;
+ }
+
+ if (insideGetResourceAsStreamFromJar) {
+ return null;
+ }
+
+ // Fixed #4507227: Slow performance to load
+ // class and resources. [stanleyh]
+ //
+ // Check if getResourceAsStream is called.
+ //
+ boolean insideGetResourceAsStream = false;
+
+ synchronized(syncResourceAsStream)
+ {
+ insideGetResourceAsStream = resourceAsStreamInCall;
+ }
+
+ // If getResourceAsStream is called, don't
+ // trigger the following code. Otherwise,
+ // unnecessary connection will be made.
+ //
+ if (insideGetResourceAsStream == false)
+ {
+ // otherwise, try the code base
+ try {
+ url = new URL(base, ParseUtil.encodePath(name, false));
+ // check if resource exists
+ if(!resourceExists(url))
+ url = null;
+ } catch (Exception e) {
+ // all exceptions, including security exceptions, are caught
+ url = null;
+ }
+ }
+ }
+ return url;
+ }
+
+
+ private boolean resourceExists(URL url) {
+ // Check if the resource exists.
+ // It almost works to just try to do an openConnection() but
+ // HttpURLConnection will return true on HTTP_BAD_REQUEST
+ // when the requested name ends in ".html", ".htm", and ".txt"
+ // and we want to be able to handle these
+ //
+ // Also, cannot just open a connection for things like FileURLConnection,
+ // because they succeed when connecting to a nonexistent file.
+ // So, in those cases we open and close an input stream.
+ boolean ok = true;
+ try {
+ URLConnection conn = url.openConnection();
+ if (conn instanceof java.net.HttpURLConnection) {
+ java.net.HttpURLConnection hconn =
+ (java.net.HttpURLConnection) conn;
+
+ // To reduce overhead, using http HEAD method instead of GET method
+ hconn.setRequestMethod("HEAD");
+
+ int code = hconn.getResponseCode();
+ if (code == java.net.HttpURLConnection.HTTP_OK) {
+ return true;
+ }
+ if (code >= java.net.HttpURLConnection.HTTP_BAD_REQUEST) {
+ return false;
+ }
+ } else {
+ /**
+ * Fix for #4182052 - stanleyh
+ *
+ * The same connection should be reused to avoid multiple
+ * HTTP connections
+ */
+
+ // our best guess for the other cases
+ InputStream is = conn.getInputStream();
+ is.close();
+ }
+ } catch (Exception ex) {
+ ok = false;
+ }
+ return ok;
+ }
+
+ /*
+ * Returns an enumeration of all the applet resources with the specified
+ * name. First checks loaded JAR files then the applet code base for all
+ * available resources.
+ */
+ public Enumeration findResources(String name) throws IOException {
+
+ final Enumeration e = super.findResources(name);
+
+ // 6215746: Disable META-INF/* lookup from codebase in
+ // applet/plugin classloader. [stanley.ho]
+ if (name.startsWith("META-INF/"))
+ return e;
+
+ // 4668479: Option to turn off codebase lookup in AppletClassLoader
+ // during resource requests. [stanley.ho]
+ if (codebaseLookup == false)
+ return e;
+
+ URL u = new URL(base, ParseUtil.encodePath(name, false));
+ if (!resourceExists(u)) {
+ u = null;
+ }
+
+ final URL url = u;
+ return new Enumeration() {
+ private boolean done;
+ public Object nextElement() {
+ if (!done) {
+ if (e.hasMoreElements()) {
+ return e.nextElement();
+ }
+ done = true;
+ if (url != null) {
+ return url;
+ }
+ }
+ throw new NoSuchElementException();
+ }
+ public boolean hasMoreElements() {
+ return !done && (e.hasMoreElements() || url != null);
+ }
+ };
+ }
+
+ /*
+ * Load and resolve the file specified by the applet tag CODE
+ * attribute. The argument can either be the relative path
+ * of the class file itself or just the name of the class.
+ */
+ Class loadCode(String name) throws ClassNotFoundException {
+ // first convert any '/' or native file separator to .
+ name = name.replace('/', '.');
+ name = name.replace(File.separatorChar, '.');
+
+ // deal with URL rewriting
+ String cookie = null;
+ int index = name.indexOf(";");
+ if(index != -1) {
+ cookie = name.substring(index, name.length());
+ name = name.substring(0, index);
+ }
+
+ // save that name for later
+ String fullName = name;
+ // then strip off any suffixes
+ if (name.endsWith(".class") || name.endsWith(".java")) {
+ name = name.substring(0, name.lastIndexOf('.'));
+ }
+ try {
+ if(cookie != null)
+ name = (new StringBuffer(name)).append(cookie).toString();
+ return loadClass(name);
+ } catch (ClassNotFoundException e) {
+ }
+ // then if it didn't end with .java or .class, or in the
+ // really pathological case of a class named class or java
+ if(cookie != null)
+ fullName = (new StringBuffer(fullName)).append(cookie).toString();
+
+ return loadClass(fullName);
+ }
+
+ /*
+ * The threadgroup that the applets loaded by this classloader live
+ * in. In the sun.* implementation of applets, the security manager's
+ * (AppletSecurity) getThreadGroup returns the thread group of the
+ * first applet on the stack, which is the applet's thread group.
+ */
+ private AppletThreadGroup threadGroup;
+ private AppContext appContext;
+
+ ThreadGroup getThreadGroup() {
+ synchronized (threadGroupSynchronizer) {
+ if (threadGroup == null || threadGroup.isDestroyed()) {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ threadGroup = new AppletThreadGroup(base + "-threadGroup");
+ // threadGroup.setDaemon(true);
+ // threadGroup is now destroyed by AppContext.dispose()
+
+ // Create the new AppContext from within a Thread belonging
+ // to the newly created ThreadGroup, and wait for the
+ // creation to complete before returning from this method.
+ AppContextCreator creatorThread = new AppContextCreator(threadGroup);
+
+ // Since this thread will later be used to launch the
+ // applet's AWT-event dispatch thread and we want the applet
+ // code executing the AWT callbacks to use their own class
+ // loader rather than the system class loader, explicitly
+ // set the context class loader to the AppletClassLoader.
+ creatorThread.setContextClassLoader(AppletClassLoader.this);
+
+ synchronized(creatorThread.syncObject) {
+ creatorThread.start();
+ try {
+ creatorThread.syncObject.wait();
+ } catch (InterruptedException e) { }
+ appContext = creatorThread.appContext;
+ }
+ return null;
+ }
+ });
+ }
+ return threadGroup;
+ }
+ }
+
+ /*
+ * Get the AppContext, if any, corresponding to this AppletClassLoader.
+ */
+ AppContext getAppContext() {
+ return appContext;
+ }
+
+ int usageCount = 0;
+
+ /**
+ * Grab this AppletClassLoader and its ThreadGroup/AppContext, so they
+ * won't be destroyed.
+ */
+ void grab() {
+ synchronized(grabReleaseSynchronizer) {
+ usageCount++;
+ }
+ getThre...
[truncated message content] |
|
From: <ls...@us...> - 2008-03-16 20:05:10
|
Revision: 3847
http://jnode.svn.sourceforge.net/jnode/?rev=3847&view=rev
Author: lsantha
Date: 2008-03-16 13:05:09 -0700 (Sun, 16 Mar 2008)
Log Message:
-----------
OpenJDK AWT & Swing integration.
Modified Paths:
--------------
trunk/core/src/openjdk/sun/sun/awt/SunToolkit.java
trunk/core/src/openjdk/sun/sun/font/StrikeCache.java
trunk/core/src/openjdk/sun/sun/swing/SwingUtilities2.java
Added Paths:
-----------
trunk/core/src/openjdk/sun/sun/awt/Graphics2Delegate.java
trunk/core/src/openjdk/sun/sun/awt/PaintEventDispatcher.java
trunk/core/src/openjdk/sun/sun/awt/RequestFocusController.java
trunk/core/src/openjdk/sun/sun/awt/SunGraphicsCallback.java
trunk/core/src/openjdk/sun/sun/awt/event/
trunk/core/src/openjdk/sun/sun/awt/event/IgnorePaintEvent.java
trunk/core/src/openjdk/sun/sun/awt/resources/
trunk/core/src/openjdk/sun/sun/awt/resources/awt.properties
trunk/core/src/openjdk/sun/sun/awt/resources/awt_de.properties
trunk/core/src/openjdk/sun/sun/awt/resources/awt_es.properties
trunk/core/src/openjdk/sun/sun/awt/resources/awt_fr.properties
trunk/core/src/openjdk/sun/sun/awt/resources/awt_it.properties
trunk/core/src/openjdk/sun/sun/awt/resources/awt_ja.properties
trunk/core/src/openjdk/sun/sun/awt/resources/awt_ko.properties
trunk/core/src/openjdk/sun/sun/awt/resources/awt_sv.properties
trunk/core/src/openjdk/sun/sun/awt/resources/awt_zh_CN.properties
trunk/core/src/openjdk/sun/sun/awt/resources/awt_zh_TW.properties
Added: trunk/core/src/openjdk/sun/sun/awt/Graphics2Delegate.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/Graphics2Delegate.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/Graphics2Delegate.java 2008-03-16 20:05:09 UTC (rev 3847)
@@ -0,0 +1,33 @@
+/*
+ * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.awt;
+
+import java.awt.Color;
+
+
+public interface Graphics2Delegate {
+ void setBackground(Color color);
+}
Added: trunk/core/src/openjdk/sun/sun/awt/PaintEventDispatcher.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/PaintEventDispatcher.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/PaintEventDispatcher.java 2008-03-16 20:05:09 UTC (rev 3847)
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package sun.awt;
+
+import java.awt.Component;
+import java.awt.Rectangle;
+import java.awt.event.PaintEvent;
+
+/**
+ * PaintEventDispatcher is responsible for dispatching PaintEvents. There
+ * can be only one PaintEventDispatcher active at a particular time.
+ *
+ * @version 1.9, 05/05/07
+ */
+public class PaintEventDispatcher {
+ /**
+ * Singleton dispatcher.
+ */
+ private static PaintEventDispatcher dispatcher;
+
+ /**
+ * Sets the current <code>PaintEventDispatcher</code>.
+ *
+ * @param dispatcher PaintEventDispatcher
+ */
+ public static void setPaintEventDispatcher(
+ PaintEventDispatcher dispatcher) {
+ synchronized(PaintEventDispatcher.class) {
+ PaintEventDispatcher.dispatcher = dispatcher;
+ }
+ }
+
+ /**
+ * Returns the currently active <code>PaintEventDispatcher</code>. This
+ * will never return null.
+ *
+ * @return PaintEventDispatcher
+ */
+ public static PaintEventDispatcher getPaintEventDispatcher() {
+ synchronized(PaintEventDispatcher.class) {
+ if (dispatcher == null) {
+ dispatcher = new PaintEventDispatcher();
+ }
+ return dispatcher;
+ }
+ }
+
+ /**
+ * Creates and returns the <code>PaintEvent</code> that should be
+ * dispatched for the specified component. If this returns null
+ * no <code>PaintEvent</code> is dispatched.
+ * <p>
+ * <b>WARNING:</b> This is invoked from the native thread, be careful
+ * what methods you end up invoking here.
+ */
+ public PaintEvent createPaintEvent(Component target, int x, int y, int w,
+ int h) {
+
+ return new PaintEvent((Component)target, PaintEvent.PAINT,
+ new Rectangle(x, y, w, h));
+ }
+
+ /**
+ * Returns true if a native background erase should be done for
+ * the specified Component.
+ */
+ public boolean shouldDoNativeBackgroundErase(Component c) {
+ return true;
+ }
+
+ /**
+ * This method is invoked from the toolkit thread when the surface
+ * data of the component needs to be replaced. The method run() of
+ * the Runnable argument performs surface data replacing, run()
+ * should be invoked on the EDT of this component's AppContext.
+ * Returns true if the Runnable has been enqueued to be invoked
+ * on the EDT.
+ * (Fix 6255371.)
+ */
+ public boolean queueSurfaceDataReplacing(Component c, Runnable r) {
+ return false;
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/awt/RequestFocusController.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/RequestFocusController.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/RequestFocusController.java 2008-03-16 20:05:09 UTC (rev 3847)
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package sun.awt;
+
+import java.awt.Component;
+
+public interface RequestFocusController
+{
+ public boolean acceptRequestFocus(Component from, Component to,
+ boolean temporary, boolean focusedWindowChangeAllowed,
+ CausedFocusEvent.Cause cause);
+}
Added: trunk/core/src/openjdk/sun/sun/awt/SunGraphicsCallback.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/SunGraphicsCallback.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/SunGraphicsCallback.java 2008-03-16 20:05:09 UTC (rev 3847)
@@ -0,0 +1,158 @@
+/*
+ * Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.awt;
+
+import java.awt.*;
+
+
+public abstract class SunGraphicsCallback {
+ public static final int HEAVYWEIGHTS = 0x1;
+ public static final int LIGHTWEIGHTS = 0x2;
+ public static final int TWO_PASSES = 0x4;
+
+ private static final DebugHelper dbg =
+ DebugHelper.create(SunGraphicsCallback.class);
+
+ public abstract void run(Component comp, Graphics cg);
+
+ protected void constrainGraphics(Graphics g, Rectangle bounds) {
+ if (g instanceof ConstrainableGraphics) {
+ ((ConstrainableGraphics)g).constrain(bounds.x, bounds.y, bounds.width, bounds.height);
+ } else {
+ g.translate(bounds.x, bounds.y);
+ }
+ g.clipRect(0, 0, bounds.width, bounds.height);
+ }
+
+ public final void runOneComponent(Component comp, Rectangle bounds,
+ Graphics g, Shape clip,
+ int weightFlags) {
+ if (comp == null || comp.getPeer() == null || !comp.isVisible()) {
+ return;
+ }
+ boolean lightweight = comp.isLightweight();
+ if ((lightweight && (weightFlags & LIGHTWEIGHTS) == 0) ||
+ (!lightweight && (weightFlags & HEAVYWEIGHTS) == 0)) {
+ return;
+ }
+
+ if (bounds == null) {
+ bounds = comp.getBounds();
+ }
+
+ if (clip == null || clip.intersects(bounds)) {
+ Graphics cg = g.create();
+ try {
+ constrainGraphics(cg, bounds);
+ cg.setFont(comp.getFont());
+ cg.setColor(comp.getForeground());
+ if (cg instanceof Graphics2D) {
+ ((Graphics2D)cg).setBackground(comp.getBackground());
+ } else if (cg instanceof Graphics2Delegate) {
+ ((Graphics2Delegate)cg).setBackground(
+ comp.getBackground());
+ }
+ run(comp, cg);
+ } finally {
+ cg.dispose();
+ }
+ }
+ }
+
+ public final void runComponents(Component[] comps, Graphics g,
+ int weightFlags) {
+ int ncomponents = comps.length;
+ Shape clip = g.getClip();
+
+ if (dbg.on && clip != null) {
+ Rectangle newrect = clip.getBounds();
+ dbg.println("GraphicsCallback::runComponents : x = " +
+ newrect.x + " y = " + newrect.y + " width = " +
+ newrect.width + " height = " + newrect.height);
+ }
+
+ // A seriously sad hack--
+ // Lightweight components always paint behind peered components,
+ // even if they are at the top of the Z order. We emulate this
+ // behavior by making two printing passes: the first for lightweights;
+ // the second for heavyweights.
+ //
+ // ToDo(dpm): Either build a list of heavyweights during the
+ // lightweight pass, or redesign the components array to keep
+ // lightweights and heavyweights separate.
+ if ((weightFlags & TWO_PASSES) != 0) {
+ for (int i = ncomponents - 1; i >= 0; i--) {
+ runOneComponent(comps[i], null, g, clip, LIGHTWEIGHTS);
+ }
+ for (int i = ncomponents - 1; i >= 0; i--) {
+ runOneComponent(comps[i], null, g, clip, HEAVYWEIGHTS);
+ }
+ } else {
+ for (int i = ncomponents - 1; i >= 0; i--) {
+ runOneComponent(comps[i], null, g, clip, weightFlags);
+ }
+ }
+ }
+
+ public static final class PaintHeavyweightComponentsCallback
+ extends SunGraphicsCallback
+ {
+ private static PaintHeavyweightComponentsCallback instance =
+ new PaintHeavyweightComponentsCallback();
+
+ private PaintHeavyweightComponentsCallback() {}
+ public void run(Component comp, Graphics cg) {
+ if (!comp.isLightweight()) {
+ comp.paintAll(cg);
+ } else if (comp instanceof Container) {
+ runComponents(((Container)comp).getComponents(), cg,
+ LIGHTWEIGHTS | HEAVYWEIGHTS);
+ }
+ }
+ public static PaintHeavyweightComponentsCallback getInstance() {
+ return instance;
+ }
+ }
+ public static final class PrintHeavyweightComponentsCallback
+ extends SunGraphicsCallback
+ {
+ private static PrintHeavyweightComponentsCallback instance =
+ new PrintHeavyweightComponentsCallback();
+
+ private PrintHeavyweightComponentsCallback() {}
+ public void run(Component comp, Graphics cg) {
+ if (!comp.isLightweight()) {
+ comp.printAll(cg);
+ } else if (comp instanceof Container) {
+ runComponents(((Container)comp).getComponents(), cg,
+ LIGHTWEIGHTS | HEAVYWEIGHTS);
+ }
+ }
+ public static PrintHeavyweightComponentsCallback getInstance() {
+ return instance;
+ }
+ }
+}
Modified: trunk/core/src/openjdk/sun/sun/awt/SunToolkit.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/SunToolkit.java 2008-03-16 20:04:22 UTC (rev 3846)
+++ trunk/core/src/openjdk/sun/sun/awt/SunToolkit.java 2008-03-16 20:05:09 UTC (rev 3847)
@@ -1132,9 +1132,12 @@
}
public static EventQueue getSystemEventQueueImplPP(AppContext appContext) {
+ return Toolkit.getDefaultToolkit().getSystemEventQueue();
+ /*jnode
EventQueue theEventQueue =
(EventQueue)appContext.get(AppContext.EVENT_QUEUE_KEY);
return theEventQueue;
+ */
}
/**
Added: trunk/core/src/openjdk/sun/sun/awt/event/IgnorePaintEvent.java
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/event/IgnorePaintEvent.java (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/event/IgnorePaintEvent.java 2008-03-16 20:05:09 UTC (rev 3847)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package sun.awt.event;
+
+import java.awt.Component;
+import java.awt.Rectangle;
+import java.awt.event.PaintEvent;
+
+/**
+ * PaintEvents that are effectively ignored. This class is used only for
+ * tagging. If a heavy weight peer is asked to handle an event of this
+ * class it'll ignore it. This class is used by Swing.
+ * Look at <code>javax.swing.SwingPaintEventDispatcher</code> for more.
+ *
+ * @version 1.8, 05/05/07
+ */
+public class IgnorePaintEvent extends PaintEvent {
+ public IgnorePaintEvent(Component source, int id, Rectangle updateRect) {
+ super(source, id, updateRect);
+ }
+}
Added: trunk/core/src/openjdk/sun/sun/awt/resources/awt.properties
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/resources/awt.properties (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/resources/awt.properties 2008-03-16 20:05:09 UTC (rev 3847)
@@ -0,0 +1,196 @@
+# @(#)awt.properties 1.23 03/07/11 1.23, 07/11/03
+
+#
+# AWT-specific properties
+#
+
+# Modifier names
+AWT.shift=Shift
+AWT.control=Ctrl
+AWT.alt=Alt
+AWT.meta=Meta
+AWT.altGraph=Alt Graph
+
+# Key names
+AWT.enter=Enter
+AWT.backSpace=Backspace
+AWT.tab=Tab
+AWT.cancel=Cancel
+AWT.clear=Clear
+AWT.pause=Pause
+AWT.capsLock=Caps Lock
+AWT.escape=Escape
+AWT.space=Space
+AWT.pgup=Page Up
+AWT.pgdn=Page Down
+AWT.end=End
+AWT.home=Home
+AWT.left=Left
+AWT.up=Up
+AWT.right=Right
+AWT.down=Down
+AWT.begin=Begin
+AWT.comma=Comma
+AWT.period=Period
+AWT.slash=Slash
+AWT.semicolon=Semicolon
+AWT.equals=Equals
+AWT.openBracket=Open Bracket
+AWT.backSlash=Back Slash
+AWT.closeBracket=Close Bracket
+AWT.multiply=NumPad *
+AWT.add=NumPad +
+AWT.separator=NumPad ,
+AWT.separater=NumPad ,
+AWT.subtract=NumPad -
+AWT.decimal=NumPad .
+AWT.divide=NumPad /
+AWT.delete=Delete
+AWT.numLock=Num Lock
+AWT.scrollLock=Scroll Lock
+AWT.f1=F1
+AWT.f2=F2
+AWT.f3=F3
+AWT.f4=F4
+AWT.f5=F5
+AWT.f6=F6
+AWT.f7=F7
+AWT.f8=F8
+AWT.f9=F9
+AWT.f10=F10
+AWT.f11=F11
+AWT.f12=F12
+AWT.f13=F13
+AWT.f14=F14
+AWT.f15=F15
+AWT.f16=F16
+AWT.f17=F17
+AWT.f18=F18
+AWT.f19=F19
+AWT.f20=F20
+AWT.f21=F21
+AWT.f22=F22
+AWT.f23=F23
+AWT.f24=F24
+AWT.printScreen=Print Screen
+AWT.insert=Insert
+AWT.help=Help
+AWT.windows=Windows
+AWT.context=Context Menu
+AWT.backQuote=Back Quote
+AWT.quote=Quote
+AWT.deadGrave=Dead Grave
+AWT.deadAcute=Dead Acute
+AWT.deadCircumflex=Dead Circumflex
+AWT.deadTilde=Dead Tilde
+AWT.deadMacron=Dead Macron
+AWT.deadBreve=Dead Breve
+AWT.deadAboveDot=Dead Above Dot
+AWT.deadDiaeresis=Dead Diaeresis
+AWT.deadAboveRing=Dead Above Ring
+AWT.deadDoubleAcute=Dead Double Acute
+AWT.deadCaron=Dead Caron
+AWT.deadCedilla=Dead Cedilla
+AWT.deadOgonek=Dead Ogonek
+AWT.deadIota=Dead Iota
+AWT.deadVoicedSound=Dead Voiced Sound
+AWT.deadSemivoicedSound=Dead Semivoiced Sound
+AWT.ampersand=Ampersand
+AWT.asterisk=Asterisk
+AWT.quoteDbl=Double Quote
+AWT.Less=Less
+AWT.greater=Greater
+AWT.braceLeft=Left Brace
+AWT.braceRight=Right Brace
+AWT.at=At
+AWT.colon=Colon
+AWT.circumflex=Circumflex
+AWT.dollar=Dollar
+AWT.euro=Euro
+AWT.exclamationMark=Exclamation Mark
+AWT.invertedExclamationMark=Inverted Exclamation Mark
+AWT.leftParenthesis=Left Parenthesis
+AWT.numberSign=Number Sign
+AWT.plus=Plus
+AWT.minus=Minus
+AWT.rightParenthesis=Right Parenthesis
+AWT.underscore=Underscore
+AWT.final=Final
+AWT.convert=Convert
+AWT.noconvert=No Convert
+AWT.accept=Accept
+AWT.modechange=Mode Change
+AWT.kana=Kana
+AWT.kanji=Kanji
+AWT.alphanumeric=Alphanumeric
+AWT.katakana=Katakana
+AWT.hiragana=Hiragana
+AWT.fullWidth=Full-Width
+AWT.halfWidth=Half-Width
+AWT.romanCharacters=Roman Characters
+AWT.allCandidates=All Candidates
+AWT.previousCandidate=Previous Candidate
+AWT.codeInput=Code Input
+AWT.japaneseKatakana=Japanese Katakana
+AWT.japaneseHiragana=Japanese Hiragana
+AWT.japaneseRoman=Japanese Roman
+AWT.kanaLock=Kana Lock
+AWT.inputMethodOnOff=Input Method On/Off
+AWT.again=Again
+AWT.undo=Undo
+AWT.copy=Copy
+AWT.paste=Paste
+AWT.cut=Cut
+AWT.find=Find
+AWT.props=Props
+AWT.stop=Stop
+AWT.compose=Compose
+
+# Numeric Keypad
+AWT.numpad=NumPad
+AWT.unknown=Unknown
+AWT.undefined=Undefined
+
+# Predefined cursor names
+AWT.DefaultCursor=Default Cursor
+AWT.CrosshairCursor=Crosshair Cursor
+AWT.TextCursor=Text Cursor
+AWT.WaitCursor=Wait Cursor
+AWT.SWResizeCursor=Southwest Resize Cursor
+AWT.SEResizeCursor=Southeast Resize Cursor
+AWT.NWResizeCursor=Northwest Resize Cursor
+AWT.NEResizeCursor=Northeast Resize Cursor
+AWT.NResizeCursor=North Resize Cursor
+AWT.SResizeCursor=South Resize Cursor
+AWT.WResizeCursor=West Resize Cursor
+AWT.EResizeCursor=East Resize Cursor
+AWT.HandCursor=Hand Cursor
+AWT.MoveCursor=Move Cursor
+AWT.DefaultDragCursor=Default Drag Cursor
+AWT.DefaultNoDropCursor=Default NoDrag Cursor
+AWT.DefaultDropCursor=Default Drop Cursor
+
+# Input method related strings
+AWT.CompositionWindowTitle=Input Window
+AWT.InputMethodSelectionMenu=Select Input Method
+AWT.HostInputMethodDisplayName=System Input Methods
+AWT.InputMethodLanguage.ja=Japanese
+AWT.InputMethodLanguage.ko=Korean
+AWT.InputMethodLanguage.zh=Chinese
+AWT.InputMethodLanguage.zh_CN=Simplified Chinese
+AWT.InputMethodLanguage.zh_TW=Traditional Chinese
+AWT.InputMethodCreationFailed=Could not create {0}. Reason: {1}
+
+# Property to select between on-the-spot and below-the-spot
+# composition with input methods. Valid values:
+# "on-the-spot", "below-the-spot".
+# May be overridden from command line.
+java.awt.im.style=on-the-spot
+java.awt.def.delay=30
+
+# Warnings
+AWT.InconsistentDLLsWarning=Text based operations may not work correctly \
+due to an inconsistent set of dynamic linking libraries (DLLs) installed on \
+your system. For more information on this problem and a suggested workaround \
+please see the Java(TM) 2 SDK, Standard Edition Release Notes on java.sun.com.
+
Added: trunk/core/src/openjdk/sun/sun/awt/resources/awt_de.properties
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/resources/awt_de.properties (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/resources/awt_de.properties 2008-03-16 20:05:09 UTC (rev 3847)
@@ -0,0 +1,193 @@
+# @(#)awt_de.properties 1.18 05/09/14 1.18, 09/14/05
+
+#
+# AWT-specific properties
+#
+
+# Modifier names
+AWT.shift=Umschalt
+AWT.control=Strg
+AWT.alt=Alt
+AWT.meta=Meta
+AWT.altGraph=Alt Gr
+
+# Key names
+AWT.enter=Eingabe
+AWT.backSpace=R\u00fccktaste
+AWT.tab=Tabulator
+AWT.cancel=Abbrechen
+AWT.clear=L\u00f6schen
+AWT.pause=Pause
+AWT.capsLock=Umschalttaste Gro\u00df-/Kleinschreibung
+AWT.escape=ESC
+AWT.space=Leertaste
+AWT.pgup=Bild auf
+AWT.pgdn=Bild ab
+AWT.end=Ende
+AWT.home=Pos 1
+AWT.left=Links
+AWT.up=Oben
+AWT.right=Rechts
+AWT.down=Unten
+AWT.begin=Begin
+AWT.comma=Comma
+AWT.period=Period
+AWT.slash=Slash
+AWT.semicolon=Semicolon
+AWT.equals=Equals
+AWT.openBracket=Open Bracket
+AWT.backSlash=Back Slash
+AWT.closeBracket=Close Bracket
+AWT.multiply=Tastenblock *
+AWT.add=Tastenblock +
+AWT.separator=Tastenblock ,
+AWT.separater=Tastenblock ,
+AWT.subtract=Tastenblock -
+AWT.decimal=Tastenblock .
+AWT.divide=Tastenblock /
+AWT.delete=Entf
+AWT.numLock=Num
+AWT.scrollLock=Rollsperre
+AWT.f1=F1
+AWT.f2=F2
+AWT.f3=F3
+AWT.f4=F4
+AWT.f5=F5
+AWT.f6=F6
+AWT.f7=F7
+AWT.f8=F8
+AWT.f9=F9
+AWT.f10=F10
+AWT.f11=F11
+AWT.f12=F12
+AWT.f13=F13
+AWT.f14=F14
+AWT.f15=F15
+AWT.f16=F16
+AWT.f17=F17
+AWT.f18=F18
+AWT.f19=F19
+AWT.f20=F20
+AWT.f21=F21
+AWT.f22=F22
+AWT.f23=F23
+AWT.f24=F24
+AWT.printScreen=Druck
+AWT.insert=Einfg
+AWT.help=Hilfe
+AWT.windows=Windows
+AWT.context=Context Menu
+AWT.backQuote=Schlie\u00dfendes Anf\u00fchrungszeichen
+AWT.quote=Einfaches Anf\u00fchrungszeichen
+AWT.deadGrave=Gravis (Dead)
+AWT.deadAcute=Akut (Dead)
+AWT.deadCircumflex=Zirkumflex (Dead)
+AWT.deadTilde=Tilde (Dead)
+AWT.deadMacron=Macron (Dead)
+AWT.deadBreve=Breve (Dead)
+AWT.deadAboveDot=Oberer Punkt (Dead)
+AWT.deadDiaeresis=Trema (Dead)
+AWT.deadAboveRing=Oberer Ring (Dead)
+AWT.deadDoubleAcute=Doppelakut (Dead)
+AWT.deadCaron=Caron (Dead)
+AWT.deadCedilla=Cedille (Dead)
+AWT.deadOgonek=Ogonek (Dead)
+AWT.deadIota=Iota (Dead)
+AWT.deadVoicedSound=Stimmhaft (Dead)
+AWT.deadSemivoicedSound=Halbstimmhaft (Dead)
+AWT.ampersand=Kaufm\u00e4nnisches Und
+AWT.asterisk=Stern
+AWT.quoteDbl=Doppelte Anf\u00fchrungszeichen
+AWT.Less=Kleiner als
+AWT.greater=Gr\u00f6\u00dfer als
+AWT.braceLeft=Linke geschweifte Klammer
+AWT.braceRight=Rechte geschweifte Klammer
+AWT.at=Klammeraffe
+AWT.colon=Doppelpunkt
+AWT.circumflex=Zirkumflex
+AWT.dollar=Dollarzeichen
+AWT.euro=Euro-Zeichen
+AWT.exclamationMark=Ausrufezeichen
+AWT.invertedExclamationMark=Umgekehrtes Ausrufezeichen
+AWT.leftParenthesis=Linke Klammer
+AWT.numberSign=Nummernzeichen
+AWT.plus=Plus
+AWT.minus=Minus
+AWT.rightParenthesis=Rechte Klammer
+AWT.underscore=Unterstrich
+AWT.final=Abschluss
+AWT.convert=Konvertieren
+AWT.noconvert=Nicht konvertieren
+AWT.accept=Annehmen
+AWT.modechange=Modus\u00e4nderung
+AWT.kana=Kana
+AWT.kanji=Kanji
+AWT.alphanumeric=Alphanumerisch
+AWT.katakana=Katakana
+AWT.hiragana=Hiragana
+AWT.fullWidth=Volle Breite
+AWT.halfWidth=Halbe Breite
+AWT.romanCharacters=Lateinische Zeichen
+AWT.allCandidates=Alle Kandidaten
+AWT.previousCandidate=Vorheriger Kandidat
+AWT.codeInput=Code-Eingabe
+AWT.japaneseKatakana=Japanisch (Katakana)
+AWT.japaneseHiragana=Japanisch (Hiragana)
+AWT.japaneseRoman=Japanisch (Latein)
+AWT.kanaLock=Kana Lock
+AWT.inputMethodOnOff=Eingabemethode ein/aus
+AWT.again=Wiederholen
+AWT.undo=R\u00fcckg\u00e4ngig
+AWT.copy=Kopieren
+AWT.paste=Einf\u00fcgen
+AWT.cut=Ausschneiden
+AWT.find=Suchen
+AWT.props=Eigenschaften
+AWT.stop=Stop
+AWT.compose=Verfassen
+
+# Numeric Keypad
+AWT.numpad=NumPad
+AWT.unknown=Unknown
+AWT.undefined=Undefined
+
+# Predefined cursor names
+AWT.DefaultCursor=Standardcursor
+AWT.CrosshairCursor=Fadenkreuzcursor
+AWT.TextCursor=Textcursor
+AWT.WaitCursor=Wartecursor
+AWT.SWResizeCursor=Skaliercursor nach unten/links
+AWT.SEResizeCursor=Skaliercursor nach unten/rechts
+AWT.NWResizeCursor=Skaliercursor nach oben/links
+AWT.NEResizeCursor=Skaliercursor nach oben/rechts
+AWT.NResizeCursor=Skaliercursor nach oben
+AWT.SResizeCursor=Skaliercursor nach unten
+AWT.WResizeCursor=Skaliercursor nach links
+AWT.EResizeCursor=Skaliercursor nach rechts
+AWT.HandCursor=Handcursor
+AWT.MoveCursor=Verschiebecursor
+AWT.DefaultDragCursor=Standardcursor beim Ziehen
+AWT.DefaultNoDropCursor=Standardcursor beim Nichtziehen
+AWT.DefaultDropCursor=Standardcursor beim Ablegen
+
+# Input method related strings
+AWT.CompositionWindowTitle=Eingabefenster
+AWT.InputMethodSelectionMenu=Eingabemethode ausw\u00e4hlen
+AWT.HostInputMethodDisplayName=Systemeingabemethoden
+AWT.InputMethodLanguage.ja=Japanisch
+AWT.InputMethodLanguage.ko=Koreanisch
+AWT.InputMethodLanguage.zh=Chinesisch
+AWT.InputMethodLanguage.zh_CN=Vereinfachtes Chinesisch
+AWT.InputMethodLanguage.zh_TW=Traditionelles Chinesisch
+AWT.InputMethodCreationFailed={0} konnte nicht erstellt werden. Grund: {1}
+
+# Property to select between on-the-spot and below-the-spot
+# composition with input methods. Valid values:
+# "on-the-spot", "below-the-spot".
+# May be overridden from command line.
+java.awt.im.style=On-the-Spot
+java.awt.def.delay=30
+
+# Warnings
+AWT.InconsistentDLLsWarning=Textbasierte Operationen arbeiten m\u00f6glicherweise nicht richtig, weil auf Ihrem System ein inkonsistenter Satz von Dynamic Linking Libraries (DLLs) installiert ist. Weitere Informationen zu diesem Problem sowie eine Empfehlung zu deren Umgehung finden Sie in den Java(TM) 2 SDK, Standard Edition Release Notes unter java.sun.com.
+
Added: trunk/core/src/openjdk/sun/sun/awt/resources/awt_es.properties
===================================================================
--- trunk/core/src/openjdk/sun/sun/awt/resources/awt_es.properties (rev 0)
+++ trunk/core/src/openjdk/sun/sun/awt/resources/awt_es.properties 2008-03-16 20:05:09 UTC (rev 3847)
@@ -0,0 +1,194 @@
+# @(#)awt_es.properties 1.19 06/08/09 1.19, 08/09/06
+
+#
+# AWT-specific properties
+#
+
+# Modifier names
+AWT.shift=May\u00fasculas
+AWT.control=Ctrl
+AWT.alt=Alt
+AWT.meta=Meta
+AWT.altGraph=Alt Gr
+
+# Key names
+AWT.enter=Introduzca
+AWT.backSpace=Retroceso
+AWT.tab=Tabulador
+AWT.cancel=Cancelar
+AWT.clear=Borrar
+AWT.pause=Pausa
+AWT.capsLock=Bloqueo de may\u00fasculas
+AWT.escape=Escape
+AWT.space=Espacio
+AWT.pgup=ReP\u00e1g
+AWT.pgdn=AvP\u00e1g
+AWT.end=Fin
+AWT.home=Inic...
[truncated message content] |