Class SourceFileGenerationUtils

java.lang.Object
net.datenwerke.dtoservices.dtogenerator.util.SourceFileGenerationUtils

public class SourceFileGenerationUtils extends Object
  • Constructor Details

    • SourceFileGenerationUtils

      public SourceFileGenerationUtils()
  • Method Details

    • setAnnotationProcessor

      public static void setAnnotationProcessor(DtoAnnotationProcessor dtoAnnotationProcessor)
    • camelCaseToUnderscoreUpperCase

      public static String camelCaseToUnderscoreUpperCase(String camel)
    • getGetMethodForField

      public static String getGetMethodForField(String fieldName, TypeMirror type)
    • getSetMethodForField

      public static String getSetMethodForField(String fieldName)
    • getIsModifiedMethodForField

      public static String getIsModifiedMethodForField(String fieldName)
    • getPropertyAccessorMethodForField

      public static String getPropertyAccessorMethodForField(String fieldName)
    • isCollection

      public static Class<?> isCollection(DeclaredType decl)
      Instantiates a new collection.
      Parameters:
      decl -
    • isMap

      public static Class<?> isMap(DeclaredType decl)
    • isSet

      public static boolean isSet(DeclaredType decl)
    • isList

      public static boolean isList(DeclaredType decl)
    • instantiateCollection

      public static Collection instantiateCollection(DeclaredType decl)
    • instantiateCollection

      public static Collection instantiateCollection(Class<?> colClass)
    • isPoso

      public static boolean isPoso(DeclaredType typeDecl)
    • isPosoClass

      public static boolean isPosoClass(DeclaredType typeDecl)
      A Poso has the GenerateDto annotation and is a class.
      Parameters:
      typeDecl -
    • isPosoInterface

      public static boolean isPosoInterface(DeclaredType typeDecl)
      A Poso has the GenerateDto annotation and is an interface.
      Parameters:
      typeDecl -
    • isPosoEnum

      public static boolean isPosoEnum(DeclaredType typeDecl)
      A PosoEnum has the GenerateDto annotation and is an enum.
      Parameters:
      typeDecl -
    • getSimpleTypeName

      public static String getSimpleTypeName(DeclaredType typeDecl)
      Returns the name of a type including parameters such as Set<String>
    • getTypeArguments

      public static String getTypeArguments(DeclaredType typeDecl)
    • getQualifiedNameWithoutTypeArguments

      public static String getQualifiedNameWithoutTypeArguments(DeclaredType typeDecl)
    • getQualifiedNameWithoutTypeArguments

      public static String getQualifiedNameWithoutTypeArguments(String name)
    • getSimpleNameWithoutTypeArguments

      public static String getSimpleNameWithoutTypeArguments(DeclaredType typeDecl)
    • isPosoCollection

      public static boolean isPosoCollection(DeclaredType type)
    • getPosoInCollection

      public static PosoAnalizer getPosoInCollection(DeclaredType type)
    • getPoso

      public static PosoAnalizer getPoso(DeclaredType type)
    • unproxySimpleType

      public static String unproxySimpleType(String type)
    • isBooleanType

      public static boolean isBooleanType(TypeMirror type)
    • getNullValueFor

      public static String getNullValueFor(String type)