Class ExpressionVersionRestriction

    • Method Detail

      • createSingleRestriction

        public static Expression createSingleRestriction​(VariableDeclaration var,
                                                         java.lang.String operator,
                                                         Version version)
                                                  throws VilException
        Creates a typical single restriction from the given variable (see #createRestrictionVars(String), the operator and the version.
        Parameters:
        var - the variable to use
        operator - the operator
        version - the version
        Returns:
        the expression
        Throws:
        VilException - in case of type problems
      • emit

        public void emit​(java.lang.Object context)
        Description copied from interface: IVersionRestriction
        Emits the version restriction in terms of it's specification representation.
        Specified by:
        emit in interface IVersionRestriction
        Parameters:
        context - the output context (interpreted by the respective implementation, e.g., an output visitor in order to continue with the actual indentation, may be null but then nothing is emitted)
      • toSpecification

        public java.lang.String toSpecification()
        Description copied from interface: IVersionRestriction
        Turns the version restriction into it's specification representation.
        Specified by:
        toSpecification in interface IVersionRestriction
        Returns:
        the specification representation
      • getExpression

        protected Expression getExpression()
        Returns the restriction expression.
        Returns:
        the restriction expression
      • getVersionVariable

        protected VariableDeclaration getVersionVariable()
        Returns the version variable.
        Returns:
        the version variable