本文整理了Java中org.babyfish.lang.Arguments.mustBeCompatibleWithValue()
方法的一些代码示例,展示了Arguments.mustBeCompatibleWithValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arguments.mustBeCompatibleWithValue()
方法的具体详情如下:
包路径:org.babyfish.lang.Arguments
类名称:Arguments
方法名:mustBeCompatibleWithValue
暂无
代码示例来源:origin: babyfish-ct/babyfish
public Least(
XCriteriaBuilder criteriaBuilder,
Expression<T> argument) {
super(criteriaBuilder, argument);
Arguments.mustBeCompatibleWithValue("argument.getJavaType()", argument.getJavaType(), Comparable.class);
}
代码示例来源:origin: babyfish-ct/babyfish
public Greatest(
XCriteriaBuilder criteriaBuilder,
Expression<T> argument) {
super(criteriaBuilder, argument);
Arguments.mustBeCompatibleWithValue("argument.getJavaType()", argument.getJavaType(), Comparable.class);
}
代码示例来源:origin: babyfish-ct/babyfish
private static ClassEnhancer getInstance0(
Class<? extends ClassEnhancer> enhancerClass) {
Arguments.mustNotBeNull("enhancerClass", enhancerClass);
Arguments.mustBeCompatibleWithValue("enhancerClass", enhancerClass, ClassEnhancer.class);
Arguments.mustNotBeAbstract("enhancerClass", enhancerClass);
Constructor<? extends ClassEnhancer> constructor;
try {
constructor = enhancerClass.getDeclaredConstructor();
} catch (NoSuchMethodException ex) {
throw new IllegalArgumentException(
mustSupportDefaultConstructor("enhancerClass", enhancerClass),
ex
);
}
constructor.setAccessible(true);
try {
return constructor.newInstance();
} catch (InstantiationException ex) {
throw UncheckedException.rethrow(ex);
} catch (IllegalAccessException ex) {
throw new AssertionError("Internal bug", ex);
} catch (InvocationTargetException ex) {
throw UncheckedException.rethrow(ex.getTargetException());
}
}
代码示例来源:origin: babyfish-ct/babyfish
private static ClassWrapper getInstance0(Class<? extends ClassWrapper> wrapperClass) {
Arguments.mustNotBeNull("enhancerClass", wrapperClass);
Arguments.mustBeCompatibleWithValue("wrapperClass", wrapperClass, ClassWrapper.class);
Arguments.mustNotBeAbstract("wrapperClass", wrapperClass);
Constructor<? extends ClassWrapper> constructor;
try {
constructor = wrapperClass.getDeclaredConstructor();
} catch (NoSuchMethodException ex) {
throw new IllegalArgumentException(
mustSupportDefaultConstructor(wrapperClass),
ex
);
}
constructor.setAccessible(true);
try {
return constructor.newInstance();
} catch (InstantiationException ex) {
throw UncheckedException.rethrow(ex);
} catch (IllegalAccessException ex) {
throw new AssertionError("Internal bug", ex);
} catch (InvocationTargetException ex) {
throw UncheckedException.rethrow(ex.getTargetException());
}
}
代码示例来源:origin: babyfish-ct/babyfish
@SuppressWarnings({ "unchecked", "rawtypes" })
private static Object createInstance(Class<? extends Singleton> clazz) {
Arguments.mustNotBeNull("clazz", clazz);
Arguments.mustBeCompatibleWithValue("clazz", clazz, Singleton.class);
Arguments.mustNotBeCompatibleWithValue("clazz", clazz, Externalizable.class);
Arguments.mustNotBeAbstract("clazz", clazz);
内容来源于网络,如有侵权,请联系作者删除!