Projektstudium SS98 - distributed computing


Primitive Datentypen

Diese Sektion behandelt das CORBA-to-Java Mapping für die CORBA Basis Typen-einschließlich const, boolean, char, wchar, octet, string ,wstring, short, long, long long, float und double.

 

CORBA Konstanten

CORBA const Werte, die innerhalb eines IDL Interfaces deklariert sind, werden zu public static final Feldern in dem korrespondierenden Java Interface transformiert. Konstanten, die nicht innerhalb eines IDL Interfaces deklariert sind, werden zu einem public Interface mit dem Namen der Konstante umgewandelt. Sie beinhalten ein static final value, das den Wert der Konstante angenommen hat.

 

OMG IDL

Java

module Const {

const long Zahl = 123456;

interface ConstantTypes {

const double Pi = 3.141592654;

const string Hello = "Hello World";

const boolean Wahr = TRUE;

};

};

package Const;

public interface Zahl {

final public static int value = (int) 123456;

}

package Const.ConstantTypesPackage;

public interface Pi {

final public static double value = (double) 3.141592654;

}

package Const.ConstantTypesPackage;

public interface Hello {

final public static java.lang.String value = (java.lang.String) "Hello World";

}

package Const.ConstantTypesPackage;

public interface Wahr {

final public static boolean value = (boolean) true;

}

 

 

CORBAs primitive Datentypen

OMG IDL

Java

Booelan

Boolean

TRUE

True

FALSE

False

Octet

Byte

String

String

Wstring

String

Short

Short

Long

Int

Long long

Long

Unsigned short

Short

Unsigned long

Int

Unsigned long long

Long

Float

Float

Double

Double

Long double

Java.math.BigDecimal

 

nächste Seite 


© Copyright 1998 André Möller, Oliver Mentz & Magnus Wiencke