Class SuperExpr

All Implemented Interfaces:
NodeWithRange<Node>, NodeWithTokenRange<Node>, Observable, Visitable, HasParentNode<Node>, Cloneable

public class SuperExpr extends Expression
An occurrence of the "super" keyword.
World.super.greet() is a MethodCallExpr of method name greet, and scope "World.super" which is a SuperExpr with typeName "World".
super.name is a FieldAccessExpr of field greet, and a SuperExpr as its scope. This SuperExpr has no typeName.
Author:
Julio Vilmar Gesser
See Also:
ExplicitConstructorInvocationStmt, ThisExpr
  • Constructor Details

    • SuperExpr

      public SuperExpr()
    • SuperExpr

      public SuperExpr(Name typeName)
    • SuperExpr

      public SuperExpr(TokenRange tokenRange, Name typeName)
      This constructor is used by the parser and is considered private.
  • Method Details

    • accept

      public <R,​ A> R accept(GenericVisitor<R,​A> v, A arg)
      Description copied from interface: Visitable
      Accept method for visitor support.
      Type Parameters:
      R - the type of the return value of the visitor
      A - the type the user argument passed to the visitor
      Parameters:
      v - the visitor implementation
      arg - the argument passed to the visitor (of type A)
      Returns:
      the result of the visit (of type R)
    • accept

      public <A> void accept(VoidVisitor<A> v, A arg)
      Description copied from interface: Visitable
      Accept method for visitor support.
      Type Parameters:
      A - the type the argument passed for the visitor
      Parameters:
      v - the visitor implementation
      arg - any value relevant for the visitor (of type A)
    • getTypeName

      public Optional<Name> getTypeName()
    • setTypeName

      public SuperExpr setTypeName(Name typeName)
    • remove

      public boolean remove(Node node)
      Overrides:
      remove in class Node
    • clone

      public SuperExpr clone()
      Overrides:
      clone in class Expression
    • getMetaModel

      public SuperExprMetaModel getMetaModel()
      Overrides:
      getMetaModel in class Expression
      Returns:
      get JavaParser specific node introspection information.
    • isSuperExpr

      public boolean isSuperExpr()
      Overrides:
      isSuperExpr in class Expression
    • asSuperExpr

      public SuperExpr asSuperExpr()
      Overrides:
      asSuperExpr in class Expression
    • ifSuperExpr

      public void ifSuperExpr(Consumer<SuperExpr> action)
      Overrides:
      ifSuperExpr in class Expression
    • toSuperExpr

      public Optional<SuperExpr> toSuperExpr()
      Overrides:
      toSuperExpr in class Expression
    • removeClassName

      public SuperExpr removeClassName()
    • replace

      public boolean replace(Node node, Node replacementNode)
      Overrides:
      replace in class Node
    • removeTypeName

      public SuperExpr removeTypeName()