Java源码示例:com.sun.tools.corba.se.idl.ConstEntry
示例1
public Object evaluate () throws EvaluationException
{
if (value () instanceof ConstEntry)
return ((ConstEntry)value ()).value ().evaluate ();
else
return value ();
}
示例2
/**
* Extract the global constants from the supplied integer expression
* representation (string) and add them to the supplied import list.
**/
static private void checkForGlobalConstants (String exprRep, Vector importTypes, Vector importList)
{
// NOTE: Do not use '/' as a delimiter. Symbol table names use '/' as a
// delimiter and would not be otherwise properly collected. Blanks and
// arithmetic symbols do not appear in tokens, except for '/'.
java.util.StringTokenizer st = new java.util.StringTokenizer (exprRep, " +-*()~&|^%<>");
while (st.hasMoreTokens ())
{
String token = st.nextToken ();
// When token contains '/', it represents the division symbol or
// a nested type (e.g., I/x). Ignore the division symbol, and don't
// forget constants declared within global interfaces!
if (!token.equals ("/"))
{
SymtabEntry typeEntry = (SymtabEntry)symbolTable.get (token);
if (typeEntry instanceof ConstEntry)
{
int slashIdx = token.indexOf ('/');
if (slashIdx < 0) // Possible global constant
{
if (importTypes.contains (typeEntry))
addTo (importList, typeEntry.name ());
}
else // Possible constant in global interface
{
SymtabEntry constContainer = (SymtabEntry)symbolTable.get (token.substring (0, slashIdx));
if (constContainer instanceof InterfaceEntry && importTypes.contains (constContainer))
addTo (importList, constContainer.name ());
}
}
}
}
}
示例3
/**
* Generate Java code for an IDL constant. A constant is written to
* a new class only when it is not a member of an interface; otherwise
* it written to the interface class in which it resides.
**/
public void generate (Hashtable symbolTable, ConstEntry c, PrintWriter s)
{
this.symbolTable = symbolTable;
this.c = c;
this.stream = s;
init ();
if (c.container () instanceof ModuleEntry)
generateConst ();
else if (stream != null)
writeConstExpr ();
}
示例4
public Object evaluate () throws EvaluationException
{
if (value () instanceof ConstEntry)
return ((ConstEntry)value ()).value ().evaluate ();
else
return value ();
}
示例5
/**
* Extract the global constants from the supplied integer expression
* representation (string) and add them to the supplied import list.
**/
static private void checkForGlobalConstants (String exprRep, Vector importTypes, Vector importList)
{
// NOTE: Do not use '/' as a delimiter. Symbol table names use '/' as a
// delimiter and would not be otherwise properly collected. Blanks and
// arithmetic symbols do not appear in tokens, except for '/'.
java.util.StringTokenizer st = new java.util.StringTokenizer (exprRep, " +-*()~&|^%<>");
while (st.hasMoreTokens ())
{
String token = st.nextToken ();
// When token contains '/', it represents the division symbol or
// a nested type (e.g., I/x). Ignore the division symbol, and don't
// forget constants declared within global interfaces!
if (!token.equals ("/"))
{
SymtabEntry typeEntry = (SymtabEntry)symbolTable.get (token);
if (typeEntry instanceof ConstEntry)
{
int slashIdx = token.indexOf ('/');
if (slashIdx < 0) // Possible global constant
{
if (importTypes.contains (typeEntry))
addTo (importList, typeEntry.name ());
}
else // Possible constant in global interface
{
SymtabEntry constContainer = (SymtabEntry)symbolTable.get (token.substring (0, slashIdx));
if (constContainer instanceof InterfaceEntry && importTypes.contains (constContainer))
addTo (importList, constContainer.name ());
}
}
}
}
}
示例6
/**
* Generate Java code for an IDL constant. A constant is written to
* a new class only when it is not a member of an interface; otherwise
* it written to the interface class in which it resides.
**/
public void generate (Hashtable symbolTable, ConstEntry c, PrintWriter s)
{
this.symbolTable = symbolTable;
this.c = c;
this.stream = s;
init ();
if (c.container () instanceof ModuleEntry)
generateConst ();
else if (stream != null)
writeConstExpr ();
}
示例7
public Object evaluate () throws EvaluationException
{
if (value () instanceof ConstEntry)
return ((ConstEntry)value ()).value ().evaluate ();
else
return value ();
}
示例8
/**
* Extract the global constants from the supplied integer expression
* representation (string) and add them to the supplied import list.
**/
static private void checkForGlobalConstants (String exprRep, Vector importTypes, Vector importList)
{
// NOTE: Do not use '/' as a delimiter. Symbol table names use '/' as a
// delimiter and would not be otherwise properly collected. Blanks and
// arithmetic symbols do not appear in tokens, except for '/'.
java.util.StringTokenizer st = new java.util.StringTokenizer (exprRep, " +-*()~&|^%<>");
while (st.hasMoreTokens ())
{
String token = st.nextToken ();
// When token contains '/', it represents the division symbol or
// a nested type (e.g., I/x). Ignore the division symbol, and don't
// forget constants declared within global interfaces!
if (!token.equals ("/"))
{
SymtabEntry typeEntry = (SymtabEntry)symbolTable.get (token);
if (typeEntry instanceof ConstEntry)
{
int slashIdx = token.indexOf ('/');
if (slashIdx < 0) // Possible global constant
{
if (importTypes.contains (typeEntry))
addTo (importList, typeEntry.name ());
}
else // Possible constant in global interface
{
SymtabEntry constContainer = (SymtabEntry)symbolTable.get (token.substring (0, slashIdx));
if (constContainer instanceof InterfaceEntry && importTypes.contains (constContainer))
addTo (importList, constContainer.name ());
}
}
}
}
}
示例9
/**
* Generate Java code for an IDL constant. A constant is written to
* a new class only when it is not a member of an interface; otherwise
* it written to the interface class in which it resides.
**/
public void generate (Hashtable symbolTable, ConstEntry c, PrintWriter s)
{
this.symbolTable = symbolTable;
this.c = c;
this.stream = s;
init ();
if (c.container () instanceof ModuleEntry)
generateConst ();
else if (stream != null)
writeConstExpr ();
}
示例10
public Object evaluate () throws EvaluationException
{
if (value () instanceof ConstEntry)
return ((ConstEntry)value ()).value ().evaluate ();
else
return value ();
}
示例11
/**
* Extract the global constants from the supplied integer expression
* representation (string) and add them to the supplied import list.
**/
static private void checkForGlobalConstants (String exprRep, Vector importTypes, Vector importList)
{
// NOTE: Do not use '/' as a delimiter. Symbol table names use '/' as a
// delimiter and would not be otherwise properly collected. Blanks and
// arithmetic symbols do not appear in tokens, except for '/'.
java.util.StringTokenizer st = new java.util.StringTokenizer (exprRep, " +-*()~&|^%<>");
while (st.hasMoreTokens ())
{
String token = st.nextToken ();
// When token contains '/', it represents the division symbol or
// a nested type (e.g., I/x). Ignore the division symbol, and don't
// forget constants declared within global interfaces!
if (!token.equals ("/"))
{
SymtabEntry typeEntry = (SymtabEntry)symbolTable.get (token);
if (typeEntry instanceof ConstEntry)
{
int slashIdx = token.indexOf ('/');
if (slashIdx < 0) // Possible global constant
{
if (importTypes.contains (typeEntry))
addTo (importList, typeEntry.name ());
}
else // Possible constant in global interface
{
SymtabEntry constContainer = (SymtabEntry)symbolTable.get (token.substring (0, slashIdx));
if (constContainer instanceof InterfaceEntry && importTypes.contains (constContainer))
addTo (importList, constContainer.name ());
}
}
}
}
}
示例12
/**
* Generate Java code for an IDL constant. A constant is written to
* a new class only when it is not a member of an interface; otherwise
* it written to the interface class in which it resides.
**/
public void generate (Hashtable symbolTable, ConstEntry c, PrintWriter s)
{
this.symbolTable = symbolTable;
this.c = c;
this.stream = s;
init ();
if (c.container () instanceof ModuleEntry)
generateConst ();
else if (stream != null)
writeConstExpr ();
}
示例13
public Object evaluate () throws EvaluationException
{
if (value () instanceof ConstEntry)
return ((ConstEntry)value ()).value ().evaluate ();
else
return value ();
}
示例14
/**
* Extract the global constants from the supplied integer expression
* representation (string) and add them to the supplied import list.
**/
static private void checkForGlobalConstants (String exprRep, Vector importTypes, Vector importList)
{
// NOTE: Do not use '/' as a delimiter. Symbol table names use '/' as a
// delimiter and would not be otherwise properly collected. Blanks and
// arithmetic symbols do not appear in tokens, except for '/'.
java.util.StringTokenizer st = new java.util.StringTokenizer (exprRep, " +-*()~&|^%<>");
while (st.hasMoreTokens ())
{
String token = st.nextToken ();
// When token contains '/', it represents the division symbol or
// a nested type (e.g., I/x). Ignore the division symbol, and don't
// forget constants declared within global interfaces!
if (!token.equals ("/"))
{
SymtabEntry typeEntry = (SymtabEntry)symbolTable.get (token);
if (typeEntry instanceof ConstEntry)
{
int slashIdx = token.indexOf ('/');
if (slashIdx < 0) // Possible global constant
{
if (importTypes.contains (typeEntry))
addTo (importList, typeEntry.name ());
}
else // Possible constant in global interface
{
SymtabEntry constContainer = (SymtabEntry)symbolTable.get (token.substring (0, slashIdx));
if (constContainer instanceof InterfaceEntry && importTypes.contains (constContainer))
addTo (importList, constContainer.name ());
}
}
}
}
}
示例15
/**
* Generate Java code for an IDL constant. A constant is written to
* a new class only when it is not a member of an interface; otherwise
* it written to the interface class in which it resides.
**/
public void generate (Hashtable symbolTable, ConstEntry c, PrintWriter s)
{
this.symbolTable = symbolTable;
this.c = c;
this.stream = s;
init ();
if (c.container () instanceof ModuleEntry)
generateConst ();
else if (stream != null)
writeConstExpr ();
}
示例16
public Object evaluate () throws EvaluationException
{
if (value () instanceof ConstEntry)
return ((ConstEntry)value ()).value ().evaluate ();
else
return value ();
}
示例17
/**
* Extract the global constants from the supplied integer expression
* representation (string) and add them to the supplied import list.
**/
static private void checkForGlobalConstants (String exprRep, Vector importTypes, Vector importList)
{
// NOTE: Do not use '/' as a delimiter. Symbol table names use '/' as a
// delimiter and would not be otherwise properly collected. Blanks and
// arithmetic symbols do not appear in tokens, except for '/'.
java.util.StringTokenizer st = new java.util.StringTokenizer (exprRep, " +-*()~&|^%<>");
while (st.hasMoreTokens ())
{
String token = st.nextToken ();
// When token contains '/', it represents the division symbol or
// a nested type (e.g., I/x). Ignore the division symbol, and don't
// forget constants declared within global interfaces!
if (!token.equals ("/"))
{
SymtabEntry typeEntry = (SymtabEntry)symbolTable.get (token);
if (typeEntry instanceof ConstEntry)
{
int slashIdx = token.indexOf ('/');
if (slashIdx < 0) // Possible global constant
{
if (importTypes.contains (typeEntry))
addTo (importList, typeEntry.name ());
}
else // Possible constant in global interface
{
SymtabEntry constContainer = (SymtabEntry)symbolTable.get (token.substring (0, slashIdx));
if (constContainer instanceof InterfaceEntry && importTypes.contains (constContainer))
addTo (importList, constContainer.name ());
}
}
}
}
}
示例18
/**
* Generate Java code for an IDL constant. A constant is written to
* a new class only when it is not a member of an interface; otherwise
* it written to the interface class in which it resides.
**/
public void generate (Hashtable symbolTable, ConstEntry c, PrintWriter s)
{
this.symbolTable = symbolTable;
this.c = c;
this.stream = s;
init ();
if (c.container () instanceof ModuleEntry)
generateConst ();
else if (stream != null)
writeConstExpr ();
}
示例19
public Object evaluate () throws EvaluationException
{
if (value () instanceof ConstEntry)
return ((ConstEntry)value ()).value ().evaluate ();
else
return value ();
}
示例20
/**
* Extract the global constants from the supplied integer expression
* representation (string) and add them to the supplied import list.
**/
static private void checkForGlobalConstants (String exprRep, Vector importTypes, Vector importList)
{
// NOTE: Do not use '/' as a delimiter. Symbol table names use '/' as a
// delimiter and would not be otherwise properly collected. Blanks and
// arithmetic symbols do not appear in tokens, except for '/'.
java.util.StringTokenizer st = new java.util.StringTokenizer (exprRep, " +-*()~&|^%<>");
while (st.hasMoreTokens ())
{
String token = st.nextToken ();
// When token contains '/', it represents the division symbol or
// a nested type (e.g., I/x). Ignore the division symbol, and don't
// forget constants declared within global interfaces!
if (!token.equals ("/"))
{
SymtabEntry typeEntry = (SymtabEntry)symbolTable.get (token);
if (typeEntry instanceof ConstEntry)
{
int slashIdx = token.indexOf ('/');
if (slashIdx < 0) // Possible global constant
{
if (importTypes.contains (typeEntry))
addTo (importList, typeEntry.name ());
}
else // Possible constant in global interface
{
SymtabEntry constContainer = (SymtabEntry)symbolTable.get (token.substring (0, slashIdx));
if (constContainer instanceof InterfaceEntry && importTypes.contains (constContainer))
addTo (importList, constContainer.name ());
}
}
}
}
}
示例21
/**
* Generate Java code for an IDL constant. A constant is written to
* a new class only when it is not a member of an interface; otherwise
* it written to the interface class in which it resides.
**/
public void generate (Hashtable symbolTable, ConstEntry c, PrintWriter s)
{
this.symbolTable = symbolTable;
this.c = c;
this.stream = s;
init ();
if (c.container () instanceof ModuleEntry)
generateConst ();
else if (stream != null)
writeConstExpr ();
}
示例22
public Object evaluate () throws EvaluationException
{
if (value () instanceof ConstEntry)
return ((ConstEntry)value ()).value ().evaluate ();
else
return value ();
}
示例23
/**
* Extract the global constants from the supplied integer expression
* representation (string) and add them to the supplied import list.
**/
static private void checkForGlobalConstants (String exprRep, Vector importTypes, Vector importList)
{
// NOTE: Do not use '/' as a delimiter. Symbol table names use '/' as a
// delimiter and would not be otherwise properly collected. Blanks and
// arithmetic symbols do not appear in tokens, except for '/'.
java.util.StringTokenizer st = new java.util.StringTokenizer (exprRep, " +-*()~&|^%<>");
while (st.hasMoreTokens ())
{
String token = st.nextToken ();
// When token contains '/', it represents the division symbol or
// a nested type (e.g., I/x). Ignore the division symbol, and don't
// forget constants declared within global interfaces!
if (!token.equals ("/"))
{
SymtabEntry typeEntry = (SymtabEntry)symbolTable.get (token);
if (typeEntry instanceof ConstEntry)
{
int slashIdx = token.indexOf ('/');
if (slashIdx < 0) // Possible global constant
{
if (importTypes.contains (typeEntry))
addTo (importList, typeEntry.name ());
}
else // Possible constant in global interface
{
SymtabEntry constContainer = (SymtabEntry)symbolTable.get (token.substring (0, slashIdx));
if (constContainer instanceof InterfaceEntry && importTypes.contains (constContainer))
addTo (importList, constContainer.name ());
}
}
}
}
}
示例24
/**
* Generate Java code for an IDL constant. A constant is written to
* a new class only when it is not a member of an interface; otherwise
* it written to the interface class in which it resides.
**/
public void generate (Hashtable symbolTable, ConstEntry c, PrintWriter s)
{
this.symbolTable = symbolTable;
this.c = c;
this.stream = s;
init ();
if (c.container () instanceof ModuleEntry)
generateConst ();
else if (stream != null)
writeConstExpr ();
}
示例25
protected Terminal (ConstEntry constReference)
{
rep (constReference.fullName ());
value (constReference);
}
示例26
public Terminal terminal (ConstEntry constReference)
{
return new Terminal (constReference);
}
示例27
protected Terminal (ConstEntry constReference)
{
rep (constReference.fullName ());
value (constReference);
}
示例28
public Terminal terminal (ConstEntry constReference)
{
return new Terminal (constReference);
}
示例29
protected Terminal (ConstEntry constReference)
{
rep (constReference.fullName ());
value (constReference);
}
示例30
public Terminal terminal (ConstEntry constReference)
{
return new Terminal (constReference);
}