org.omg.CORBA
Class Initializer
java.lang.Object
|
+--org.omg.CORBA.Initializer
- All Implemented Interfaces:
- IDLEntity, Serializable
- public final class Initializer
- extends Object
- implements IDLEntity
This is the mapping for an IDL structure which specifies
an initializer for a value type. A value can contain all the
elements that an interface can as well as the definition of
state members, and initializers for that state. In order to
ensure portability of value implementations, designers may
also define the signatures of initializers (or constructors) for
non abstract value types. Syntactically these look like local
operations except that they use the keyword init for the "name" of
the operation, have no return type, and must use only in parameters.
There may be any number of init declarations, as long as the signatures
of all the initializers declared within the same scope are unique.
Using the same signature as one found in a less-derived type is allowed.
The mapping of initializers is language specific and may not always
result in a one to one correspondence between initializer signatures
and the programming language constructs into which they map. This is
because the mapping from IDL types into programming language types is
not isomorphic; several different IDL types may map to the same
programming language type. Hence defining initializers with the same
number of parameters with types that are "similar" (e.g. char and wchar,
signed and unsigned integers, etc.) should be done with care. Value types
may also be abstract. They are called abstract because an abstract value
type may not be instantiated. No or may
be specified. However, local operations may be specified.
Essentially they are a bundle of operation signatures with a purely
local implementation. Note that a concrete value type with an
empty state is not an abstract value type.
The following shows an example of defining a value type with an
initializer.
Example:
valuetype EmployeeRecord {
private string name;
private string email;
private string SSN;
init(in string name, in string SSN);
};
Value types do not map to org.omg.CORBA.Object's.
- See Also:
- Serialized Form
Field Summary |
StructMember[] |
members
members contains the reference to all the Initializers of non abstract
value types. |
Constructor Summary |
Initializer()
Constructs an Initializer object with the members attribute null. |
Initializer(StructMember[] _members)
Constructs an Initializer object and assigns the members attribute
with the given parameter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
members
public StructMember[] members
- members contains the reference to all the Initializers of non abstract
value types.
Initializer
public Initializer()
- Constructs an Initializer object with the members attribute null.
Initializer
public Initializer(StructMember[] _members)
- Constructs an Initializer object and assigns the members attribute
with the given parameter.
- Parameters:
_members
- an array of StructMember Objects.
Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.