本文整理了Java中org.apache.shiro.util.Assert.isAssignable()
方法的一些代码示例,展示了Assert.isAssignable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.isAssignable()
方法的具体详情如下:
包路径:org.apache.shiro.util.Assert
类名称:Assert
方法名:isAssignable
[英]Assert that superType.isAssignableFrom(subType)
is true
.
Assert.isAssignable(Number.class, myClass);
[中]断言superType.isAssignableFrom(subType)
是true
Assert.isAssignable(Number.class, myClass);
代码示例来源:origin: apache/shiro
/**
* Assert that <code>superType.isAssignableFrom(subType)</code> is <code>true</code>.
* <pre class="code">Assert.isAssignable(Number.class, myClass);</pre>
* @param superType the super type to check
* @param subType the sub type to check
* @throws IllegalArgumentException if the classes are not assignable
*/
public static void isAssignable(Class superType, Class subType) {
isAssignable(superType, subType, "");
}
代码示例来源:origin: org.apache.shiro/shiro-lang
/**
* Assert that <code>superType.isAssignableFrom(subType)</code> is <code>true</code>.
* <pre class="code">Assert.isAssignable(Number.class, myClass);</pre>
* @param superType the super type to check
* @param subType the sub type to check
* @throws IllegalArgumentException if the classes are not assignable
*/
public static void isAssignable(Class superType, Class subType) {
isAssignable(superType, subType, "");
}
代码示例来源:origin: org.springframework.data/spring-data-geode
protected static EvictionPolicyMetaData from(AnnotationAttributes evictionPolicyAttributes,
ApplicationContext applicationContext) {
Assert.isAssignable(EvictionPolicy.class, evictionPolicyAttributes.annotationType());
return from(evictionPolicyAttributes.getEnum("type"),
(Integer) evictionPolicyAttributes.get("maximum"),
evictionPolicyAttributes.getEnum("action"),
resolveObjectSizer(evictionPolicyAttributes.getString("objectSizerName"), applicationContext),
evictionPolicyAttributes.getStringArray("regionNames"));
}
代码示例来源:origin: org.springframework.data/spring-data-gemfire
protected static EvictionPolicyMetaData from(AnnotationAttributes evictionPolicyAttributes,
ApplicationContext applicationContext) {
Assert.isAssignable(EvictionPolicy.class, evictionPolicyAttributes.annotationType());
return from(evictionPolicyAttributes.getEnum("type"),
(Integer) evictionPolicyAttributes.get("maximum"),
evictionPolicyAttributes.getEnum("action"),
resolveObjectSizer(evictionPolicyAttributes.getString("objectSizerName"), applicationContext),
evictionPolicyAttributes.getStringArray("regionNames"));
}
内容来源于网络,如有侵权,请联系作者删除!