Package com.sap.cds.generator.util
Class TypeUtils
java.lang.Object
com.sap.cds.generator.util.TypeUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddStaticCreateForKeys(com.squareup.javapoet.TypeSpec.Builder builder, com.sap.cds.reflect.CdsEntity entity, Map<String, com.squareup.javapoet.ParameterSpec> parameters) static voidaddStaticMethod(com.squareup.javapoet.TypeSpec.Builder builder, com.squareup.javapoet.TypeName returnType, com.squareup.javapoet.TypeSpec.Builder... anonymousbuilder) static com.squareup.javapoet.ClassNamebuilderClassName(com.sap.cds.reflect.CdsDefinition def) static com.squareup.javapoet.ClassNamestatic Stream<com.sap.cds.reflect.CdsElement>getAnonymousElements(com.sap.cds.reflect.CdsElement element) static com.squareup.javapoet.TypeNamegetAttributeType(com.sap.cds.reflect.CdsType type, Configuration cfg) static com.squareup.javapoet.ClassNamegetInnerEventContextClassName(com.sap.cds.reflect.CdsDefinition def, String innerClassName) static List<com.sap.cds.reflect.CdsElement>getManagedToOneFks(com.sap.cds.reflect.CdsElement attribute) static com.squareup.javapoet.TypeNamegetOperationResultType(com.sap.cds.reflect.CdsDefinition operation, com.sap.cds.reflect.CdsType returnType, NamesUtils namesUtils) static com.squareup.javapoet.TypeNamegetReturnType(com.sap.cds.reflect.CdsElement attribute, Configuration cfg) static booleanisAnonymousAspect(com.sap.cds.reflect.CdsElement element) static booleanisAnonymousType(com.sap.cds.reflect.CdsType type) static booleanisCompositionOfAspectsWithStructuredElements(com.sap.cds.reflect.CdsElement element) static com.squareup.javapoet.ParameterizedTypeNamelistOf(com.squareup.javapoet.TypeName type) static voidlogWarningForManyToManyWithStructElement(com.sap.cds.reflect.CdsModel model, com.sap.cds.reflect.CdsStructuredType struct)
-
Method Details
-
getAttributeType
public static com.squareup.javapoet.TypeName getAttributeType(com.sap.cds.reflect.CdsType type, Configuration cfg) -
getReturnType
public static com.squareup.javapoet.TypeName getReturnType(com.sap.cds.reflect.CdsElement attribute, Configuration cfg) -
getOperationResultType
public static com.squareup.javapoet.TypeName getOperationResultType(com.sap.cds.reflect.CdsDefinition operation, com.sap.cds.reflect.CdsType returnType, NamesUtils namesUtils) -
getInnerEventContextClassName
public static com.squareup.javapoet.ClassName getInnerEventContextClassName(com.sap.cds.reflect.CdsDefinition def, String innerClassName) -
listOf
public static com.squareup.javapoet.ParameterizedTypeName listOf(com.squareup.javapoet.TypeName type) -
className
-
builderClassName
public static com.squareup.javapoet.ClassName builderClassName(com.sap.cds.reflect.CdsDefinition def) -
isAnonymousAspect
public static boolean isAnonymousAspect(com.sap.cds.reflect.CdsElement element) -
isAnonymousType
public static boolean isAnonymousType(com.sap.cds.reflect.CdsType type) -
isCompositionOfAspectsWithStructuredElements
public static boolean isCompositionOfAspectsWithStructuredElements(com.sap.cds.reflect.CdsElement element) -
getAnonymousElements
public static Stream<com.sap.cds.reflect.CdsElement> getAnonymousElements(com.sap.cds.reflect.CdsElement element) -
addStaticMethod
public static void addStaticMethod(com.squareup.javapoet.TypeSpec.Builder builder, com.squareup.javapoet.TypeName returnType, com.squareup.javapoet.TypeSpec.Builder... anonymousbuilder) -
addStaticCreateForKeys
-
getManagedToOneFks
public static List<com.sap.cds.reflect.CdsElement> getManagedToOneFks(com.sap.cds.reflect.CdsElement attribute) -
logWarningForManyToManyWithStructElement
public static void logWarningForManyToManyWithStructElement(com.sap.cds.reflect.CdsModel model, com.sap.cds.reflect.CdsStructuredType struct)
-