Package org.jsonschema2pojo.rules
Class TitleRule
java.lang.Object
org.jsonschema2pojo.rules.TitleRule
- All Implemented Interfaces:
Rule<com.sun.codemodel.JDocCommentable,com.sun.codemodel.JDocComment>
public class TitleRule
extends Object
implements Rule<com.sun.codemodel.JDocCommentable,com.sun.codemodel.JDocComment>
Applies the "title" property property.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.sun.codemodel.JDocCommentapply(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode parent, com.sun.codemodel.JDocCommentable generatableType, Schema schema) Applies this schema rule to take the required code generation steps.
-
Constructor Details
-
TitleRule
protected TitleRule()
-
-
Method Details
-
apply
public com.sun.codemodel.JDocComment apply(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode parent, com.sun.codemodel.JDocCommentable generatableType, Schema schema) Applies this schema rule to take the required code generation steps.When a title node is found and applied with this rule, the value of the title is added as a JavaDoc comment. This rule is typically applied to the generated field, generated getter and generated setter for the property.
Note that the title is always inserted at the top of the JavaDoc comment.
- Specified by:
applyin interfaceRule<com.sun.codemodel.JDocCommentable,com.sun.codemodel.JDocComment> - Parameters:
nodeName- the name of the property to which this title appliesnode- the "title" schema nodeparent- the parent nodegeneratableType- comment-able code generation construct, usually a field or method, which should have this title appliedschema- the schema to which this schema rule (and the given node) belongs.- Returns:
- the JavaDoc comment created to contain the title
-