本文整理了Java中org.eclipse.persistence.internal.helper.Helper.classIsSubclass()
方法的一些代码示例,展示了Helper.classIsSubclass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.classIsSubclass()
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.helper.Helper
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!