本文整理了Java中org.babyfish.lang.Arguments.mustNotBeInstanceOfValue()
方法的一些代码示例,展示了Arguments.mustNotBeInstanceOfValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arguments.mustNotBeInstanceOfValue()
方法的具体详情如下:
包路径:org.babyfish.lang.Arguments
类名称:Arguments
方法名:mustNotBeInstanceOfValue
暂无
代码示例来源:origin: babyfish-ct/babyfish
TransientWrapper(Validator<T> raw) {
this.raw = Arguments.mustNotBeInstanceOfValue(
"raw",
Arguments.mustNotBeInstanceOfValue(
"raw",
Arguments.mustNotBeNull("raw", raw),
CombinedImpl.class
),
Serializable.class
);
}
代码示例来源:origin: babyfish-ct/babyfish
NullSafeWrapper(Validator<T> raw) {
this.raw = Arguments.mustNotBeInstanceOfValue(
"raw",
Arguments.mustNotBeInstanceOfValue(
"raw",
Arguments.mustNotBeNull("raw", raw),
CombinedImpl.class
),
NotNullImpl.class
);
}
代码示例来源:origin: babyfish-ct/babyfish
@SuppressWarnings("unused") // Use the the byte-code that's generated dynamically
protected TypeVariableWrapper(TypeVariable<?> target) {
this.target = Arguments.mustNotBeInstanceOfValue(
"target",
Arguments.mustNotBeNull("target", target),
TypeVariableWrapper.class
);
}
代码示例来源:origin: babyfish-ct/babyfish
public IsTruePredicate(
XCriteriaBuilder criteriaBuilder,
Expression<Boolean> expression) {
super(criteriaBuilder);
Arguments.mustNotBeNull("expression", expression);
Arguments.mustNotBeInstanceOfValue("expression", expression, Predicate.class);
this.mustUnderSameCriteriaBuilder("expression", expression);
this.expression = expression;
}
代码示例来源:origin: babyfish-ct/babyfish
protected AbstractXMap(BaseEntries<K, V> baseEntries) {
if (this instanceof Serializable && this instanceof View) {
throw new IllegalProgramException(
CommonMessages.viewCanNotBeSerializable(
this.getClass(),
Serializable.class,
View.class));
}
this.baseEntries = Arguments.mustNotBeInstanceOfValue(
"baseEntries",
Arguments.mustNotBeNull("baseEntries", baseEntries),
TransientValueEntries.class);
}
代码示例来源:origin: babyfish-ct/babyfish
private static Class<?> getToppestSerializableClass(Class<?> clazz) {
if (!Serializable.class.isAssignableFrom(clazz)) {
return null;
}
Class<?> toppestSerializableClass;
toppestSerializableClass = CACHE.get(clazz);
if (toppestSerializableClass == null) {
Arguments.mustNotBeInstanceOfValue("clazz", clazz, Externalizable.class);
toppestSerializableClass = getToppestSerializableClass(clazz.getSuperclass());
if (toppestSerializableClass == null) {
toppestSerializableClass = clazz;
} else {
for (Method method : clazz.getDeclaredMethods()) {
if (method.getName().equals("onWriteState") &&
Arrays.equals(ON_WRITE_STATE_PARAMTER_TYPES, method.getParameterTypes())) {
throw new IllegalProgramException(invalidOverriding(method, method.getDeclaringClass()));
} else if (method.getName().equals("onReadState") &&
Arrays.equals(ON_READ_STATE_PARAMTER_TYPES, method.getParameterTypes())) {
throw new IllegalProgramException(invalidOverriding(method, method.getDeclaringClass()));
}
}
}
CACHE.put(clazz, toppestSerializableClass);
}
return toppestSerializableClass;
}
代码示例来源:origin: babyfish-ct/babyfish
protected AbstractWrapperXMap(XMap<K, V> base) {
Arguments.mustNotBeInstanceOfValue("this", this, View.class);
Arguments.mustNotBeInstanceOfValue("base", base, View.class);
RootData<K, V> rootData = this.createRootData();
if (rootData == null) {
throw new IllegalProgramException(CommonMessages.createRootDataMustReturnNonNull(this.getClass()));
}
rootData.rootWrapper = this;
rootData.setBase(base);
rootData.onInitialize();
this.rootData = rootData;
if (base != null) {
this.setBase(base);
}
}
代码示例来源:origin: babyfish-ct/babyfish
@SuppressWarnings("unchecked")
protected final void replace(Object base) {
Arguments.mustNotBeInstanceOfValue("this", this, View.class);
Arguments.mustNotBeInstanceOfValue("base", base, View.class);
Arguments.mustBeInstanceOfValue("base", base, XMap.class);
// Unnecessary but for optimization
if (this instanceof ModificationAware) {
MAMap<K, V> oldBase = (MAMap<K, V>)this.base;
if (oldBase != null) {
oldBase.removeMapElementListener(this.eventDispatcher());
}
}
// Only need to change "root.base", because "this.base" will be
// refreshed automatically when "this.getBase()" is called later.
this.getRootData().setBase((XMap<K, V>)base);
}
代码示例来源:origin: babyfish-ct/babyfish
protected AbstractWrapperXCollection(XCollection<E> base) {
Arguments.mustNotBeInstanceOfValue("this", this, View.class);
Arguments.mustNotBeInstanceOfValue("base", base, View.class);
RootData<E> rootData = this.createRootData();
if (rootData == null) {
throw new IllegalProgramException(CommonMessages.createRootDataMustReturnNonNull(this.getClass()));
}
rootData.rootWrapper = this;
rootData.setBase(base);
rootData.onInitialize();
this.rootData = rootData;
if (base != null) {
this.setBase(base);
}
}
代码示例来源:origin: babyfish-ct/babyfish
@SuppressWarnings("unchecked")
protected final void replace(Object base) {
Arguments.mustNotBeInstanceOfValue("this", this, View.class);
Arguments.mustNotBeInstanceOfValue("base", base, View.class);
Arguments.mustBeInstanceOfValue("base", base, XCollection.class);
// Unnecessary but for optimization
if (this instanceof ModificationAware) {
MACollection<E> oldBase = (MACollection<E>)this.base;
if (oldBase != null) {
oldBase.removeElementListener(this.eventDispatcher());
}
}
// Only need to change "root.base", because "this.base" will be
// refreshed automatically when "this.getBase()" is called later.
this.getRootData().setBase((XCollection<E>)base);
}
代码示例来源:origin: babyfish-ct/babyfish
protected AbstractWrapperXCollection(
AbstractWrapperXCollection<E> parent,
ViewInfo viewInfo) {
Arguments.mustNotBeNull("parent", parent);
Arguments.mustBeInstanceOfValue("this", this, View.class);
Arguments.mustNotBeInstanceOfValue("this", this, Serializable.class);
this.parent = parent;
this.rootData = parent.rootData;
this.viewInfo = viewInfo;
XCollection<E> base = parent.getBase(true);
if (base != null) {
base = this.createBaseView(base, viewInfo);
if (!(base instanceof View)) {
throw new IllegalProgramException(CommonMessages.createBaseViewMustReturnView(this.getClass(), View.class));
}
this.setBase(base);
}
}
代码示例来源:origin: babyfish-ct/babyfish
protected AbstractWrapperXMap(
AbstractWrapperXMap<K, V> parent, ViewInfo viewInfo) {
Arguments.mustNotBeNull("parent", parent);
Arguments.mustBeInstanceOfValue("this", this, View.class);
Arguments.mustNotBeInstanceOfValue("this", this, Serializable.class);
this.parent = parent;
this.rootData = parent.rootData;
this.viewInfo = viewInfo;
XMap<K, V> base = parent.getBase(true);
if (base != null) {
base = this.createBaseView(base, viewInfo);
if (!(base instanceof View)) {
throw new IllegalProgramException(
CommonMessages.createBaseViewMustReturnView(this.getClass(), View.class)
);
}
this.setBase(base);
}
}
代码示例来源:origin: babyfish-ct/babyfish
Arguments.mustNotBeInstanceOfValue("base", "base", View.class);
if (base != null) {
UnifiedComparator<? super E> defaultUnifiedComparator =
代码示例来源:origin: babyfish-ct/babyfish
Arguments.mustNotBeInstanceOfValue("base", base, View.class);
if (base != null) {
UnifiedComparator<? super K> defaultKeyUnifiedComparator =
代码示例来源:origin: babyfish-ct/babyfish
Map<XFrom<?, ?>, EntityImpl> fromEntityImplMap,
boolean directlyReferencedByTopmostSelection) {
Arguments.mustNotBeInstanceOfValue("path", path, MapKeyPath.class);
if (path == null) {
return null;
内容来源于网络,如有侵权,请联系作者删除!