< prev index next >

src/java.corba/share/classes/com/sun/tools/corba/se/idl/constExpr/Terminal.java

Print this page




  26  * COMPONENT_NAME: idl.parser
  27  *
  28  * ORIGINS: 27
  29  *
  30  * Licensed Materials - Property of IBM
  31  * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
  32  * RMI-IIOP v1.0
  33  *
  34  */
  35 
  36 package com.sun.tools.corba.se.idl.constExpr;
  37 
  38 // NOTES:
  39 
  40 import com.sun.tools.corba.se.idl.ConstEntry;
  41 import java.math.BigInteger;
  42 
  43 /**
  44  * This class contains values.  Objects of this class are the terminal
  45  * nodes of an expression tree.
  46  * <b>
  47  * Note that there is a constructor for Double values, but not Float.
  48  * CORBA defines that all floating point expressions are evaluated as
  49  * double, and that the result is coerced back to float if necessary.
  50  * <b>
  51  * Note also that there is a constructor for long values, but not for
  52  * int or short.  CORBA defines that all integral expressions are evaluated
  53  * as unsigned long.  A CORBA long is a Java int.  There is no unsigned int
  54  * in Java, so the next larger type, long, is used.
  55  **/
  56 public class Terminal extends Expression
  57 {
  58   protected Terminal (String representation, Character charValue,
  59     boolean isWide)
  60   {
  61     rep (representation);
  62     value (charValue);
  63     if (isWide)
  64         type( "wchar" ) ;
  65     else
  66         type( "char" ) ;
  67   } // ctor
  68 
  69   protected Terminal (String representation, Boolean booleanValue)
  70   {




  26  * COMPONENT_NAME: idl.parser
  27  *
  28  * ORIGINS: 27
  29  *
  30  * Licensed Materials - Property of IBM
  31  * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
  32  * RMI-IIOP v1.0
  33  *
  34  */
  35 
  36 package com.sun.tools.corba.se.idl.constExpr;
  37 
  38 // NOTES:
  39 
  40 import com.sun.tools.corba.se.idl.ConstEntry;
  41 import java.math.BigInteger;
  42 
  43 /**
  44  * This class contains values.  Objects of this class are the terminal
  45  * nodes of an expression tree.
  46  * <p>
  47  * Note that there is a constructor for Double values, but not Float.
  48  * CORBA defines that all floating point expressions are evaluated as
  49  * double, and that the result is coerced back to float if necessary.
  50  * <p>
  51  * Note also that there is a constructor for long values, but not for
  52  * int or short.  CORBA defines that all integral expressions are evaluated
  53  * as unsigned long.  A CORBA long is a Java int.  There is no unsigned int
  54  * in Java, so the next larger type, long, is used.
  55  **/
  56 public class Terminal extends Expression
  57 {
  58   protected Terminal (String representation, Character charValue,
  59     boolean isWide)
  60   {
  61     rep (representation);
  62     value (charValue);
  63     if (isWide)
  64         type( "wchar" ) ;
  65     else
  66         type( "char" ) ;
  67   } // ctor
  68 
  69   protected Terminal (String representation, Boolean booleanValue)
  70   {


< prev index next >