private Entry<GeneratedType, Object> getTypeWithSchema(final Type referencedType) {
final Object schema = typeToDefiningSchema.get(referencedType);
private Entry<GeneratedType, Object> getTypeWithSchema(final Type referencedType) {
final Object schema = typeToDefiningSchema.get(referencedType);
- Preconditions.checkNotNull(schema);
- Preconditions.checkNotNull(definedType);
- if(definedType instanceof GeneratedTypeBuilder) {
+ Preconditions.checkNotNull(definedType, "Failed to find defined type for %s schema %s", referencedType, schema);
+
+ if (definedType instanceof GeneratedTypeBuilder) {
return new SimpleEntry<>(((GeneratedTypeBuilder) definedType).toInstance(), schema);
}
Preconditions.checkArgument(definedType instanceof GeneratedType,"Type {} is not GeneratedType", referencedType);
return new SimpleEntry<>(((GeneratedTypeBuilder) definedType).toInstance(), schema);
}
Preconditions.checkArgument(definedType instanceof GeneratedType,"Type {} is not GeneratedType", referencedType);
private static Set<Type> collectAllContainerTypes(final GeneratedType type, final Set<Type> collection) {
for (final MethodSignature definition : type.getMethodDefinitions()) {
Type childType = definition.getReturnType();
private static Set<Type> collectAllContainerTypes(final GeneratedType type, final Set<Type> collection) {
for (final MethodSignature definition : type.getMethodDefinitions()) {
Type childType = definition.getReturnType();