org.acplt.oncrpc.apps.jrpcgen
Class JrpcgenConst

java.lang.Object
  |
  +--org.acplt.oncrpc.apps.jrpcgen.JrpcgenConst

public class JrpcgenConst
extends java.lang.Object

The JrpcgenConst class represents a single constant defined in an rpcgen "x"-file.


Field Summary
 java.lang.String enclosure
          Specifies the enclosure (scope) within the identifier must be addressed for a constant defined by an enumumeration.
 java.lang.String identifier
          Constant identifier.
 java.lang.String value
          Contains value (or identifier refering to another constant) of constant.
 
Constructor Summary
JrpcgenConst(java.lang.String identifier, java.lang.String value)
          Constructs a JrpcgenConst and sets the identifier and the associated value.
JrpcgenConst(java.lang.String identifier, java.lang.String value, java.lang.String enclosure)
          Constructs a JrpcgenConst and sets the identifier and the associated value of an enumeration etc.
 
Method Summary
 void dump()
          Dumps the constant as well as its value to System.out.
 java.lang.String resolveValue()
          Returns value as integer literal (and thus resolving identifiers recursively, if necessary).
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

identifier

public java.lang.String identifier
Constant identifier.

value

public java.lang.String value
Contains value (or identifier refering to another constant) of constant.

enclosure

public java.lang.String enclosure
Specifies the enclosure (scope) within the identifier must be addressed for a constant defined by an enumumeration.
Constructor Detail

JrpcgenConst

public JrpcgenConst(java.lang.String identifier,
                    java.lang.String value)
Constructs a JrpcgenConst and sets the identifier and the associated value.
Parameters:
identifier - Constant identifier to define.
value - Value assigned to constant.

JrpcgenConst

public JrpcgenConst(java.lang.String identifier,
                    java.lang.String value,
                    java.lang.String enclosure)
Constructs a JrpcgenConst and sets the identifier and the associated value of an enumeration etc.
Parameters:
identifier - Constant identifier to define.
value - Value assigned to constant.
enclosure - Name of enclosing enumeration, etc.
Method Detail

resolveValue

public java.lang.String resolveValue()
Returns value as integer literal (and thus resolving identifiers recursively, if necessary).
Parameters:
integer - literal as String or null, if the identifier could not be resolved to an integer literal.

dump

public void dump()
Dumps the constant as well as its value to System.out.