Class Util
java.lang.Object
com.sun.tools.corba.ee.idl.Util
com.sun.tools.corba.ee.idl.toJavaPortable.Util
Class Util is a repository of static members available for general
use by the IDL parser framework and any generator extensions.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final short(package private) static final shortprivate static Hashtable(package private) static final short(package private) static final short(package private) static Hashtable<String, SymtabEntry> (package private) static final short -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddImportLines(SymtabEntry entry, Vector importTypes, short type) private static void(package private) static StringarrayInfo(Vector<Expression> arrayInfo) private static StringcheckForArrayBase(TypedefEntry t, Vector<SymtabEntry> importTypes, Vector<String> importList) private static voidcheckForArrayDimensions(String arrays, Vector<SymtabEntry> importTypes, Vector<String> importList) private static voidcheckForArrays(SymtabEntry entry, Vector<SymtabEntry> importTypes, Vector<String> importList) private static voidcheckForBounds(SymtabEntry entry, Vector<SymtabEntry> importTypes, Vector<String> importList) Determine the import lines for template types.private static voidcheckForGlobalConstants(String exprRep, Vector<SymtabEntry> importTypes, Vector<String> importList) Extract the global constants from the supplied integer expression representation (string) and add them to the supplied import list.static StringcollapseName(String name) Collapse primitive type names.static StringcontainerFullName(SymtabEntry container) static booleancorbaLevel(float min, float max) private static StringdoContainerFullName(SymtabEntry container) static StringfileName(SymtabEntry entry, NameModifier modifier, String extension) static StringfileName(SymtabEntry entry, String extension) Given a symbol table entry, return the name of the file which should be created.(package private) static voidfillInfo(SymtabEntry infoEntry) Fill the info field with the full name (with array info) of the type.(package private) static voidstatic GenFileStreamgetStream(String name, SymtabEntry entry) static StringFetch the version number of this build of the IDL-to-Java (portable) compiler from the appropriate properties file.static StringhelperName(SymtabEntry entry, boolean qualifiedName) (package private) static StringhexToOctal(String hex) static StringholderName(SymtabEntry entry) static booleanIDLEntity(SymtabEntry entry) static booleanisInterface(String name) static StringjavaName(SymtabEntry entry) Given a SymtabEntry, return the string which should be used for this entry.static StringjavaNativeName(String name) static StringjavaPrimName(String name) static StringjavaQualifiedName(SymtabEntry entry) Given a symtabEntry, return the name of this entry.static void(package private) static Stringstatic String(package private) static String(package private) static Stringprivate static voidprintImports(Vector<String> importList, PrintWriter stream) static StringsansArrayInfo(String name) static StringsansArrayInfo(Vector arrayInfo) static voidsetPackageTranslation(Hashtable pkgtrans) (package private) static voidsetSymbolTable(Hashtable symtab) This method is called by Setup.preEmit, so symbolTable is available for all Util methods.static GenFileStreamstream(SymtabEntry entry, NameModifier modifier, String extension) static GenFileStreamstream(SymtabEntry entry, String extension) static StringstripLeadingUnderscores(String string) static StringstripLeadingUnderscoresFromID(String string) static Stringstatic SymtabEntrytypeOf(SymtabEntry entry) static voidwriteInitializer(String indent, String name, String arrayDcl, SymtabEntry entry, PrintWriter stream) static voidwriteInitializer(String indent, String name, String arrayDcl, SymtabEntry entry, String initializer, PrintWriter stream) static voidwritePackage(PrintWriter stream, SymtabEntry entry) static voidwritePackage(PrintWriter stream, SymtabEntry entry, short type) static voidwritePackage(PrintWriter stream, SymtabEntry entry, String name, short type) static voidwriteProlog(PrintWriter stream, String filename) Methods inherited from class Util
absDelta, capitalize, getAbsolutePath, getMessage, getMessage, getMessage, getVersion, isAttribute, isConst, isEnum, isException, isInterface, isMethod, isModule, isParameter, isPrimitive, isSequence, isString, isStruct, isTypedef, isUnion, registerMessageResource
-
Field Details
-
TypeFile
static final short TypeFile- See Also:
-
StubFile
static final short StubFile- See Also:
-
HelperFile
static final short HelperFile- See Also:
-
HolderFile
static final short HolderFile- See Also:
-
StateFile
static final short StateFile- See Also:
-
symbolTable
-
packageTranslation
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
getVersion
Fetch the version number of this build of the IDL-to-Java (portable) compiler from the appropriate properties file.- Returns:
- the version number of this compiler build.
-
setSymbolTable
This method is called by Setup.preEmit, so symbolTable is available for all Util methods. -
setPackageTranslation
-
isInterface
-
arrayInfo
-
sansArrayInfo
-
sansArrayInfo
-
fileName
Given a symbol table entry, return the name of the file which should be created. -
fileName
-
stream
-
stream
-
getStream
-
containerFullName
-
translate
-
doContainerFullName
-
javaName
Given a SymtabEntry, return the string which should be used for this entry. Enums are converted to ints, typedefs and sequences are converted to their info types. javaQualifiedName does not do any of these conversions. -
javaPrimName
-
javaNativeName
-
javaQualifiedName
Given a symtabEntry, return the name of this entry. This method does not do any conversions like javaName does. -
collapseName
-
typeOf
-
fillInfo
Fill the info field with the full name (with array info) of the type. -
fillValueBoxInfo
-
holderName
-
helperName
-
writePackage
-
writePackage
-
writePackage
-
printImports
-
addTo
-
addImportLines
-
checkForArrays
private static void checkForArrays(SymtabEntry entry, Vector<SymtabEntry> importTypes, Vector<String> importList) -
checkForArrayBase
private static String checkForArrayBase(TypedefEntry t, Vector<SymtabEntry> importTypes, Vector<String> importList) -
checkForArrayDimensions
private static void checkForArrayDimensions(String arrays, Vector<SymtabEntry> importTypes, Vector<String> importList) -
checkForBounds
private static void checkForBounds(SymtabEntry entry, Vector<SymtabEntry> importTypes, Vector<String> importList) Determine the import lines for template types. -
checkForGlobalConstants
private static void checkForGlobalConstants(String exprRep, Vector<SymtabEntry> importTypes, Vector<String> importList) Extract the global constants from the supplied integer expression representation (string) and add them to the supplied import list. -
writeInitializer
public static void writeInitializer(String indent, String name, String arrayDcl, SymtabEntry entry, PrintWriter stream) -
writeInitializer
public static void writeInitializer(String indent, String name, String arrayDcl, SymtabEntry entry, String initializer, PrintWriter stream) -
mkdir
-
writeProlog
-
stripLeadingUnderscores
-
stripLeadingUnderscoresFromID
-
parseExpression
-
parseTerminal
-
hexToOctal
-
parseBinary
-
parseUnary
-
IDLEntity
-
corbaLevel
public static boolean corbaLevel(float min, float max) - Returns:
- true if the current setting of corbaLevel is within delta of the range min <= corbaLevel <= max
-