Package nz.org.riskscape.engine.types
Interface TypeProblems
- All Superinterfaces:
ProblemFactory
-
Method Summary
Modifier and TypeMethodDescriptioncannotBeNull
(Object thing, Type expected, Type actual) Variant ofspecific for nullability issues.</p>
couldNotCoerce
(Type given, Type expected) duplicateKeys
(Set<Struct.StructMember> duplicates) failedToValidate
(String typeId, Resource resource) static TypeProblems
get()
listItemMismatch
(Class<?> expected, Type actual) notStruct
(Expression thing, Type actual) requiresOneOf
(Object affected, List<Type> allowedTypes, Type actual) When affected requires one of allowedTypes, but actual was provided.structMemberMustBeOfType
(Object context, String member, Type expected, Type actual) Struct member namedmember
must be of typeexpected
structMemberNotProvided
(Struct.StructMember expected, Struct actual) structMustBeNonEmpty
(Object context) Struct must have at least one member (non-empty)structMustHaveMemberType
(Type requiredType, Struct actual) Struct must have a singlemember, but none were found among
-
Method Details
-
structMemberNotProvided
-
structMustBeNonEmpty
Struct must have at least one member (non-empty)
-
structMemberMustBeOfType
Struct member named
member
must be of typeexpected
-
structMustHaveMemberType
Struct must have a single
member, but none were found among -
notStruct
-
mismatch
-
mismatch
-
mismatch
-
listItemMismatch
-
requiresOneOf
When affected requires one of allowedTypes, but actual was provided.
- Parameters:
affected
-allowedTypes
- list of types that would be acceptedactual
- the type that was provided- Returns:
- Problem
-
couldNotCoerce
-
failedToValidate
-
duplicateKeys
-
cannotBeNull
Variant of
specific for nullability issues.</p>
-
get
-