Skip to content

Commit

Permalink
Merge pull request #617 from bgorven/master
Browse files Browse the repository at this point in the history
Allow setting custom annotator and custom rule factory fields directly in Gradle
  • Loading branch information
joelittlejohn authored Sep 8, 2016
2 parents 59602f7 + bd023f6 commit 0c5f7f6
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,18 @@ public class JsonSchemaExtension implements GenerationConfig {
customAnnotator = Class.forName(clazz, true, this.class.classLoader)
}

public void setCustomAnnotator(Class clazz) {
customAnnotator = clazz
}

public void setCustomRuleFactory(String clazz) {
customRuleFactory = Class.forName(clazz, true, this.class.classLoader)
}

public void setCustomRuleFactory(Class clazz) {
customRuleFactory = clazz
}

public void setSourceType(String s) {
sourceType = SourceType.valueOf(s.toUpperCase())
}
Expand Down

0 comments on commit 0c5f7f6

Please sign in to comment.