From 64089cc9f030d8ef7972adb5d117e0b23f47d62b Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 18 May 2006 17:29:21 +0000 Subject: Imported GNU Classpath 0.90 * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale. * sources.am: Regenerated. * gcj/javaprims.h: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * gnu/java/lang/VMInstrumentationImpl.java: New override. * gnu/java/net/local/LocalSocketImpl.java: Likewise. * gnu/classpath/jdwp/VMMethod.java: Likewise. * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest interface. * java/lang/Thread.java: Add UncaughtExceptionHandler. * java/lang/reflect/Method.java: Implements GenericDeclaration and isSynthetic(), * java/lang/reflect/Field.java: Likewise. * java/lang/reflect/Constructor.java * java/lang/Class.java: Implements Type, GenericDeclaration, getSimpleName() and getEnclosing*() methods. * java/lang/Class.h: Add new public methods. * java/lang/Math.java: Add signum(), ulp() and log10(). * java/lang/natMath.cc (log10): New function. * java/security/VMSecureRandom.java: New override. * java/util/logging/Logger.java: Updated to latest classpath version. * java/util/logging/LogManager.java: New override. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113887 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/classpath/gnu/CORBA/OrbRestricted.java | 55 ++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'libjava/classpath/gnu/CORBA/OrbRestricted.java') diff --git a/libjava/classpath/gnu/CORBA/OrbRestricted.java b/libjava/classpath/gnu/CORBA/OrbRestricted.java index c0401800a89..c34584995a6 100644 --- a/libjava/classpath/gnu/CORBA/OrbRestricted.java +++ b/libjava/classpath/gnu/CORBA/OrbRestricted.java @@ -41,11 +41,13 @@ package gnu.CORBA; import gnu.CORBA.CDR.BufferedCdrOutput; import gnu.CORBA.typecodes.AliasTypeCode; import gnu.CORBA.typecodes.ArrayTypeCode; +import gnu.CORBA.typecodes.PrimitiveTypeCode; import gnu.CORBA.typecodes.RecordTypeCode; import gnu.CORBA.typecodes.StringTypeCode; import org.omg.CORBA.Any; import org.omg.CORBA.BAD_PARAM; +import org.omg.CORBA.Context; import org.omg.CORBA.ContextList; import org.omg.CORBA.Environment; import org.omg.CORBA.ExceptionList; @@ -526,4 +528,57 @@ public class OrbRestricted extends org.omg.CORBA_2_3.ORB super.destroy(); } + + /** + * Create a typecode, representing a tree-like structure. + * This structure contains a member that is a sequence of the same type, + * as the structure itself. You can imagine as if the folder definition + * contains a variable-length array of the enclosed (nested) folder + * definitions. In this way, it is possible to have a tree like + * structure that can be transferred via CORBA CDR stream. + * + * @deprecated It is easier and clearler to use a combination of + * create_recursive_tc and create_sequence_tc instead. + * + * @param bound the maximal expected number of the nested components + * on each node; 0 if not limited. + * + * @param offset the position of the field in the returned structure + * that contains the sequence of the structures of the same field. + * The members before this field are intialised using parameterless + * StructMember constructor. + * + * @return a typecode, defining a stucture, where a member at the + * offset position defines an array of the identical + * structures. + * + * @see #create_recursive_tc(String) + * @see #create_sequence_tc(int, TypeCode) + */ + public TypeCode create_recursive_sequence_tc(int bound, int offset) + { + RecordTypeCode r = new RecordTypeCode(TCKind.tk_struct); + for (int i = 0; i < offset; i++) + r.add(new StructMember()); + + TypeCode recurs = new PrimitiveTypeCode(TCKind.tk_sequence); + + r.add(new StructMember("", recurs, null)); + return r; + } + + /** + * Get the default context of this ORB. This is an initial root of all + * contexts. + * + * The default method returns a new context with the empty name and + * no parent context. + * + * @return the default context of this ORB. + */ + public Context get_default_context() + { + return new gnuContext("", null); + } + } \ No newline at end of file -- cgit v1.2.3