Class ValueVisitor

  • All Implemented Interfaces:
    IValueVisitor

    class ValueVisitor
    extends java.lang.Object
    implements IValueVisitor
    Turns IVML values into VIL compatible values. No value is determined if at least getValue() returns null.
    Author:
    Holger Eichelberger
    • Field Detail

      • value

        private java.lang.Object value
      • stringValue

        private java.lang.String stringValue
      • booleanValue

        private java.lang.Boolean booleanValue
      • intValue

        private java.lang.Integer intValue
      • doubleValue

        private java.lang.Double doubleValue
    • Constructor Detail

      • ValueVisitor

        ValueVisitor()
    • Method Detail

      • clear

        public void clear()
        Clears this visitor for reuse.
      • getValue

        public java.lang.Object getValue()
        Returns the obtained object value.
        Returns:
        the obtained object value
      • getIntegerValue

        public java.lang.Integer getIntegerValue()
        Returns the obtained value as int.
        Returns:
        the obtained value, may be null if the value was of another type
      • getStringValue

        public java.lang.String getStringValue()
        Returns the obtained value as string.
        Returns:
        the obtained value, may be null if the value was of another type
      • getBooleanValue

        public java.lang.Boolean getBooleanValue()
        Returns the obtained value as boolean.
        Returns:
        the obtained value, may be null if the value was of another type
      • getDoubleValue

        public java.lang.Double getDoubleValue()
        Returns the obtained value as double.
        Returns:
        the obtained value, may be null if the value was of another type
      • getEnumValue

        public EnumValue getEnumValue()
        Returns the obtained value as enum value.
        Returns:
        the obtained value, may be null if the value was of another type
      • visitConstraintValue

        public void visitConstraintValue​(ConstraintValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting ConstraintValue.
        Specified by:
        visitConstraintValue in interface IValueVisitor
        Parameters:
        value - One ConstraintValue which should be visited.
      • visitEnumValue

        public void visitEnumValue​(EnumValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting EnumValue.
        Specified by:
        visitEnumValue in interface IValueVisitor
        Parameters:
        value - One EnumValue which should be visited.
      • visitStringValue

        public void visitStringValue​(StringValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting StringValue.
        Specified by:
        visitStringValue in interface IValueVisitor
        Parameters:
        value - One StringValue which should be visited.
      • visitCompoundValue

        public void visitCompoundValue​(CompoundValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting CompoundValue.
        Specified by:
        visitCompoundValue in interface IValueVisitor
        Parameters:
        value - One CompoundValue which should be visited.
      • visitContainerValue

        public void visitContainerValue​(ContainerValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting ContainerValue.
        Specified by:
        visitContainerValue in interface IValueVisitor
        Parameters:
        value - One CompoundValue which should be visited.
      • visitIntValue

        public void visitIntValue​(IntValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting IntValue.
        Specified by:
        visitIntValue in interface IValueVisitor
        Parameters:
        value - One IntValue which should be visited.
      • visitRealValue

        public void visitRealValue​(RealValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting RealValue.
        Specified by:
        visitRealValue in interface IValueVisitor
        Parameters:
        value - One RealValue which should be visited.
      • visitBooleanValue

        public void visitBooleanValue​(BooleanValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting BooleanValue.
        Specified by:
        visitBooleanValue in interface IValueVisitor
        Parameters:
        value - One BooleanValue which should be visited.
      • visitReferenceValue

        public void visitReferenceValue​(ReferenceValue referenceValue)
        Description copied from interface: IValueVisitor
        This method is used for visiting referenceValue.
        Specified by:
        visitReferenceValue in interface IValueVisitor
        Parameters:
        referenceValue - One referenceValue which should be visited.
      • visitMetaTypeValue

        public void visitMetaTypeValue​(MetaTypeValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting meta type value.
        Specified by:
        visitMetaTypeValue in interface IValueVisitor
        Parameters:
        value - a value which should be visited.
      • visitVersionValue

        public void visitVersionValue​(VersionValue value)
        Description copied from interface: IValueVisitor
        This method is used for visiting a version value.
        Specified by:
        visitVersionValue in interface IValueVisitor
        Parameters:
        value - a value which should be visited.