org.eclipse.persistence.internal.helper.Helper.classIsSubclass()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(112)

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

Helper.classIsSubclass介绍

[英]INTERNAL: Return whether a Class is a subclass of, or the same as, another Class.
[中]内部:返回一个类是另一个类的子类还是与另一个类相同。

代码示例

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Return whether the type is appropriate for the indirection policy.
 * In this case, the attribute type MUST be
 * compatible with the one specified by the ContainerPolicy
 * (i.e. either the container policy class is a subclass of the
 * declared type [jdk1.1] or the container policy class implements
 * the declared interface [jdk1.2]).
 */
protected boolean typeIsValid(Class declaredType) {
  if (Helper.classIsSubclass(this.getContainerClass(), declaredType)) {
    return true;
  }
  if (Helper.classImplementsInterface(this.getContainerClass(), declaredType)) {
    return true;
  }
  return false;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Return whether the type is appropriate for the indirection policy.
 * In this case, the attribute type MUST be
 * compatible with the one specified by the ContainerPolicy
 * (i.e. either the container policy class is a subclass of the
 * declared type [jdk1.1] or the container policy class implements
 * the declared interface [jdk1.2]).
 */
protected boolean typeIsValid(Class declaredType) {
  if (Helper.classIsSubclass(this.getContainerClass(), declaredType)) {
    return true;
  }
  if (Helper.classImplementsInterface(this.getContainerClass(), declaredType)) {
    return true;
  }
  return false;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Return whether the type is appropriate for the indirection policy.
 * In this case, the attribute type MUST be
 * compatible with the one specified by the ContainerPolicy
 * (i.e. either the container policy class is a subclass of the
 * declared type [jdk1.1] or the container policy class implements
 * the declared interface [jdk1.2]).
 */
protected boolean typeIsValid(Class declaredType) {
  if (Helper.classIsSubclass(this.getContainerClass(), declaredType)) {
    return true;
  }
  if (Helper.classImplementsInterface(this.getContainerClass(), declaredType)) {
    return true;
  }
  return false;
}

相关文章

Helper类方法