JDefinedClass (String nodeName, JsonNode node, JsonNode parent, JDefinedClass jclass, Schema schema) { if (!(node instanceof ObjectNode) || node.size() != 1) { return jclass; } if (!this.ruleFactory.getGenerationConfig().isIncludeAdditionalProperties()) { // no additional properties allowed return jclass; } if (!ruleFactory.getAnnotator().isAdditionalPropertiesSupported()) { // schema allows additional properties, but serializer library can't support them return jclass; } ObjectNode objectNode = (ObjectNode)node; JsonNode propertyNode = objectNode.iterator().next(); JType propertyType; if (propertyNode != null && propertyNode.size() != 0) { propertyType = ruleFactory.getSchemaRule().apply(nodeName + "Property", propertyNode, parent, jclass, schema); } else { propertyType = jclass.owner().ref(Object.class); } JFieldVar field = addAdditionalPropertiesField(jclass, propertyType); addGetter(jclass, field); addSetter(jclass, propertyType, field); if (ruleFactory.getGenerationConfig().isIncludeJsr303Annotations()) { ruleFactory.getValidRule().apply(nodeName, node, parent, field, schema); } return jclass; }