当前位置: 首页>>代码示例>>Java>>正文


Java RepositoryID类代码示例

本文整理汇总了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);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:52,代码来源:Preprocessor.java


注:本文中的com.sun.tools.corba.se.idl.RepositoryID类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。