public class SourceFileGenerationUtils
extends java.lang.Object
Constructor and Description |
---|
SourceFileGenerationUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
camelCaseToUnderscoreUpperCase(java.lang.String camel) |
static java.lang.String |
getGetMethodForField(java.lang.String fieldName,
javax.lang.model.type.TypeMirror type) |
static java.lang.String |
getIsModifiedMethodForField(java.lang.String fieldName) |
static java.lang.String |
getNullValueFor(java.lang.String type) |
static PosoAnalizer |
getPoso(javax.lang.model.type.DeclaredType type) |
static PosoAnalizer |
getPosoInCollection(javax.lang.model.type.DeclaredType type) |
static java.lang.String |
getPropertyAccessorMethodForField(java.lang.String fieldName) |
static java.lang.String |
getQualifiedNameWithoutTypeArguments(javax.lang.model.type.DeclaredType typeDecl) |
static java.lang.String |
getQualifiedNameWithoutTypeArguments(java.lang.String name) |
static java.lang.String |
getSetMethodForField(java.lang.String fieldName) |
static java.lang.String |
getSimpleNameWithoutTypeArguments(javax.lang.model.type.DeclaredType typeDecl) |
static java.lang.String |
getSimpleTypeName(javax.lang.model.type.DeclaredType typeDecl)
Returns the name of a type including parameters such as Set<String>
|
static java.lang.String |
getTypeArguments(javax.lang.model.type.DeclaredType typeDecl) |
static java.util.Collection |
instantiateCollection(java.lang.Class<?> colClass) |
static java.util.Collection |
instantiateCollection(javax.lang.model.type.DeclaredType decl) |
static boolean |
isBooleanType(javax.lang.model.type.TypeMirror type) |
static java.lang.Class<?> |
isCollection(javax.lang.model.type.DeclaredType decl)
Instantiates a new collection.
|
static boolean |
isList(javax.lang.model.type.DeclaredType decl) |
static java.lang.Class<?> |
isMap(javax.lang.model.type.DeclaredType decl) |
static boolean |
isPoso(javax.lang.model.type.DeclaredType typeDecl) |
static boolean |
isPosoClass(javax.lang.model.type.DeclaredType typeDecl)
A Poso has the
GenerateDto annotation and is a class. |
static boolean |
isPosoCollection(javax.lang.model.type.DeclaredType type) |
static boolean |
isPosoEnum(javax.lang.model.type.DeclaredType typeDecl)
A PosoEnum has the
GenerateDto annotation and is an enum. |
static boolean |
isPosoInterface(javax.lang.model.type.DeclaredType typeDecl)
A Poso has the
GenerateDto annotation and is an interface. |
static boolean |
isSet(javax.lang.model.type.DeclaredType decl) |
static void |
setAnnotationProcessor(DtoAnnotationProcessor dtoAnnotationProcessor) |
static java.lang.String |
unproxySimpleType(java.lang.String type) |
public static void setAnnotationProcessor(DtoAnnotationProcessor dtoAnnotationProcessor)
public static java.lang.String camelCaseToUnderscoreUpperCase(java.lang.String camel)
public static java.lang.String getGetMethodForField(java.lang.String fieldName, javax.lang.model.type.TypeMirror type)
public static java.lang.String getSetMethodForField(java.lang.String fieldName)
public static java.lang.String getIsModifiedMethodForField(java.lang.String fieldName)
public static java.lang.String getPropertyAccessorMethodForField(java.lang.String fieldName)
public static java.lang.Class<?> isCollection(javax.lang.model.type.DeclaredType decl)
decl
- public static java.lang.Class<?> isMap(javax.lang.model.type.DeclaredType decl)
public static boolean isSet(javax.lang.model.type.DeclaredType decl)
public static boolean isList(javax.lang.model.type.DeclaredType decl)
public static java.util.Collection instantiateCollection(javax.lang.model.type.DeclaredType decl)
public static java.util.Collection instantiateCollection(java.lang.Class<?> colClass)
public static boolean isPoso(javax.lang.model.type.DeclaredType typeDecl)
public static boolean isPosoClass(javax.lang.model.type.DeclaredType typeDecl)
GenerateDto
annotation and is a class.typeDecl
- public static boolean isPosoInterface(javax.lang.model.type.DeclaredType typeDecl)
GenerateDto
annotation and is an interface.typeDecl
- public static boolean isPosoEnum(javax.lang.model.type.DeclaredType typeDecl)
GenerateDto
annotation and is an enum.typeDecl
- public static java.lang.String getSimpleTypeName(javax.lang.model.type.DeclaredType typeDecl)
public static java.lang.String getTypeArguments(javax.lang.model.type.DeclaredType typeDecl)
public static java.lang.String getQualifiedNameWithoutTypeArguments(javax.lang.model.type.DeclaredType typeDecl)
public static java.lang.String getQualifiedNameWithoutTypeArguments(java.lang.String name)
public static java.lang.String getSimpleNameWithoutTypeArguments(javax.lang.model.type.DeclaredType typeDecl)
public static boolean isPosoCollection(javax.lang.model.type.DeclaredType type)
public static PosoAnalizer getPosoInCollection(javax.lang.model.type.DeclaredType type)
public static PosoAnalizer getPoso(javax.lang.model.type.DeclaredType type)
public static java.lang.String unproxySimpleType(java.lang.String type)
public static boolean isBooleanType(javax.lang.model.type.TypeMirror type)
public static java.lang.String getNullValueFor(java.lang.String type)