Class DataTypeParser


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

      • DataTypeParser

        public DataTypeParser​(DataTypeQueryService dataTypeManagerService,
                              DataTypeParser.AllowedDataTypes allowedTypes)
        A constructor that does not use the source or destination data type managers. In terms of the source data type manager, this means that all data type managers will be used when resolving data types.
        Parameters:
        dataTypeManagerService -
        allowedTypes -
      • DataTypeParser

        public DataTypeParser​(DataTypeManager sourceDataTypeManager,
                              DataTypeManager destinationDataTypeManager,
                              DataTypeQueryService dataTypeManagerService,
                              DataTypeParser.AllowedDataTypes allowedTypes)
        Constructor
        Parameters:
        sourceDataTypeManager - preferred source data-type manager, or null
        destinationDataTypeManager - target data-type manager, or null
        dataTypeManagerService - data-type manager tool service, or null
        allowedTypes - constrains which data-types may be parsed
        See Also:
        #DataTypeParser(DataTypeManagerService, AllowedDataTypes)
    • Method Detail

      • parse

        public DataType parse​(java.lang.String dataTypeString)
                       throws InvalidDataTypeException,
                              CancelledException
        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
        CancelledException - parse cancelled through user interaction
      • parse

        public DataType parse​(java.lang.String dataTypeString,
                              CategoryPath category)
                       throws InvalidDataTypeException,
                              CancelledException
        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
        CancelledException - parse cancelled through user interaction (only if parser contructed with service)
      • parse

        public DataType parse​(java.lang.String dataTypeString,
                              DataType suggestedBaseDataType)
                       throws InvalidDataTypeException,
                              CancelledException
        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
        CancelledException - parse cancelled through user interaction (only if parser contructed with service)