Class AnnotationConvertUtil


  • public final class AnnotationConvertUtil
    extends java.lang.Object
    Annotation convert utility
    • Method Detail

      • parseCardinality

        public EnumValueConfigurationSizing<java.lang.Integer> parseCardinality​(java.lang.String inputCardinality)
        Parse the cardinality expression
        Parameters:
        inputCardinality - the cardinality
        Returns:
        the parsed cardinality
      • parseSizeValue

        public <T> T parseSizeValue​(EnumValueConfigurationDataType dataType,
                                    java.lang.String input)
        Parse the size value
        Type Parameters:
        T - the generic type
        Parameters:
        dataType - the data type
        input - the string input, either number or *. In case it's null it will return null
        Returns:
        the parsed result
      • getName

        public <T extends javax.lang.model.element.ExecutableElement> java.lang.String getName​(T type)
        Get the name
        Type Parameters:
        T - the generic type
        Parameters:
        type - the type
        Returns:
        the type as name
      • getValue

        public <T extends javax.lang.model.element.AnnotationValue> java.lang.String getValue​(T type)
        Get the name
        Type Parameters:
        T - the generic type
        Parameters:
        type - the type
        Returns:
        the type as name
      • trimQuotationMarks

        public java.lang.String trimQuotationMarks​(java.lang.String input)
        Trim quotation marks
        Parameters:
        input - the input
        Returns:
        the trimmed output