Class VariableDeclaration

    • Constructor Detail

      • VariableDeclaration

        VariableDeclaration()
        Constructor for serializer.
      • VariableDeclaration

        public VariableDeclaration​(java.lang.String name,
                                   TypeDescriptor<?> type)
        Creates a new variable declaration.
        Parameters:
        name - the name of the variable
        type - the type of the variable
      • VariableDeclaration

        public VariableDeclaration​(java.lang.String name,
                                   TypeDescriptor<?> type,
                                   boolean isConstant,
                                   Expression expression)
        Creates a new variable declaration.
        Parameters:
        name - the name of the variable
        type - the type of the variable
        isConstant - whether this variable is a constant
        expression - an expression denoting the initial value (may be null)
    • Method Detail

      • accept

        public java.lang.Object accept​(IVisitor visitor)
                                throws VilException
        Description copied from interface: IBuildlangElement
        Accepts the visitor for visiting.
        Specified by:
        accept in interface IBuildlangElement
        Parameters:
        visitor - the visitor to be used
        Returns:
        the result of visiting this instance (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • setParent

        protected void setParent​(ILanguageElement parent)
        Changes the parent. Please override if children must be adjusted according. Shall be called only once per instance, but there is no limitation.
        Parameters:
        parent - the parent