Imported GNU Classpath 0.90

Imported GNU Classpath 0.90
       * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
       * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
       * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
       * java/lang/Math.java: New override file.
       * java/lang/Character.java: Merged from Classpath.
       (start, end): Now 'int's.
       (canonicalName): New field.
       (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
       (UnicodeBlock): Added argument.
       (of): New overload.
       (forName): New method.
       Updated unicode blocks.
       (sets): Updated.
       * sources.am: Regenerated.
       * Makefile.in: Likewise.

From-SVN: r111942
This commit is contained in:
Mark Wielaard
2006-03-10 21:46:48 +00:00
parent 27079765d0
commit 8aa540d2f7
1367 changed files with 188789 additions and 22762 deletions
+54
View File
@@ -140,6 +140,27 @@ public class IOR
b.append(' ');
return b.toString();
}
/**
* Get a better formatted multiline string representation.
*/
public String toStringFormatted()
{
StringBuffer b = new StringBuffer();
b.append("\n Native set " + name(native_set));
if (conversion != null && conversion.length > 0)
{
b.append("\n Other supported sets:\n ");
for (int i = 0; i < conversion.length; i++)
{
b.append(name(conversion[i]));
b.append(' ');
}
}
b.append("\n");
return b.toString();
}
/**
* Write into CDR stream.
@@ -590,6 +611,39 @@ public class IOR
return b.toString();
}
/**
* Returns a multiline formatted human readable string representation of
* this IOR object.
*/
public String toStringFormatted()
{
StringBuffer b = new StringBuffer();
b.append("\nObject Id:\n ");
b.append(Id);
b.append("\nObject is accessible at:\n ");
b.append(Internet);
if (Big_Endian)
b.append("\n Big endian encoding");
else
b.append("\n Little endian encoding.");
b.append("\nObject Key\n ");
for (int i = 0; i < key.length; i++)
{
b.append(Integer.toHexString(key[i] & 0xFF));
}
b.append("\nSupported code sets:");
b.append("\n Wide:");
b.append(Internet.CodeSets.wide.toStringFormatted());
b.append(" Narrow:");
b.append(Internet.CodeSets.wide.toStringFormatted());
return b.toString();
}
/**
* Returs a stringified reference.
@@ -58,11 +58,11 @@ public class NamingMap
/**
* The actual map.
*/
private final TreeMap map;
protected final TreeMap map;
/**
* Creates an instance of the naming map, intialising the comparator
* to the {@link cmpNameComparator}.
* to the {@link NameComponentComparator}.
*/
public NamingMap()
{
@@ -70,7 +70,7 @@ public class NamingMap
}
/**
* Put the given CORBA object, specifying the given name as a key.
* Put the given GIOP object, specifying the given name as a key.
* If the entry with the given name already exists, or if the given
* object is already mapped under another name, the
* {@link AlreadyBound} exception will be thrown.
@@ -93,8 +93,11 @@ public class NamingMap
else
{
if (containsValue(object))
throw new AlreadyBound("Tha object has another name");
throw new AlreadyBound("The object has another name");
}
// There are no restrictions in binding the object.
rebind(name, object);
}
/**
@@ -141,7 +144,7 @@ public class NamingMap
}
/**
* Put the given CORBA object, specifying the given name as a key.
* Put the given GIOP object, specifying the given name as a key.
* Remove all pre - existing mappings for the given name and object.
*
* @param name the name.
@@ -136,7 +136,7 @@ public class NamingServiceTransient
System.out.println("GNU Classpath transient naming service "
+ "started at " + iorr.Internet.host + ":" + iorr.Internet.port
+ " key 'NameService'.\n\n"
+ "Copyright (C) 2005 Free Software Foundation\n"
+ "Copyright (C) 2006 Free Software Foundation\n"
+ "This tool comes with ABSOLUTELY NO WARRANTY. "
+ "This is free software, and you are\nwelcome to "
+ "redistribute it under conditions, defined in "
@@ -59,7 +59,7 @@ import java.util.Map;
/**
* This class implements the transient naming service, defined by
* {@link NamingContex}. The 'transient' means that the service does
* {@link NamingContext}. The 'transient' means that the service does
* not store its state into the persistent memory. If the service is
* restarted, the named objects must be re-registered again.
*
@@ -71,15 +71,40 @@ public class TransientContext
extends _NamingContextImplBase
implements NamingContext, NamingContextOperations
{
/**
* Use serial version UID for interoperability.
*/
private static final long serialVersionUID = 2;
/**
* The already named contexts.
*/
protected final NamingMap named_contexts = new NamingMap();
protected final NamingMap named_contexts;
/**
* The already named objects.
*/
protected final NamingMap named_objects = new NamingMap();
protected final NamingMap named_objects;
/**
* Create the naming conetxt with default (transient) naming maps.
*/
public TransientContext()
{
this(new NamingMap(), new NamingMap());
}
/**
* Create the naming conetxt with the two provided naming maps.
*
* @param context_map the map for contexts
* @param object_map the map for objectss
*/
public TransientContext(NamingMap context_map, NamingMap object_map)
{
named_contexts = context_map;
named_objects = object_map;
}
/**
* Gives the object a name, valid in this context.
@@ -376,7 +401,7 @@ public class TransientContext
/**
* Create a binding.
*
* @param entry the entry, defining the bound object.
* @param an_entry the entry, defining the bound object.
* @param type the binding type.
* @return the created binding.
*/
@@ -396,7 +421,7 @@ public class TransientContext
* name, and pass the remainder (without the first node)
* of the name for that context to resolve.
*
* @param name the name to resolve.
* @param a_name the name to resolve.
*
* @return the resolved context
*/