Class MinLengthMaxLengthRule

java.lang.Object
org.jsonschema2pojo.rules.MinLengthMaxLengthRule
All Implemented Interfaces:
Rule<com.sun.codemodel.JFieldVar,com.sun.codemodel.JFieldVar>

public class MinLengthMaxLengthRule extends Object implements Rule<com.sun.codemodel.JFieldVar,com.sun.codemodel.JFieldVar>
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.sun.codemodel.JFieldVar
    apply(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode parent, com.sun.codemodel.JFieldVar field, Schema currentSchema)
    Add whatever Java source is required to the given generatable to represent this schema rule.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MinLengthMaxLengthRule

      protected MinLengthMaxLengthRule(RuleFactory ruleFactory)
  • Method Details

    • apply

      public com.sun.codemodel.JFieldVar apply(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode parent, com.sun.codemodel.JFieldVar field, Schema currentSchema)
      Description copied from interface: Rule
      Add whatever Java source is required to the given generatable to represent this schema rule.
      Specified by:
      apply in interface Rule<com.sun.codemodel.JFieldVar,com.sun.codemodel.JFieldVar>
      Parameters:
      nodeName - the name of the JSON schema node
      node - the JSON schema node that has caused this rule to be applied
      parent - the JSON parent of node
      field - A code generation construct to which this rule should be applied
      currentSchema - the schema to which this schema rule (and the given node) belongs.
      Returns:
      the newly generated source code item that was added/created as a result of executing this rule