org.apache.shiro.util.Assert.isAssignable()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(129)

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

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"));
}

相关文章