org.apache.xpath.Expression.isSameClass()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(166)

本文整理了Java中org.apache.xpath.Expression.isSameClass()方法的一些代码示例,展示了Expression.isSameClass()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Expression.isSameClass()方法的具体详情如下:
包路径:org.apache.xpath.Expression
类名称:Expression
方法名:isSameClass

Expression.isSameClass介绍

[英]This is a utility method to tell if the passed in class is the same class as this. It is to be used by the deepEquals method. I'm bottlenecking it here because I'm not totally confident that comparing the class objects is the best way to do this.
[中]这是一个实用方法,用于判断传入的类是否与此类相同。它将由deepEquals方法使用。我在这里限制它,因为我不完全相信比较类对象是最好的方法。

代码示例

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  return true;
}

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  return true;
}

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  if(!m_right.deepEquals(((UnaryOperation)expr).m_right))
    return false;
    
  return true;
}

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  if(!m_right.deepEquals(((UnaryOperation)expr).m_right))
    return false;
    
  return true;
}

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  // If equals at the expression level calls deepEquals, I think we're 
  // still safe from infinite recursion since this object overrides 
  // equals.  I hope.
  if(!this.equals((XObject)expr))
    return false;
    
  return true;
}

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

if(!isSameClass(expr))
  return false;

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  // If equals at the expression level calls deepEquals, I think we're 
  // still safe from infinite recursion since this object overrides 
  // equals.  I hope.
  if(!this.equals((XObject)expr))
    return false;
    
  return true;
}

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

if(!isSameClass(expr))
  return false;

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  UnionPattern up = (UnionPattern)expr;
    
  if(null != m_patterns)
  {
    int n = m_patterns.length;
    if((null == up.m_patterns) || (up.m_patterns.length != n))
      return false;
      
    for(int i = 0; i < n; i++)
    {
      if(!m_patterns[i].deepEquals(up.m_patterns[i]))
        return false;
    }
  }
  else if(up.m_patterns != null)
    return false;
    
  return true;
  
}

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  UnionPattern up = (UnionPattern)expr;
    
  if(null != m_patterns)
  {
    int n = m_patterns.length;
    if((null == up.m_patterns) || (up.m_patterns.length != n))
      return false;
      
    for(int i = 0; i < n; i++)
    {
      if(!m_patterns[i].deepEquals(up.m_patterns[i]))
        return false;
    }
  }
  else if(up.m_patterns != null)
    return false;
    
  return true;
  
}

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

/**
  * @see Expression#deepEquals(Expression)
  */
 public boolean deepEquals(Expression expr)
 {
   if(!isSameClass(expr))
     return false;
     
   if(!m_left.deepEquals(((Operation)expr).m_left))
     return false;
     
   if(!m_right.deepEquals(((Operation)expr).m_right))
     return false;
     
   return true;
 }
}

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
  * @see Expression#deepEquals(Expression)
  */
 public boolean deepEquals(Expression expr)
 {
   if(!isSameClass(expr))
     return false;
     
   if(!m_left.deepEquals(((Operation)expr).m_left))
     return false;
     
   if(!m_right.deepEquals(((Operation)expr).m_right))
     return false;
     
   return true;
 }
}

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  if(!m_qname.equals(((Variable)expr).m_qname))
    return false;
    
  // We have to make sure that the qname really references 
  // the same variable element.
 if(getElemVariable() != ((Variable)expr).getElemVariable())
   return false;
    
  return true;
}

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * @see Expression#deepEquals(Expression)
 */
public boolean deepEquals(Expression expr)
{
  if(!isSameClass(expr))
    return false;
    
  if(!m_qname.equals(((Variable)expr).m_qname))
    return false;
    
  // We have to make sure that the qname really references 
  // the same variable element.
 if(getElemVariable() != ((Variable)expr).getElemVariable())
   return false;
    
  return true;
}

相关文章