本文整理汇总了Java中com.sun.tools.corba.se.idl.RepositoryID类的典型用法代码示例。如果您正苦于以下问题:Java RepositoryID类的具体用法?Java RepositoryID怎么用?Java RepositoryID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RepositoryID类属于com.sun.tools.corba.se.idl包,在下文中一共展示了RepositoryID类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: idPragma
import com.sun.tools.corba.se.idl.RepositoryID; //导入依赖的package包/类
/**
*
**/
private void idPragma () throws IOException, ParseException
{
// Before I can use a parser method, I must make sure it has the current token.
parser.token = token;
// <d57110> This flag will relax the restriction that the scopedNamed
// in this ID pragma directive cannot resolve to a module.
parser.isModuleLegalType (true);
SymtabEntry anErrorOccurred = new SymtabEntry ();
SymtabEntry entry = parser.scopedName (parser.currentModule, anErrorOccurred);
parser.isModuleLegalType (false); // <57110>
// Was the indicated type found in the symbol table?
if (entry == anErrorOccurred)
{
// Don't have to generate an error, scopedName already has.
scanner.skipLineComment ();
token = scanner.getToken ();
}
// <d57110>
//else if (PragmaIDs.contains (entry))
//{
// ParseException.badRepIDAlreadyAssigned (scanner, entry.name ());
// scanner.skipLineComment ();
// token = scanner.getToken ();
//}
else
{
token = parser.token;
String string = token.name;
// Do not match token until after raise exceptions, otherwise
// incorrect messages will be emitted!
if (PragmaIDs.contains (entry)) // <d57110>
{
ParseException.badRepIDAlreadyAssigned (scanner, entry.name ());
}
else if (!RepositoryID.hasValidForm (string)) // <d57110>
{
ParseException.badRepIDForm (scanner, string);
}
else
{
entry.repositoryID (new RepositoryID (string));
PragmaIDs.addElement (entry); // <d57110>
}
match (Token.StringLiteral);
}
}