Class NegateOperation

java.lang.Object
autumn.lang.compiler.ast.nodes.NegateOperation
All Implemented Interfaces:
IConstruct, IExpression, IOperation, IUnaryOperation

public final class NegateOperation extends Object implements IUnaryOperation
An instance of this class is an AST node that represents the negation operator.

Property Name Property Description
operand This expression produces the operation's only operand.
location This is the source-location information regarding this construct.

This file was auto-generated on (Sun May 31 11:54:12 EDT 2015).

  • Constructor Details

    • NegateOperation

      public NegateOperation()
  • Method Details

    • setOperand

      public NegateOperation setOperand(IExpression value)
      Setter.
      Specified by:
      setOperand in interface IUnaryOperation
      Parameters:
      value - is the new value of property operand.
      Returns:
      a copy of this object with property operand set to value.
    • getOperand

      public IExpression getOperand()
      Getter.
      Specified by:
      getOperand in interface IUnaryOperation
      Returns:
      the value of property operand.
    • setLocation

      public NegateOperation setLocation(SourceLocation value)
      Setter.
      Specified by:
      setLocation in interface IConstruct
      Parameters:
      value - is the new value of property location.
      Returns:
      a copy of this object with property location set to value.
    • getLocation

      public SourceLocation getLocation()
      Getter.
      Specified by:
      getLocation in interface IConstruct
      Returns:
      the value of property location.
    • create

      public static NegateOperation create(IExpression operand, SourceLocation location)
      This method creates a new instance of this class.
      Parameters:
      operand - is the value for property operand.
      location - is the value for property location.
      Returns:
      a new instance of this class.
    • accept

      public void accept(IAstVisitor visitor)
      This method welcomes a visitor that wants to visit this object.
      Specified by:
      accept in interface IConstruct
      Parameters:
      visitor - is the visitor that is visiting this object.
    • copy

      public NegateOperation copy()
      This method creates a shallow copy of this object.
      Specified by:
      copy in interface IConstruct
      Returns:
      a shallow copy of this object.
    • toMap

      public Map<String,Object> toMap()
      This method creates a map representation of this struct.

      Each key is the name of a field. Each value is the result of calling the key field's getter.

      Returns:
      a map containing the entries in this struct.
    • toString

      public String toString()
      Overrides:
      toString in class Object