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


Java WrappedRuntimeException类代码示例

本文整理汇总了Java中org.apache.xml.utils.WrappedRuntimeException的典型用法代码示例。如果您正苦于以下问题:Java WrappedRuntimeException类的具体用法?Java WrappedRuntimeException怎么用?Java WrappedRuntimeException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WrappedRuntimeException类属于org.apache.xml.utils包,在下文中一共展示了WrappedRuntimeException类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createIteratorFromSteps

import org.apache.xml.utils.WrappedRuntimeException; //导入依赖的package包/类
/**
 * Create a new WalkingIterator from the steps in another WalkingIterator.
 * 
 * @param wi The iterator from where the steps will be taken.
 * @param numSteps The number of steps from the first to copy into the new 
 *                 iterator.
 * @return The new iterator.
 */
protected WalkingIterator createIteratorFromSteps(final WalkingIterator wi, int numSteps)
{
	WalkingIterator newIter = new WalkingIterator(wi.getPrefixResolver());
	try
	{
		AxesWalker walker = (AxesWalker)wi.getFirstWalker().clone();
		newIter.setFirstWalker(walker);
		walker.setLocPathIterator(newIter);
		for(int i = 1; i < numSteps; i++)
		{
			AxesWalker next = (AxesWalker)walker.getNextWalker().clone();
			walker.setNextWalker(next);
			next.setLocPathIterator(newIter);
			walker = next;
		}
		walker.setNextWalker(null);
	}
	catch(CloneNotSupportedException cnse)
	{
		throw new WrappedRuntimeException(cnse);
	}
	return newIter;
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:32,代码来源:RedundentExprEliminator.java

示例2: getInstance

import org.apache.xml.utils.WrappedRuntimeException; //导入依赖的package包/类
/**
 * Get an instance of the given object in this pool 
 *
 * @return An instance of the given object
 */
public synchronized DTMIterator getInstance()
{
  // Check if the pool is empty.
  if (m_freeStack.isEmpty())
  {

    // Create a new object if so.
    try
    {
      return (DTMIterator)m_orig.clone();
    }
    catch (Exception ex)
    {
      throw new WrappedRuntimeException(ex);
    }
  }
  else
  {
    // Remove object from end of free pool.
    DTMIterator result = (DTMIterator)m_freeStack.remove(m_freeStack.size() - 1);
    return result;
  }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:29,代码来源:IteratorPool.java

示例3: unwrapException

import org.apache.xml.utils.WrappedRuntimeException; //导入依赖的package包/类
public static TransformerException unwrapException(TransformerException exception) {
    Throwable cause = exception.getCause();
    while (cause != null) {
        if (cause instanceof TransformerException) {
            return unwrapException((TransformerException) cause);
        }
        if (cause instanceof WrappedRuntimeException) {
            cause = ((WrappedRuntimeException) cause).getException();
        } else {
            cause = cause.getCause();
        }
    }
    return exception;
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:15,代码来源:MCRErrorListener.java

示例4: getCause

import org.apache.xml.utils.WrappedRuntimeException; //导入依赖的package包/类
public static Exception getCause(WrappedRuntimeException ex) {
    return getCause(ex.getException());
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:4,代码来源:MCRExceptionCauseFinder.java

示例5: error

import org.apache.xml.utils.WrappedRuntimeException; //导入依赖的package包/类
public void error(TransformerException ex) {
    throw new WrappedRuntimeException(MCRExceptionCauseFinder.getCause(ex));
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:4,代码来源:MCRTemplatesCompiler.java

示例6: fatalError

import org.apache.xml.utils.WrappedRuntimeException; //导入依赖的package包/类
public void fatalError(TransformerException ex) {
    throw new WrappedRuntimeException(MCRExceptionCauseFinder.getCause(ex));
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:4,代码来源:MCRTemplatesCompiler.java

示例7: nextNode

import org.apache.xml.utils.WrappedRuntimeException; //导入依赖的package包/类
/**
 * This method should try and build one or more nodes in the table.
 *
 * @return The true if a next node is found or false if
 *         there are no more nodes.
 */
protected boolean nextNode()
{

  if (null == m_incrementalSAXSource)
    return false;

  if (m_endDocumentOccured)
  {
    clearCoRoutine();

    return false;
  }

  Object gotMore = m_incrementalSAXSource.deliverMoreNodes(true);

  // gotMore may be a Boolean (TRUE if still parsing, FALSE if
  // EOF) or an exception if IncrementalSAXSource malfunctioned
  // (code error rather than user error).
  //
  // %REVIEW% Currently the ErrorHandlers sketched herein are
  // no-ops, so I'm going to initially leave this also as a
  // no-op.
  if (!(gotMore instanceof Boolean))
  {
    if(gotMore instanceof RuntimeException)
    {
      throw (RuntimeException)gotMore;
    }
    else if(gotMore instanceof Exception)
    {
      throw new WrappedRuntimeException((Exception)gotMore);
    }
    // for now...
    clearCoRoutine();

    return false;

    // %TBD%
  }

  if (gotMore != Boolean.TRUE)
  {

    // EOF reached without satisfying the request
    clearCoRoutine();  // Drop connection, stop trying

    // %TBD% deregister as its listener?
  }

  return true;
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:58,代码来源:SAX2DTM.java


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