| Modifier | Constructor and Description |
|---|---|
protected |
PropertyRule(RuleFactory ruleFactory) |
protected PropertyRule(RuleFactory ruleFactory)
public com.sun.codemodel.JDefinedClass apply(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.sun.codemodel.JDefinedClass jclass, Schema schema)
This rule adds a property to a given Java class according to the Java Bean spec. A private field is added to the class, along with accompanying accessor methods.
If this rule's schema mapper is configured to include builder methods
(see
GenerationConfig.isGenerateBuilders()
), then a builder method of the form withFoo(Foo foo); is
also added.
apply in interface Rule<com.sun.codemodel.JDefinedClass,com.sun.codemodel.JDefinedClass>nodeName - the name of the property to be appliednode - the node describing the characteristics of this propertyjclass - the Java class which should have this property addedschema - the schema to which this schema rule (and the given node)
belongs.Copyright © 2014. All Rights Reserved.