Class TruffleInstrumentProvider

java.lang.Object
com.oracle.truffle.api.instrumentation.provider.TruffleInstrumentProvider

public abstract class TruffleInstrumentProvider extends Object
Used to register a TruffleInstrument using a ServiceLoader. This interface is not intended to be implemented directly by an instrument developer, rather the implementation is generated by the Truffle DSL. The generated implementation has to inherit the TruffleInstrument.Registration annotations from the TruffleInstrument.
Since:
23.1
  • Constructor Details

    • TruffleInstrumentProvider

      protected TruffleInstrumentProvider()
      Constructor to be called by subclasses.
      Since:
      23.1
  • Method Details

    • getInstrumentClassName

      protected abstract String getInstrumentClassName()
      Returns the name of a class implementing the TruffleInstrument.
      Since:
      23.1
    • create

      protected abstract Object create()
      Creates a new instance of a TruffleInstrument.
      Since:
      23.1
    • getServicesClassNames

      protected abstract Collection<String> getServicesClassNames()
      Returns the class names of provided services.
      Since:
      23.1
    • getInternalResourceIds

      protected List<String> getInternalResourceIds()
      Returns ids of provided internal resources.
      Since:
      23.1
    • createInternalResource

      protected Object createInternalResource(String resourceId)
      Creates an instrument InternalResource identified by the resourceId.
      Throws:
      IllegalArgumentException - if resourceId is not supported by this instrument
      Since:
      23.1