Class ArraySubscriptionExpression

java.lang.Object
de.fraunhofer.aisec.cpg.graph.Node
de.fraunhofer.aisec.cpg.graph.statements.Statement
de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression
de.fraunhofer.aisec.cpg.graph.statements.expressions.ArraySubscriptionExpression
All Implemented Interfaces:
DeclarationHolder, de.fraunhofer.aisec.cpg.graph.HasBase, HasType, HasType.TypeListener, Persistable, IVisitable<de.fraunhofer.aisec.cpg.graph.Node>

public class ArraySubscriptionExpression
extends Expression
implements HasType.TypeListener, de.fraunhofer.aisec.cpg.graph.HasBase
Represents the Subscription or access of an array of the form array[index], where both array and index are of type Expression. CPP can overload operators thus changing semantics of array access.
  • Constructor Details

    • ArraySubscriptionExpression

      public ArraySubscriptionExpression()
  • Method Details

    • getArrayExpression

      public Expression getArrayExpression()
    • setArrayExpression

      public void setArrayExpression​(Expression arrayExpression)
    • getSubscriptExpression

      public Expression getSubscriptExpression()
    • setSubscriptExpression

      public void setSubscriptExpression​(Expression subscriptExpression)
    • typeChanged

      public void typeChanged​(HasType src, java.util.Collection<HasType> root, Type oldType)
      Specified by:
      typeChanged in interface HasType.TypeListener
    • possibleSubTypesChanged

      public void possibleSubTypesChanged​(HasType src, java.util.Collection<HasType> root, java.util.Set<Type> oldSubTypes)
      Specified by:
      possibleSubTypesChanged in interface HasType.TypeListener
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class Expression
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Expression
    • getBase

      @NotNull public Expression getBase()
      Specified by:
      getBase in interface de.fraunhofer.aisec.cpg.graph.HasBase