| Modifier | Constructor and Description |
|---|---|
protected |
TypeRule(RuleFactory ruleFactory) |
protected TypeRule(RuleFactory ruleFactory)
public com.sun.codemodel.JType apply(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.sun.codemodel.JClassContainer jClassContainer, Schema schema)
When applied, this rule reads the details of the given node to determine
the appropriate Java type to return. This may be a newly generated type,
it may be a primitive type or other type such as String
or Object.
JSON schema types and their Java type equivalent:
Object
Set or
boolean
int
Object
double
ObjectRule)
List, see ArrayRule
String (or alternative based on
presence of "format", see FormatRule)
apply in interface Rule<com.sun.codemodel.JClassContainer,com.sun.codemodel.JType>nodeName - the name of the node for which this "type" rule appliesnode - the node for which this "type" rule appliesjClassContainer - the package into which any newly generated type may be placedschema - the schema to which this schema rule (and the given node)
belongs.Copyright © 2014. All Rights Reserved.