Class SingleMethod

java.lang.Object
org.netbeans.spi.project.SingleMethod

public final class SingleMethod extends Object
Structure representing an identification of a single method/function in a file.
Since:
1.19
  • Field Details

    • COMMAND_RUN_SINGLE_METHOD

      public static final String COMMAND_RUN_SINGLE_METHOD
      Standard command for running single method/function
      Since:
      1.19
      See Also:
    • COMMAND_DEBUG_SINGLE_METHOD

      public static final String COMMAND_DEBUG_SINGLE_METHOD
      Standard command for running single method/function in debugger
      Since:
      1.19
      See Also:
  • Constructor Details

    • SingleMethod

      public SingleMethod(org.openide.filesystems.FileObject file, String methodName)
      Creates a new instance holding the specified identification of a method/function in a file.
      Parameters:
      file - file to be kept in the object
      methodName - name of a method inside the file
      Throws:
      IllegalArgumentException - if the file or method name is null
      Since:
      1.19
    • SingleMethod

      public SingleMethod(String methodName, NestedClass nestedClass)
      Creates a new instance holding the specified identification of a method/function in nested class in a file.
      Parameters:
      methodName - name of a method inside the file
      nestedClass - nested class containing the method
      Throws:
      IllegalArgumentException - if the nested class name is null
      Since:
      1.99
  • Method Details

    • getNestedClass

      public NestedClass getNestedClass()
      Returns the nested class containing the method.
      Returns:
      nested class containing the method
      Since:
      1.99
    • getFile

      public org.openide.filesystems.FileObject getFile()
      Returns the file identification.
      Returns:
      file held by this object
      Since:
      1.19
    • getMethodName

      public String getMethodName()
      Returns name of a method/function within the file.
      Returns:
      method/function name held by this object
      Since:
      1.19
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object