Interface IJavaNew

All Superinterfaces:
IJavaElement, IJavaExpression, IJavaStatement

@Ser public interface IJavaNew extends IJavaStatement, IJavaExpression
Java AST interface to represent the instantiation of a new non-array object.

Example:

 x = new SomeObject(...);
     ^^^^^^^^^^^^^^^^^^^
 
  • Method Details

    • getType

      IJavaType getType()
      Get the type of object being instantiated.
      Returns:
      the type string
    • getConstructorSignature

      String getConstructorSignature()
      Get the original constructor jvm name (fully qualified canonical name).
      Returns:
    • getConstructorName

      String getConstructorName()
      Get the original constructor simple name.
      Returns:
    • getConstructor

      IJavaMethod getConstructor()
      Get the constructor method used in this new statement.
      Returns:
      the constructor method
    • getArguments

      List<IJavaExpression> getArguments()
      Get the constructor arguments.
      Returns:
      the list of arguments
    • getGeneratedAnonymousClass

      IJavaClass getGeneratedAnonymousClass(JavaOutputSink out, int[] aAnonArgStart)
      Reserved for internal use.
      Parameters:
      out -
      aAnonArgStart -
      Returns:
    • duplicate

      IJavaNew duplicate()
      Description copied from interface: IJavaElement
      Duplicate this element.
      Specified by:
      duplicate in interface IJavaElement
      Specified by:
      duplicate in interface IJavaExpression
      Specified by:
      duplicate in interface IJavaStatement
      Returns:
      a (possibly) duplicated object of the same type