Class DatatypeVisitor

    • Field Detail

      • setPrefix

        private java.lang.String setPrefix
      • sequencePrefix

        private java.lang.String sequencePrefix
      • refPrefix

        private java.lang.String refPrefix
      • open

        private java.lang.String open
      • close

        private java.lang.String close
      • builder

        private java.lang.StringBuilder builder
        Collects results.
      • qualifiedNameMode

        private QualifiedNameMode qualifiedNameMode
        Stores whether qualified names shall be collected.
    • Constructor Detail

      • DatatypeVisitor

        protected DatatypeVisitor​(java.lang.String setPrefix,
                                  java.lang.String sequencePrefix,
                                  java.lang.String refPrefix)
        Constructs a surrounding visitor (which particularly handles set, sequence and refs).
        Parameters:
        setPrefix - the prefix for sets
        sequencePrefix - the prefix for sequences
        refPrefix - the prefix for references
      • DatatypeVisitor

        protected DatatypeVisitor​(java.lang.String setPrefix,
                                  java.lang.String sequencePrefix,
                                  java.lang.String refPrefix,
                                  java.lang.String open,
                                  java.lang.String close)
        Constructs a surrounding visitor (which particularly handles set, sequence and refs).
        Parameters:
        setPrefix - the prefix for sets
        sequencePrefix - the prefix for sequences
        refPrefix - the prefix for references
        open - the string to be appended after a prefix and before the contained type
        close - the string to be appended after the contained type
    • Method Detail

      • append

        protected void append​(java.lang.String text)
        Appends the given string to the result.
        Parameters:
        text - the string to be appended
      • getResult

        public java.lang.String getResult()
        Returns the result.
        Returns:
        the result
      • getQualifiedNameMode

        public QualifiedNameMode getQualifiedNameMode()
        Returns the mode to be applied when collecting names.
        Returns:
        the collection mode
      • setQualifiedNameMode

        public void setQualifiedNameMode​(QualifiedNameMode qualifiedNameMode)
        Switches the mode for considering names.
        Parameters:
        qualifiedNameMode - the new mode
      • clear

        public void clear()
        Clears the result.
      • visitSet

        public void visitSet​(Set set)
        Description copied from interface: IDatatypeVisitor
        Is called by a set data type.
        Specified by:
        visitSet in interface IDatatypeVisitor
        Parameters:
        set - the set instance
      • constructReferenceName

        public void constructReferenceName​(IDatatype type)
        Constructs a reference name from the given contained type.
        Parameters:
        type - the contained type
      • constructSurrounded

        protected void constructSurrounded​(java.lang.String prefix,
                                           IDatatype type)
        Constructs a surrounded datatype, i.e. the prefix(type-visited).
        Parameters:
        prefix - the prefix to be used
        type - the (contained) type to be visited
      • visitRealType

        public void visitRealType​(RealType type)
        Description copied from interface: IDatatypeVisitor
        Visiting method for visiting a RealType.
        Specified by:
        visitRealType in interface IDatatypeVisitor
        Parameters:
        type - The IDatatype which should be visited.
      • getType

        public java.lang.String getType​(IDatatype type)
        Returns the textual representation of this type.
        Parameters:
        type - the type to be represented
        Returns:
        the textual representation
      • visitCompoundType

        public void visitCompoundType​(Compound compound)
        Description copied from interface: IDatatypeVisitor
        Visiting method for visiting a Compound.
        Specified by:
        visitCompoundType in interface IDatatypeVisitor
        Parameters:
        compound - The Compound which should be visited.
      • visitEnumType

        public void visitEnumType​(Enum enumType)
        Description copied from interface: IDatatypeVisitor
        Visiting method for visiting a Enum.
        Specified by:
        visitEnumType in interface IDatatypeVisitor
        Parameters:
        enumType - The Enum which should be visited.