Class JavaSourceLocationResponse

java.lang.Object
io.quarkus.qute.debug.client.JavaSourceLocationResponse

public class JavaSourceLocationResponse extends Object
Response containing the location of a Java method, class, or template content referenced from a Qute template.

Typically returned by JavaSourceResolver.resolveJavaSource(io.quarkus.qute.debug.client.JavaSourceLocationArguments).

Example

 qute-java://org.acme.quarkus.sample.HelloResource$Hello@io.quarkus.qute.TemplateContents
 → javaFileUri = "file:///project/src/main/java/org/acme/quarkus/sample/HelloResource.java"
 → startLine = 16
 

The startLine represents the line where the template content or the Java element declaration starts. Lines are 1-based in this API (first line = 1).

  • Constructor Details

    • JavaSourceLocationResponse

      public JavaSourceLocationResponse()
    • JavaSourceLocationResponse

      public JavaSourceLocationResponse(String javaFileUri, int startLine)
  • Method Details

    • getJavaFileUri

      public String getJavaFileUri()
      Returns the URI of the Java source file containing the resolved element.
      Returns:
      the file URI
    • setJavaFileUri

      public void setJavaFileUri(String javaFileUri)
      Sets the URI of the Java source file containing the resolved element.
      Parameters:
      javaFileUri - the file URI to set
    • getStartLine

      public int getStartLine()
      Returns the start line of the Java element or template content in the source file.
      Returns:
      1-based start line of the element or template content
    • setStartLine

      public void setStartLine(int startLine)
      Sets the start line of the Java element or template content in the source file.
      Parameters:
      startLine - 1-based start line of the element or template content