Class Source

java.lang.Object
com.oracle.truffle.tools.dap.types.JSONBase
com.oracle.truffle.tools.dap.types.Source

public class Source extends JSONBase
A Source is a descriptor for source code. It is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.
  • Method Details

    • getName

      public String getName()
      The short name of the source. Every source returned from the debug adapter has a name. When sending a source to the debug adapter this name is optional.
    • setName

      public Source setName(String name)
    • getPath

      public String getPath()
      The path of the source to be shown in the UI. It is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0).
    • setPath

      public Source setPath(String path)
    • getSourceReference

      public Integer getSourceReference()
      If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified). A sourceReference is only valid for a session, so it must not be used to persist a source. The value should be less than or equal to 2147483647 (2^31 - 1).
    • setSourceReference

      public Source setSourceReference(Integer sourceReference)
    • getPresentationHint

      public String getPresentationHint()
      An optional hint for how to present the source in the UI. A value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.
    • setPresentationHint

      public Source setPresentationHint(String presentationHint)
    • getOrigin

      public String getOrigin()
      The (optional) origin of this source: possible values 'internal module', 'inlined content from source map', etc.
    • setOrigin

      public Source setOrigin(String origin)
    • getSources

      public List<Source> getSources()
      An optional list of sources that are related to this source. These may be the source that generated this source.
    • setSources

      public Source setSources(List<Source> sources)
    • getAdapterData

      public Object getAdapterData()
      Optional data that a debug adapter might want to loop through the client. The client should leave the data intact and persist it across sessions. The client should not interpret the data.
    • setAdapterData

      public Source setAdapterData(Object adapterData)
    • getChecksums

      public List<Checksum> getChecksums()
      The checksums associated with this file.
    • setChecksums

      public Source setChecksums(List<Checksum> checksums)
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • create

      public static Source create()