play
.
boilerplate
.
generators
GeneratorUtils
object
GeneratorUtils
extends
StringUtils
with
DefinitionsSupport
Linear Supertypes
DefinitionsSupport
,
ObjectSupport
,
EnumerationsSupport
,
BaseTypesSupport
,
StringUtils
,
AnyRef
,
Any
Ordering
Alphabetic
By inheritance
Inherited
GeneratorUtils
DefinitionsSupport
ObjectSupport
EnumerationsSupport
BaseTypesSupport
StringUtils
AnyRef
Any
Hide All
Show all
Learn more about member selection
Visibility
Public
All
Type Members
sealed
trait
Constraint
extends
AnyRef
Definition Classes
ObjectSupport
implicit final
class
IterableExtensionMethods
[
A
,
Repr
]
extends
AnyVal
case class
ListConstraint
(
constraints:
Seq
[
DefinitionsSupport.Constraint
]
,
tpe:
treehugger.Forest.Type
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
MapConstraint
(
constraints:
Seq
[
DefinitionsSupport.Constraint
]
,
tpe:
treehugger.Forest.Type
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
MaxLength
(
length:
Int
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
Maximum
(
value:
Any
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
MethodParam
(
valDef:
treehugger.Forest.ValDef
,
fullQualified:
treehugger.Forest.ValDef
,
additionalDef:
Seq
[
treehugger.Forest.Tree
]
,
implicits:
Seq
[
treehugger.Forest.Tree
]
,
defaultValue:
Option
[
treehugger.Forest.Tree
]
,
doc:
treehugger.Forest.DocElement
)
extends
Product
with
Serializable
case class
MimeTypeSupport
(
mimeType:
String
,
requestBody:
treehugger.Forest.Tree
,
deserialize: (
treehugger.Forest.Type
) ⇒ (
treehugger.Forest.Ident
) ⇒
treehugger.Forest.Tree
,
serialize: (
treehugger.Forest.Type
) ⇒ (
treehugger.Forest.Ident
) ⇒
treehugger.Forest.Tree
)
extends
Product
with
Serializable
case class
MinLength
(
length:
Int
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
Minimum
(
value:
Any
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
ObjectJson
(
reads:
treehugger.Forest.Tree
,
writes:
treehugger.Forest.Tree
)
extends
Product
with
Serializable
Definition Classes
ObjectSupport
case class
ObjectProperty
(
name:
String
,
support:
TypeSupport
,
noOptType:
treehugger.Forest.Type
,
isOpt:
Boolean
,
defaultValue:
Option
[
treehugger.Forest.Literal
]
,
constraints:
Seq
[
DefinitionsSupport.Constraint
]
)
extends
Product
with
Serializable
Definition Classes
ObjectSupport
case class
ObjectPropertyJson
(
ident:
String
,
reads:
treehugger.Forest.Enumerator
,
writes:
treehugger.Forest.Tree
)
extends
Product
with
Serializable
Definition Classes
ObjectSupport
case class
Pattern
(
pattern:
String
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
Value Members
final
def
!=
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
!=
(
arg0:
Any
)
:
Boolean
Definition Classes
Any
final
def
##
()
:
Int
Definition Classes
AnyRef → Any
final
def
==
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
==
(
arg0:
Any
)
:
Boolean
Definition Classes
Any
final
val
ACTION_ANYCONTENT
:
treehugger.Forest.Type
final
val
ACTION_EMPTY
:
treehugger.Forest.Type
object
Email
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
final
def
FUTURE
(
tpe:
treehugger.Forest.Type
)
:
treehugger.Forest.Type
final
def
IDENTITY
(
tpe:
treehugger.Forest.Type
)
:
treehugger.Forest.Tree
final
def
JSON_TO_TYPE
(
tpe:
treehugger.Forest.Type
)
(
ident:
treehugger.Forest.Ident
)
:
treehugger.Forest.Tree
final
val
MIME_TYPE_JSON
: String("application/json")
final
val
MIME_TYPE_TEXT
: String("text/plain")
final
val
PARSER_ANYCONTENT
:
treehugger.Forest.Tree
final
val
PARSER_EMPTY
:
treehugger.Forest.Tree
final
val
REQUEST_AS_JSON
:
treehugger.Forest.Tree
final
val
REQUEST_AS_TEXT
:
treehugger.Forest.Tree
final
val
REQUEST_EMPTY
:
treehugger.Forest.Tree
final
def
TYPE_TO_JSON
(
tpe:
treehugger.Forest.Type
)
(
ident:
treehugger.Forest.Ident
)
:
treehugger.Forest.Tree
val
UnexpectedResult
:
treehugger.Forest.TypeName
final
def
asInstanceOf
[
T0
]
:
T0
Definition Classes
Any
def
classNameToPath
(
packageName:
String
,
className:
String
,
ext:
String
)
:
String
Definition Classes
StringUtils
def
cleanDuplicateSlash
(
s:
String
)
:
String
Definition Classes
StringUtils
def
clone
()
:
AnyRef
Attributes
protected[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
(
...
)
def
codeIsOk
(
code:
Int
)
:
Boolean
def
collectPropertyConstraints
(
property:
Definition
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[
Constraint
]
Definition Classes
ObjectSupport
def
composeClassName
(
objName:
String
)
:
String
Definition Classes
ObjectSupport
def
composeFullClassName
(
objName:
String
,
obj:
ComplexDefinition
)
(
implicit
ctx:
GeneratorContext
)
:
String
Definition Classes
ObjectSupport
def
composeInterfaceName
(
objName:
String
)
:
String
Definition Classes
ObjectSupport
def
composeName
(
parts:
String
*
)
:
String
Definition Classes
StringUtils
def
decapitalize
(
s:
String
)
:
String
Definition Classes
StringUtils
final
def
eq
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
def
equals
(
arg0:
Any
)
:
Boolean
Definition Classes
AnyRef → Any
def
filterNonEmptyTree
(
trees:
Seq
[
treehugger.Forest.Tree
]
)
:
Seq
[
treehugger.Forest.Tree
]
def
finalize
()
:
Unit
Attributes
protected[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
(
classOf[java.lang.Throwable]
)
def
generateClassParams
(
properties:
Map
[
String
,
Definition
]
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[
ObjectProperty
]
Definition Classes
ObjectSupport
def
generateInterfaceDefs
(
interfaceName:
treehugger.Forest.Symbol
,
params:
Seq
[
ObjectProperty
]
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupportDefs
Definition Classes
ObjectSupport
def
generateObject
(
fullClassName:
String
,
params:
Seq
[
ObjectProperty
]
,
parents:
Seq
[
treehugger.Forest.Symbol
]
,
context:
DefinitionContext
,
withDefinition:
Boolean
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
ObjectSupport
def
generateObjectDefs
(
objectClass:
treehugger.Forest.Symbol
,
params:
Seq
[
ObjectProperty
]
,
parents:
Seq
[
treehugger.Forest.Symbol
]
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[
TypeSupportDefs
]
Definition Classes
ObjectSupport
def
generateObjectJson
(
objectClass:
treehugger.Forest.Symbol
,
properties:
Seq
[
ObjectProperty
]
)
(
implicit
ctx:
GeneratorContext
)
:
ObjectJson
Definition Classes
ObjectSupport
def
generateObjectQueryBindable
(
objectClass:
treehugger.Forest.Symbol
,
properties:
Seq
[
ObjectProperty
]
)
(
implicit
ctx:
GeneratorContext
)
:
treehugger.Forest.Tree
Definition Classes
ObjectSupport
def
generateObjectReads
(
modelName:
String
,
modelType:
treehugger.Forest.Type
,
properties:
Seq
[
ObjectPropertyJson
]
)
(
implicit
ctx:
GeneratorContext
)
:
treehugger.Forest.Tree
Definition Classes
ObjectSupport
def
generateObjectWrites
(
modelName:
String
,
modelType:
treehugger.Forest.Type
,
properties:
Seq
[
ObjectPropertyJson
]
)
(
implicit
ctx:
GeneratorContext
)
:
treehugger.Forest.Tree
Definition Classes
ObjectSupport
def
getBodyParameters
(
path:
Path
,
operation:
Operation
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[(
String
,
MethodParam
)]
def
getBooleanSupport
(
bool:
BooleanDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
final
def
getClass
()
:
Class
[_]
Definition Classes
AnyRef → Any
def
getComplexObjectSupport
(
complex:
ComplexObjectDefinition
,
context:
DefinitionContext
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
ObjectSupport
def
getDateSupport
(
date:
DateDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getDateTimeSupport
(
dt:
DateTimeDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getDecimalSupport
(
decimal:
DecimalDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getDefaultValue
(
definition:
Definition
)
:
Option
[
treehugger.Forest.Literal
]
def
getDoubleSupport
(
double:
DoubleDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getEmailSupport
(
str:
EmailDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getEnumSupport
(
enum:
EnumDefinition
,
context:
DefinitionContext
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
EnumerationsSupport
def
getFileSupport
(
file:
FileDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getFloatSupport
(
float:
FloatDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getIntegerSupport
(
int:
IntegerDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getLongSupport
(
long:
LongDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getMethodParam
(
param:
Parameter
)
(
implicit
ctx:
GeneratorContext
)
: (
String
,
MethodParam
)
def
getMethodParameters
(
path:
Path
,
operation:
Operation
,
withHeaders:
Boolean
=
true
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[(
String
,
MethodParam
)]
def
getMimeTypeSupport
:
PartialFunction
[
String
,
MimeTypeSupport
]
def
getObjectSupport
(
obj:
ObjectDefinition
,
context:
DefinitionContext
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
ObjectSupport
def
getOperationResponseTraitName
(
operationId:
String
)
:
String
def
getParamImplicits
(
param:
Parameter
,
support:
TypeSupport
)
:
Seq
[
treehugger.Forest.Tree
]
def
getReadsConstraint
(
constraint:
Constraint
,
noOptType:
treehugger.Forest.Type
)
:
treehugger.Forest.Tree
Definition Classes
ObjectSupport
def
getResponseBodyType
(
response:
Response
)
(
implicit
ctx:
GeneratorContext
)
:
Option
[
TypeSupport
]
def
getResponseClassName
(
operationId:
String
,
responseCode:
ResponseCode
)
:
String
def
getSimpleTypeSupport
(
definition:
SimpleDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getStatusByCode
(
code:
Int
)
:
Option
[
String
]
def
getStringSupport
(
str:
StringDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getTypeSupport
(
definition:
Definition
,
context:
DefinitionContext
=
DefinitionContext.default
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
DefinitionsSupport
def
getTypeSupportRef
(
reference:
RefDefinition
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
DefinitionsSupport
def
getUUIDSupport
(
uuid:
UUIDDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
hashCode
()
:
Int
Definition Classes
AnyRef → Any
final
def
isInstanceOf
[
T0
]
:
Boolean
Definition Classes
Any
final
def
ne
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
notify
()
:
Unit
Definition Classes
AnyRef
final
def
notifyAll
()
:
Unit
Definition Classes
AnyRef
def
objectNameFromFileName
(
fileName:
String
,
obj:
String
,
skipNotValidChars:
Boolean
=
true
)
:
String
Definition Classes
StringUtils
def
padTo
(
n:
Int
,
s:
String
)
:
String
Definition Classes
StringUtils
def
sanitizeFileName
(
fileName:
String
)
:
String
Definition Classes
StringUtils
def
stringToValidIdentifier
(
str:
String
,
skipNotValidChars:
Boolean
)
:
String
Definition Classes
StringUtils
final
def
synchronized
[
T0
]
(
arg0: ⇒
T0
)
:
T0
Definition Classes
AnyRef
def
toString
()
:
String
Definition Classes
AnyRef → Any
final
def
wait
()
:
Unit
Definition Classes
AnyRef
Annotations
@throws
(
...
)
final
def
wait
(
arg0:
Long
,
arg1:
Int
)
:
Unit
Definition Classes
AnyRef
Annotations
@throws
(
...
)
final
def
wait
(
arg0:
Long
)
:
Unit
Definition Classes
AnyRef
Annotations
@throws
(
...
)
Inherited from
DefinitionsSupport
Inherited from
ObjectSupport
Inherited from
EnumerationsSupport
Inherited from
BaseTypesSupport
Inherited from
StringUtils
Inherited from
AnyRef
Inherited from
Any
Ungrouped