Class JMethodCall


public class JMethodCall extends JExpr
This class represents a method call in code.
  • Constructor Details

    • JMethodCall

      public JMethodCall()
      Creates a new method call.
    • JMethodCall

      public JMethodCall(JIdentifier anId, List theArgs)
      Creates a new method call for given identifier (method name) and arg list.
  • Method Details

    • getIdentifier

      public JIdentifier getIdentifier()
      Returns the identifier.
    • setIdentifier

      public void setIdentifier(JIdentifier anId)
      Sets the identifier.
    • getArgs

      public List<JExpr> getArgs()
      Returns the method arguments.
    • setArgs

      public void setArgs(List<JExpr> theArgs)
      Sets the method arguments.
    • getArgClasses

      public Class[] getArgClasses()
      Returns the arg classes.
    • getMethod

      public Method getMethod()
      Returns the method by querying parent class ref.
    • getNameImpl

      protected String getNameImpl()
      Resolves the name from Identifier or Method.
      Overrides:
      getNameImpl in class JNode
    • getClassNameImpl

      protected String getClassNameImpl()
      Tries to resolve the class name for this node.
      Overrides:
      getClassNameImpl in class JNode
    • getNodeString

      public String getNodeString()
      Returns the part name.
      Overrides:
      getNodeString in class JNode
    • getMethodCall

      public static JMethodCall getMethodCall(JNode aNode)
      Returns the method call parent of given node, if available.
    • getMethodCallArgClass

      public static Class getMethodCallArgClass(JNode aNode)
      Return the method call arg class of node, if node is MethodCall arg.
    • getMethodCallArgIndex

      public static int getMethodCallArgIndex(JMethodCall aMethodCall, JNode aNode)
      Return the method call arg index of node.