Class DataTypeParser


  • public class DataTypeParser
    extends java.lang.Object
    • Method Detail

      • parse

        public DataType parse​(java.lang.String dataTypeString)
                       throws InvalidDataTypeException
        Parse a data-type string specification
        Parameters:
        dataTypeString - a known data-type name followed by zero or more pointer/array decorations.
        Returns:
        parsed data-type or null if not found
        Throws:
        InvalidDataTypeException - if data-type string is invalid or length exceeds specified maxSize
      • parse

        public DataType parse​(java.lang.String dataTypeString,
                              CategoryPath category)
                       throws InvalidDataTypeException
        Parse a data-type string specification with category path. If category is not null, the dataTypeManagerService will not be queried.
        Parameters:
        dataTypeString - a known data-type name followed by zero or more pointer/array decorations.
        category - known path of data-type or null if unknown
        Returns:
        parsed data-type or null if not found
        Throws:
        InvalidDataTypeException - if data-type string is invalid or length exceeds specified maxSize
      • parse

        public DataType parse​(java.lang.String dataTypeString,
                              DataType suggestedBaseDataType)
                       throws InvalidDataTypeException
        Parse a data-type string specification using the specified baseDatatype.
        Parameters:
        suggestedBaseDataType - base data-type (may be null), this will be used as the base data-type if its name matches the base name in the specified dataTypeString.
        dataTypeString - a base data-type followed by a sequence of zero or more pointer/array decorations to be applied. The string may start with the baseDataType's name.
        Returns:
        parsed data-type or null if not found
        Throws:
        InvalidDataTypeException - if data-type string is invalid or length exceeds specified maxSize