TransientWrapper(Validator<T> raw) { this.raw = Arguments.mustNotBeInstanceOfValue( "raw", Arguments.mustNotBeInstanceOfValue( "raw", Arguments.mustNotBeNull("raw", raw), CombinedImpl.class ), Serializable.class ); }
NullSafeWrapper(Validator<T> raw) { this.raw = Arguments.mustNotBeInstanceOfValue( "raw", Arguments.mustNotBeInstanceOfValue( "raw", Arguments.mustNotBeNull("raw", raw), CombinedImpl.class ), NotNullImpl.class ); }
@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 ); }
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; }
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); }
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; }
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); } }
@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); }
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); } }
@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); }
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); } }
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); } }
Arguments.mustNotBeInstanceOfValue("base", "base", View.class); if (base != null) { UnifiedComparator<? super E> defaultUnifiedComparator =
Arguments.mustNotBeInstanceOfValue("base", base, View.class); if (base != null) { UnifiedComparator<? super K> defaultKeyUnifiedComparator =
Map<XFrom<?, ?>, EntityImpl> fromEntityImplMap, boolean directlyReferencedByTopmostSelection) { Arguments.mustNotBeInstanceOfValue("path", path, MapKeyPath.class); if (path == null) { return null;